[llvm-commits] [PATCH] Document how to maintain a git-svn clone of the LLVM git repositories

Jeffrey Yasskin jyasskin at google.com
Mon Jul 18 17:16:02 PDT 2011


On Mon, Jul 18, 2011 at 5:04 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
>
> On Jul 18, 2011, at 4:41 PM, Jeffrey Yasskin wrote:
>
>> On Mon, Jul 18, 2011 at 4:25 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
>>>
>>> On Jul 18, 2011, at 4:14 PM, Jeffrey Yasskin wrote:
>>>
>>>> These instructions are based on
>>>> http://groups.google.com/group/llvm-dev/browse_thread/thread/33256daf28f0f18c/0449f6bce452e7b8?#0449f6bce452e7b8.
>>>> I don't actually know git well enough to know if they're right, but
>>>> they seem to work.
>>>
>>> I use:
>>>
>>>  git fetch -p origin
>>
>> Should I add "-p origin" to the patch's fetch commands?
>
> Meh. I don't think it matters.
>
>>>  git update-ref refs/remotes/git-svn origin/master
>>>  git svn rebase -l
>>>
>>> instead of changing the svn-remote.svn.fetch setting, but I think both will work.
>>
>> The nice thing about changing the svn-remote.svn.fetch setting when
>> setting up a client is that it removes one step from every update.
>
> Not if you are using a shell script ;-)
>
> But yeah, just leave it as is.
>
>>> I don't think 'git checkout master' is needed in the update script. In fact, I often use the above script to rebase arbitrary branches onto trunk.
>>>
>>
>> Say someone has 'master -> branch1 -> branch2', and happens to have
>> branch2 checked out when they run the update script. Unless the script
>> includes `checkout master`, won't `svn rebase` break the inheritance
>> from branch1?
>
> Yes. It would rebase everything on the new origin/master.
>
>> Clearly people who know git well can tweak the scripts
>> as necessary, but I was hoping to write instructions that are pretty
>> safe for relative newbies like me.
>
> Sure. I don't want to get into a discussion about git workflows, everyone seems to have their own preferences.
>
> The important part is that we document how to quickly bootstrap git-svn using the mirror, and how to keep them in sync. Your patch does that nicely.
>
> One thing you may want to add: The git-svn metadata can get out of sync after you mess around with branches and dcommit. When that happens, 'git svn dcommit' stops working, complaining about files with uncommitted changes. The fix is to rebuild the metadata:
>
> $ rm -rf .git/svn
> $ git svn rebase -l

Thanks! How's this version?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm_git-svn.diff
Type: text/x-patch
Size: 2144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110718/44a4b6e2/attachment.bin>


More information about the llvm-commits mailing list