breaks when branch and tag have the same name

Issue #239 open
Anonymous created an issue

When pulling from an svn repo where a branch and a tag have the same name, hg-svn chokes, and keeps re-importing the same revisions.

See the Page Speed svn repo: svn checkout http://page-speed.googlecode.com/svn/lib

(tag and branch both named lib-1.10.0)

Comments (9)

  1. Augie Fackler repo owner

    I just cloned the URL you specified just fine. Your use of the term 'hg-svn' leads me to believe that you're using the old 'hgsvn' product which is completely different from hgsubversion. Perhaps you should consider using hgsubversion instead?

  2. Anonymous

    Oops, sorry, that's because I fixed the problem in the pagespeed repo right after reporting the bug :)

    I attached a dump of an example repo that illustrates the problem. Clone the svn repo into a mercurial repo, then 'hg pull -u'; every time you pull, it re-imports revision 7 (the one where the tag was created).

    Andrew

  3. Dan Villiom Podlaski Christiansen

    Saying that hgsubversion “chokes” is inaccurate in my opinion. That word suggests we somehow fail to clone the repository with an abort or traceback. This is not the case; rather, the final revision is determined not to contain any changes that should be converted to Mercurial (which may be a bug) and thus not actually pulled but it is reported.

    Continuing to report empty or irrelevant revisions is #179. I'm marking this one as a duplicate of it.

    Duplicate of #179.

  4. Andrew Oates

    No, the revisions are actually re-pulled into the hg repo, not just reported, which clutters up the revision log every time I pull. If I clone the svn repo I attached, it clones 7 revisions. If I then pull, it pulls two new revisions. If I pull again, two more revisions. Below is the console output.

    Also, it appears that if I try to then make a change in hg, and push it back to svn, hg crashes (actually crashes, with a SubversionException thrown).

    I'm not sure if this is a duplicate of #179, but I suspect not, since it's not just reporting the revisions, but pulling them and converting them as well.

    Thanks for all your hard work on this project, Andrew

    Console output:

    ~/svn-test$ hg clone file:///home/aoates/svn-test/repo hg
    [r1] aoates: added directories
    [r2] aoates: adedd files
    [r3] aoates: added branchA
    [r4] aoates: added tagA
    [r5] aoates: added filec
    [r6] aoates: added bad
    [r7] aoates: added bad tag
    pulled 4 revisions
    updating to branch default
    4 files updated, 0 files merged, 0 files removed, 0 files unresolved
    
    ~/svn-test$ cd hg
    ~/svn-test/hg$ hg log -q
    7:b55fffe8931e
    6:c6426c6b0ffa
    5:2aa4055d5ef3
    4:257c7ef8c87a
    3:d4e6d49faf15
    2:9124e136f561
    1:09cbc6f6e0a5
    0:098e7caf93a6
    
    ~/svn-test/hg$ hg pull -u
    pulling from file:///home/aoates/svn-test/repo
    [r7] aoates: added bad tag
    no changes found
    ~/svn-test/hg$ hg log -q
    9:d2fadc0714c3      # two new revisions pulled :(
    8:8cabf916f35f
    7:b55fffe8931e
    6:c6426c6b0ffa
    5:2aa4055d5ef3
    4:257c7ef8c87a
    3:d4e6d49faf15
    2:9124e136f561
    1:09cbc6f6e0a5
    0:098e7caf93a6
    
    ~/svn-test/hg$ hg pull -u
    pulling from file:///home/aoates/svn-test/repo
    [r7] aoates: added bad tag
    no changes found
    ~/svn-test/hg$ hg log -q
    11:5b5f064e45c9     # another two new revisions pulled :(
    10:49d9d3fa63a4
    9:d2fadc0714c3
    8:8cabf916f35f
    7:b55fffe8931e
    6:c6426c6b0ffa
    5:2aa4055d5ef3
    4:257c7ef8c87a
    3:d4e6d49faf15
    2:9124e136f561
    1:09cbc6f6e0a5
    0:098e7caf93a6
    
  5. Log in to comment