* After git svn clone master is tied to a branch in svn, howto set master to trunk
@ 2009-03-11 15:17 Svenn Are Bjerkem
2009-03-11 16:04 ` Svenn Are Bjerkem
2009-03-11 16:32 ` Michael J Gruber
0 siblings, 2 replies; 5+ messages in thread
From: Svenn Are Bjerkem @ 2009-03-11 15:17 UTC (permalink / raw)
To: git
Hi,
after performing a
$> git svn clone https://svnserver/svn/a/b/c -T trunk/current -t tags -
b branches
I find that the git master has been tied to one of the branches. It
turns out that the highest svn revision number in the repository was
tied to that branch.
For historical reasons we have subdirectories in trunk/ on svn, but I
inspected .git/config
[svn-remote "svn"]
url = https://svnserver/svn
fetch = a/b/c/trunk/current:refs/remotes/trunk
branches = a/b/c/branches/*:refs/remotes/*
tags = a/b/c/tags/*:refs/remotes/tags/*
And I assume it picked up the strange trunk correctly.
I have been googling around for a while looking for instructions how
to tell git that when I check out "master" it should be "trunk" from
svn and not "branches/next_gen", or more precisely how to move master
to trunk from branches/next_gen.
I guess I could solve the problem by modifying a file in trunk on svn
and commit so that the trunk will get the highest svn revision number
again and redo the clone.
--
Svenn
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: After git svn clone master is tied to a branch in svn, howto set master to trunk 2009-03-11 15:17 After git svn clone master is tied to a branch in svn, howto set master to trunk Svenn Are Bjerkem @ 2009-03-11 16:04 ` Svenn Are Bjerkem 2009-03-11 16:32 ` Michael J Gruber 1 sibling, 0 replies; 5+ messages in thread From: Svenn Are Bjerkem @ 2009-03-11 16:04 UTC (permalink / raw) To: git On Mar 11, 4:17 pm, Svenn Are Bjerkem <svenn.bjer...@googlemail.com> wrote: > Hi, > after performing a > $> git svn clone https://svnserver/svn/a/b/c-T trunk/current -t tags - > b branches > I find that the git master has been tied to one of the branches. It > turns out that the highest svn revision number in the repository was > tied to that branch. [snip] > I guess I could solve the problem by modifying a file in trunk on svn > and commit so that the trunk will get the highest svn revision number > again and redo the clone. I just wanted to confirm this assumption: First I removed the complete git-svn clone and modified a file in trunk and checked it into svn. Then I re-performed the git svn clone as described above. The master in the local git repository is now tied to the trunk of the svn repository. -- Svenn ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: After git svn clone master is tied to a branch in svn, howto set master to trunk 2009-03-11 15:17 After git svn clone master is tied to a branch in svn, howto set master to trunk Svenn Are Bjerkem 2009-03-11 16:04 ` Svenn Are Bjerkem @ 2009-03-11 16:32 ` Michael J Gruber 2009-03-11 17:20 ` Svenn Are Bjerkem 1 sibling, 1 reply; 5+ messages in thread From: Michael J Gruber @ 2009-03-11 16:32 UTC (permalink / raw) To: Svenn Are Bjerkem; +Cc: git Svenn Are Bjerkem venit, vidit, dixit 11.03.2009 16:17: > Hi, > after performing a > $> git svn clone https://svnserver/svn/a/b/c -T trunk/current -t tags - > b branches > I find that the git master has been tied to one of the branches. It > turns out that the highest svn revision number in the repository was > tied to that branch. > > For historical reasons we have subdirectories in trunk/ on svn, but I > inspected .git/config > [svn-remote "svn"] > url = https://svnserver/svn > fetch = a/b/c/trunk/current:refs/remotes/trunk > branches = a/b/c/branches/*:refs/remotes/* > tags = a/b/c/tags/*:refs/remotes/tags/* > And I assume it picked up the strange trunk correctly. > > I have been googling around for a while looking for instructions how > to tell git that when I check out "master" it should be "trunk" from > svn and not "branches/next_gen", or more precisely how to move master > to trunk from branches/next_gen. > > I guess I could solve the problem by modifying a file in trunk on svn > and commit so that the trunk will get the highest svn revision number > again and redo the clone. I'm not quite sure what you mean by master being "tied" to an svn branch. You mean you want master to track the svn trunk? Then git branch -D master git checkout --track -b master trunk should do (assuming you haven't worked on master yet). Michael ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: After git svn clone master is tied to a branch in svn, howto set master to trunk 2009-03-11 16:32 ` Michael J Gruber @ 2009-03-11 17:20 ` Svenn Are Bjerkem 2009-03-11 17:54 ` Svenn Are Bjerkem 0 siblings, 1 reply; 5+ messages in thread From: Svenn Are Bjerkem @ 2009-03-11 17:20 UTC (permalink / raw) To: git On Mar 11, 5:32 pm, Michael J Gruber <g...@drmicha.warpmail.net> wrote: > Svenn Are Bjerkem venit, vidit, dixit 11.03.2009 16:17: > > > > > Hi, > > after performing a > > $> git svn clonehttps://svnserver/svn/a/b/c-T trunk/current -t tags - > > b branches > > I find that the git master has been tied to one of the branches. It > > turns out that the highest svn revision number in the repository was > > tied to that branch. > > > For historical reasons we have subdirectories in trunk/ on svn, but I > > inspected .git/config > > [svn-remote "svn"] > > url =https://svnserver/svn > > fetch = a/b/c/trunk/current:refs/remotes/trunk > > branches = a/b/c/branches/*:refs/remotes/* > > tags = a/b/c/tags/*:refs/remotes/tags/* > > And I assume it picked up the strange trunk correctly. > > > I have been googling around for a while looking for instructions how > > to tell git that when I check out "master" it should be "trunk" from > > svn and not "branches/next_gen", or more precisely how to move master > > to trunk from branches/next_gen. > > > I guess I could solve the problem by modifying a file in trunk on svn > > and commit so that the trunk will get the highest svn revision number > > again and redo the clone. > > I'm not quite sure what you mean by master being "tied" to an svn > branch. You mean you want master to track the svn trunk? Then When doing a git svn info in master right after the clone was finished, before any work was done, URL was https://...../branches/next_gen. When deleting the git repository, modifying and commiting a file in trunk on svn and rerun the exact same clone operation, URL in git svn info became https://....../trunk/current. During the first clone, branches/next_gen had the highest overall svn revision number and got automatically "tied" to master, while in the second clone run trunk had the highest overall svn revision number and git chose that master should track svn trunk. > > git branch -D master > git checkout --track -b master trunk > > should do (assuming you haven't worked on master yet). I will take a note of this advice and perform a commit to force a different branch than next_gen to have overall highest svn revision number when I do a clone next time. Reading up in the manuals on your suggestion seems to be what I intended to acheive. Thanks, -- Svenn ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: After git svn clone master is tied to a branch in svn, howto set master to trunk 2009-03-11 17:20 ` Svenn Are Bjerkem @ 2009-03-11 17:54 ` Svenn Are Bjerkem 0 siblings, 0 replies; 5+ messages in thread From: Svenn Are Bjerkem @ 2009-03-11 17:54 UTC (permalink / raw) To: git On Mar 11, 6:20 pm, Svenn Are Bjerkem <svenn.bjer...@googlemail.com> wrote: > On Mar 11, 5:32 pm, Michael J Gruber <g...@drmicha.warpmail.net> > wrote: > > > > > Svenn Are Bjerkem venit, vidit, dixit 11.03.2009 16:17: > > > > Hi, > > > after performing a > > > $> git svn clonehttps://svnserver/svn/a/b/c-Ttrunk/current -t tags - > > > b branches > > > I find that the git master has been tied to one of the branches. It > > > turns out that the highest svn revision number in the repository was > > > tied to that branch. > > > > For historical reasons we have subdirectories in trunk/ on svn, but I > > > inspected .git/config > > > [svn-remote "svn"] > > > url =https://svnserver/svn > > > fetch = a/b/c/trunk/current:refs/remotes/trunk > > > branches = a/b/c/branches/*:refs/remotes/* > > > tags = a/b/c/tags/*:refs/remotes/tags/* > > > And I assume it picked up the strange trunk correctly. > > > > I have been googling around for a while looking for instructions how > > > to tell git that when I check out "master" it should be "trunk" from > > > svn and not "branches/next_gen", or more precisely how to move master > > > to trunk from branches/next_gen. > > > > I guess I could solve the problem by modifying a file in trunk on svn > > > and commit so that the trunk will get the highest svn revision number > > > again and redo the clone. > > > I'm not quite sure what you mean by master being "tied" to an svn > > branch. You mean you want master to track the svn trunk? Then > > When doing a git svn info in master right after the clone was > finished, before any work was done, URL washttps://...../branches/next_gen. > When deleting the git repository, modifying and commiting a file in > trunk on svn and rerun the exact same clone operation, URL in git svn > info becamehttps://....../trunk/current. During the first clone, > branches/next_gen had the highest overall svn revision number and got > automatically "tied" to master, while in the second clone run trunk > had the highest overall svn revision number and git chose that master > should track svn trunk. > > > > > git branch -D master > > git checkout --track -b master trunk > > > should do (assuming you haven't worked on master yet). > > I will take a note of this advice and perform a commit to force a > different branch than next_gen to have overall highest svn revision > number when I do a clone next time. Reading up in the manuals on your > suggestion seems to be what I intended to acheive. I now had the opportunity to check your suggestion, and this time I first performed a commit in branches/old_gen so branches/old_gen got the overall highest svn revision number. When performing exactly the same git svn clone as before, master was set to track branches/ old_gen. Now I tried your suggestion, and except for the fact that I cannot delete master as long as I am in master, it works as expected. I had to do a git checkout -b next_gen next_gen to get into next_gen branch to be allowed to git branch -D master, but that was not a really big surprise. Then checkout --track does the job nicely. Good to know, thanks for your help, Svenn ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-11 17:56 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-03-11 15:17 After git svn clone master is tied to a branch in svn, howto set master to trunk Svenn Are Bjerkem 2009-03-11 16:04 ` Svenn Are Bjerkem 2009-03-11 16:32 ` Michael J Gruber 2009-03-11 17:20 ` Svenn Are Bjerkem 2009-03-11 17:54 ` Svenn Are Bjerkem
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox