git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-svn branches with revision id's in name
@ 2012-01-30 19:42 Stephen Duncan Jr
  2012-02-02 12:24 ` Carsten Fuchs
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Duncan Jr @ 2012-01-30 19:42 UTC (permalink / raw)
  To: git

A project I work on recently changed it's SVN structure, causing me to
do a new git svn clone.  The new structure is like this:

{project}/branches/
  /master
  /develop
  /qa
  /feature
    /feature1
    /feature2
  /release
    /release1
    /release2
  /hotfix
    /hotfix1
    /hotfix2

So I set up my svn-remote sections as follows:

[svn-remote "svn"]
  url = {url}
  fetch = {project}/branches/master:refs/remotes/trunk
  fetch = {project}/branches/develop:refs/remotes/develop
  fetch = {project}/branches/qa:refs/remotes/qa
  branches = {project}/branches/{feature,release,hotfix}/*:refs/remotes/*/*

This seems to have worked fine, for the most part, but unlike my
previous git-svn checkouts, it has created several branches with
revision numbers as part of the name:

$ git branch -a
* master
  remotes/develop
  remotes/develop@29271
  remotes/develop@32463
  remotes/develop@34103
  remotes/feature/xyz
  remotes/feature/xyz@26438
  remotes/feature/xyz@27542
  remotes/feature/xyz@35233

Why have these remote branches been created?  What impact does this
have on my checkout?  Can I remove safely remove them?  How?  I was
unable to figure out how to reference this behavior in order to search
for information on it.

--
Stephen Duncan Jr
www.stephenduncanjr.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git-svn branches with revision id's in name
  2012-01-30 19:42 git-svn branches with revision id's in name Stephen Duncan Jr
@ 2012-02-02 12:24 ` Carsten Fuchs
  2012-02-02 19:03   ` Jehan Bing
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Fuchs @ 2012-02-02 12:24 UTC (permalink / raw)
  To: Stephen Duncan Jr; +Cc: git

Hi all,

Am 2012-01-30 20:42, schrieb Stephen Duncan Jr:
> [...]
> $ git branch -a
> * master
>    remotes/develop
>    remotes/develop@29271
>    remotes/develop@32463
>    remotes/develop@34103
>    remotes/feature/xyz
>    remotes/feature/xyz@26438
>    remotes/feature/xyz@27542
>    remotes/feature/xyz@35233
>
> Why have these remote branches been created?  What impact does this
> have on my checkout?  Can I remove safely remove them?  How?  I was
> unable to figure out how to reference this behavior in order to search
> for information on it.

Same questions here.
(I know how to remove them, but I'd love to learn and understand why they have been 
created.)

Any info would much be appreciated!

Many thanks and best regards,
Carsten



-- 
    Cafu - the open-source Game and Graphics Engine
for multiplayer, cross-platform, real-time 3D Action
           Learn more at http://www.cafu.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git-svn branches with revision id's in name
  2012-02-02 12:24 ` Carsten Fuchs
@ 2012-02-02 19:03   ` Jehan Bing
  0 siblings, 0 replies; 3+ messages in thread
From: Jehan Bing @ 2012-02-02 19:03 UTC (permalink / raw)
  To: git; +Cc: Stephen Duncan Jr

On 2012-02-02 04:24, Carsten Fuchs wrote:
> Hi all,
>
> Am 2012-01-30 20:42, schrieb Stephen Duncan Jr:
>> [...]
>> $ git branch -a
>> * master
>> remotes/develop
>> remotes/develop@29271
>> remotes/develop@32463
>> remotes/develop@34103
>> remotes/feature/xyz
>> remotes/feature/xyz@26438
>> remotes/feature/xyz@27542
>> remotes/feature/xyz@35233
>>
>> Why have these remote branches been created? What impact does this
>> have on my checkout? Can I remove safely remove them? How? I was
>> unable to figure out how to reference this behavior in order to search
>> for information on it.
>
> Same questions here.
> (I know how to remove them, but I'd love to learn and understand why
> they have been created.)

Those are branches that have been deleted and then recreated later.
In svn, you can always get a deleted branch back by checking out an old 
revision. But in git, branches are not part of the history, so when you 
delete a branch, it's completely gone, as if it never existed, taking 
with it any commit that has not been merged elsewhere.
To prevent that loss, git-svn doesn't delete branches. But if the branch 
was re-created later in svn, you would get a conflict in git. So 
instead, git-svn rename the old branch by adding the revision number 
where the branch last existed, i.e. the revision before it was deleted.

So in the OP case, the branch "develop" was deleted at least 3 times, at 
r34104, r32464 and r29272. The last one may also have been deleted too 
but then it was not re-created so git-svn didn't rename yet.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-02 19:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-30 19:42 git-svn branches with revision id's in name Stephen Duncan Jr
2012-02-02 12:24 ` Carsten Fuchs
2012-02-02 19:03   ` Jehan Bing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).