January 23, 2011 [phobos] [dmd-internals] svn-->git migration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 1/23/2011 6:57 PM, Andrei Alexandrescu wrote:
> On 1/23/11 8:18 PM, Jason Evans wrote:
>> On 01/23/2011 01:12 PM, Jason Evans wrote:
>>> I converted the druntime repository from svn to git a few days ago, and I'm doing the same for phobos and dmd today.
>>
>> This is done now. If you notice any problems, please let me know.
>
> Great! Say I have a change to make to one file in phobos 2 to get started. Could you please summarize what steps I need to take?
>
> Thanks!
>
> Andrei
I've temporarily disabled the auto tester html generation step (I know, it was just enabled!), since the directory restructuring has broken it. If you could own fixing it, since you're going to own the website content, I'd appreciate it.
Thanks,
Brad
|
January 23, 2011 [phobos] [dmd-internals] svn-->git migration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 01/23/2011 06:57 PM, Andrei Alexandrescu wrote: > Say I have a change to make to one file in phobos 2 to get started. Could you please summarize what steps I need to take? Let's suppose we want to update the README.txt in druntime, which currently refers to dsource.org. First we need a git repository to work in. Take a look at the following web page to get the appropriate ssh location. https://github.com/D-Programming-Language/druntime Clone the repository. $ git clone git at github.com:D-Programming-Language/druntime.git $ cd druntime Create a working branch, based on the master branch. (I won't get much into branch management in this email.) $ git checkout -b update-README Switched to a new branch 'update-README' Edit README.txt, then verify the diff. $ git diff diff --git a/README.txt b/README.txt index d0ae645..9183765 100644 --- a/README.txt +++ b/README.txt @@ -1,5 +1,5 @@ The source code repository for Druntime is: -http://dsource.org/projects/druntime +https://github.com/D-Programming-Language/druntime Druntime is the minimum library required to support the D programming language. It includes the system code required to support the garbage Add README.txt to the staging index. $ git status # On branch update-README # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: README.txt # no changes added to commit (use "git add" and/or "git commit -a") $ git add README.txt $ git diff $ git status # On branch update-README # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: README.txt # Commit to working branch. $ git commit -m "Update URL." [update-README 1fbddd4] Update URL. 1 files changed, 1 insertions(+), 1 deletions(-) Check out master branch and merge. (If someone else had committed to master in the meanwhile, we would want to do a dance to "rebase" our working branch, but let's ignore that for now.) $ git checkout master Switched to branch 'master' $ git merge update-README Updating 559df80..1fbddd4 Fast-forward README.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Now let's push the change to the master repository, and finally delete our working branch. $ git push origin master Counting objects: 5, done. Delta compression using up to 2 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 330 bytes, done. Total 3 (delta 2), reused 0 (delta 0) To git at github.com:D-Programming-Language/druntime.git 559df80..1fbddd4 master -> master $ git branch -d update-README Deleted branch update-README (was 1fbddd4). The above example has several steps in it that can be skipped for such a simple change, but for more involved changes, this work flow is the foundation. git is a complex tool, but the underlying concepts are coherent, consistent, and straightforward. Learn those concepts well and you will be largely able to infer what git is capable of. Thanks, Jason |
January 23, 2011 [phobos] [dmd-internals] svn-->git migration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | On 1/23/11 9:10 PM, Brad Roberts wrote:
> On 1/23/2011 6:57 PM, Andrei Alexandrescu wrote:
>> On 1/23/11 8:18 PM, Jason Evans wrote:
>>> On 01/23/2011 01:12 PM, Jason Evans wrote:
>>>> I converted the druntime repository from svn to git a few days ago, and I'm doing the same for phobos and dmd today.
>>>
>>> This is done now. If you notice any problems, please let me know.
>>
>> Great! Say I have a change to make to one file in phobos 2 to get started. Could you please summarize what steps I need to take?
>>
>> Thanks!
>>
>> Andrei
>
> I've temporarily disabled the auto tester html generation step (I know, it was just enabled!), since the directory restructuring has broken it. If you could own fixing it, since you're going to own the website content, I'd appreciate it.
Aside from the fact that I know next to nothing about it... sure :o).
Andrei
|
January 23, 2011 [phobos] [dmd-internals] svn-->git migration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jason Evans | Perfect. In the meantime I was antsy and patched the workflow from various resources found on the net. Your message is an excellent reference for us all. Thanks! We're at our first git commit in Phobos! https://github.com/D-Programming-Language/phobos/commit/81a4a4034aabe83d41cf2a0a202fedb428da66b6 (Let me know if I screwed up something...) Andrei On 1/23/11 9:32 PM, Jason Evans wrote: > On 01/23/2011 06:57 PM, Andrei Alexandrescu wrote: >> Say I have a change to make to one file in phobos 2 to get started. Could you please summarize what steps I need to take? > > Let's suppose we want to update the README.txt in druntime, which currently refers to dsource.org. First we need a git repository to work in. Take a look at the following web page to get the appropriate ssh location. > > https://github.com/D-Programming-Language/druntime > > Clone the repository. > > $ git clone git at github.com:D-Programming-Language/druntime.git $ cd druntime > > Create a working branch, based on the master branch. (I won't get much into branch management in this email.) > > $ git checkout -b update-README > Switched to a new branch 'update-README' > > Edit README.txt, then verify the diff. > > $ git diff > diff --git a/README.txt b/README.txt > index d0ae645..9183765 100644 > --- a/README.txt > +++ b/README.txt > @@ -1,5 +1,5 @@ > The source code repository for Druntime is: > -http://dsource.org/projects/druntime > +https://github.com/D-Programming-Language/druntime > > Druntime is the minimum library required to support the D programming language. It includes the system code required to support the garbage > > Add README.txt to the staging index. > > $ git status > # On branch update-README > # Changed but not updated: > # (use "git add <file>..." to update what will be committed) > # (use "git checkout -- <file>..." to discard changes in working directory) > # > # modified: README.txt > # > no changes added to commit (use "git add" and/or "git commit -a") > $ git add README.txt > $ git diff > $ git status > # On branch update-README > # Changes to be committed: > # (use "git reset HEAD <file>..." to unstage) > # > # modified: README.txt > # > > Commit to working branch. > > $ git commit -m "Update URL." > [update-README 1fbddd4] Update URL. > 1 files changed, 1 insertions(+), 1 deletions(-) > > Check out master branch and merge. (If someone else had committed to master in the meanwhile, we would want to do a dance to "rebase" our working branch, but let's ignore that for now.) > > $ git checkout master > Switched to branch 'master' > $ git merge update-README > Updating 559df80..1fbddd4 > Fast-forward > README.txt | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > Now let's push the change to the master repository, and finally delete our working branch. > > $ git push origin master > Counting objects: 5, done. > Delta compression using up to 2 threads. > Compressing objects: 100% (3/3), done. > Writing objects: 100% (3/3), 330 bytes, done. > Total 3 (delta 2), reused 0 (delta 0) > To git at github.com:D-Programming-Language/druntime.git > 559df80..1fbddd4 master -> master > $ git branch -d update-README > Deleted branch update-README (was 1fbddd4). > > The above example has several steps in it that can be skipped for such a simple change, but for more involved changes, this work flow is the foundation. git is a complex tool, but the underlying concepts are coherent, consistent, and straightforward. Learn those concepts well and you will be largely able to infer what git is capable of. > > Thanks, > Jason |
January 23, 2011 [phobos] [dmd-internals] svn-->git migration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 1/23/2011 8:08 PM, Andrei Alexandrescu wrote:
> On 1/23/11 9:10 PM, Brad Roberts wrote:
>> On 1/23/2011 6:57 PM, Andrei Alexandrescu wrote:
>>> On 1/23/11 8:18 PM, Jason Evans wrote:
>>>> On 01/23/2011 01:12 PM, Jason Evans wrote:
>>>>> I converted the druntime repository from svn to git a few days ago, and I'm doing the same for phobos and dmd today.
>>>>
>>>> This is done now. If you notice any problems, please let me know.
>>>
>>> Great! Say I have a change to make to one file in phobos 2 to get started. Could you please summarize what steps I need to take?
>>>
>>> Thanks!
>>>
>>> Andrei
>>
>> I've temporarily disabled the auto tester html generation step (I know, it was just enabled!), since the directory restructuring has broken it. If you could own fixing it, since you're going to own the website content, I'd appreciate it.
>
> Aside from the fact that I know next to nothing about it... sure :o).
>
> Andrei
Sorry.. major clarity issues with my request. :)
If you'll focus on fixing the make files in the phobos package to work and do what you think they should with respect to documentation generation, that'd be great. I'll deal with the tester side of things (unless you want to broaden your horizions).
|
January 23, 2011 [phobos] [dmd-internals] svn-->git migration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jason Evans |
Jason Evans wrote:
>
> The above example has several steps in it that can be skipped for such a simple change, but for more involved changes, this work flow is the foundation. git is a complex tool, but the underlying concepts are coherent, consistent, and straightforward. Learn those concepts well and you will be largely able to infer what git is capable of.
>
>
This is good stuff, thanks!
How do we set things so that line endings are automatically normalized to LF?
|
January 23, 2011 [phobos] [dmd-internals] svn-->git migration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 1/23/2011 8:28 PM, Walter Bright wrote:
>
>
> Jason Evans wrote:
>>
>> The above example has several steps in it that can be skipped for such a simple change, but for more involved changes, this work flow is the foundation. git is a complex tool, but the underlying concepts are coherent, consistent, and straightforward. Learn those concepts well and you will be largely able to infer what git is capable of.
>>
>>
>
> This is good stuff, thanks!
>
> How do we set things so that line endings are automatically normalized to LF?
That raises an interesting point. There's a couple files in the dmd test suite that are rather specifically managed. I should go take a close look to see what happened with them in the conversion. They include BOM's or are utf-16 and -32 encoded rather than utf-8. They were properly flagged in svn.
|
January 23, 2011 [phobos] [dmd-internals] svn-->git migration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 01/23/2011 08:28 PM, Walter Bright wrote: > How do we set things so that line endings are automatically normalized to LF? You mean, something similar to a subversion commit hook script that re-writes the commit on the fly? I don't think we'll be able to do that in general, due to the distributed nature of git. Here is a relevant github support discussion: http://support.github.com/discussions/feature-requests/686-pre-commit-hooks The core of the problem is that an entire series of changes (including arbitrarily complex forking/merging) can be performed in a local repository, then pushed to github all at once. Therefore, normalization would have to do some non-trivial history rewriting, which would then cause divergence from the repository the changes were pushed from. Thanks, Jason |
January 23, 2011 [phobos] [dmd-internals] svn-->git migration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jason Evans | Something funky is happening with the dmd repository. I did a clone, then a git status, and got this: git status # On branch master # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: docs/man/man1/dmd.1 # modified: docs/man/man1/dmd.conf.5 # modified: docs/man/man1/dumpobj.1 # modified: docs/man/man1/obj2asm.1 # modified: docs/man/man1/rdmd.1 # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # log no changes added to commit (use "git add" and/or "git commit -a") But I didn't modify those man1 files. What's going on? |
January 23, 2011 [phobos] [dmd-internals] svn-->git migration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 1/23/2011 10:12 PM, Walter Bright wrote: > Something funky is happening with the dmd repository. I did a clone, then a git status, and got this: > > git status > # On branch master > # Changed but not updated: > # (use "git add <file>..." to update what will be committed) > # (use "git checkout -- <file>..." to discard changes in working directory) > # > # modified: docs/man/man1/dmd.1 > # modified: docs/man/man1/dmd.conf.5 > # modified: docs/man/man1/dumpobj.1 > # modified: docs/man/man1/obj2asm.1 > # modified: docs/man/man1/rdmd.1 > # > # Untracked files: > # (use "git add <file>..." to include in what will be committed) > # > # log > no changes added to commit (use "git add" and/or "git commit -a") > > > But I didn't modify those man1 files. What's going on? What does 'git diff' show? Also, it looks like the change you submitted was almost certainly not what you intended: https://github.com/D-Programming-Language/dmd/commit/0e11f62c7a8cfe7eb997c27e826e1451dd083f7a It added src/cod2.c as a new file. It should have been a delta to src/backend/cod2.c. |
Copyright © 1999-2021 by the D Language Foundation