Issue #303 new

Handle cyclic reference in repository tree

JRS
created an issue

I coped the whole branch subtree into new branch in svn by mistake. So I think I created cyclic reference (prj\branches\new\branches\new....). Then I removed the branch and create new one with right content. But hg pull can't continue after this. It just show: [rXXX] Comment to revision with cyclic content.

I am waiting whole day and night - nothing.

Comments (8)

  1. JRS reporter

    Upd.: After I click Ctrl-C (after 20 hours working) it wrote "no changes found". The following hg pull continued correct with sub-sequenced revision. So now I have the correct "copy" of SVN in my HG repository.

  2. Yonggang Luo

    This is my convert result.

    D:\CI\bld\module-starter>hg log -G
    o  changeset:   25:356beb4fa316
    |  branch:      Simple-Granular
    |  tag:         tip
    |  user:        cjcollier@bb7b6759-d628-0410-895d-7b6b7dc49dde
    |  date:        Tue May 08 02:12:06 2007 +0000
    |  summary:     1.43_02 Wed Apr 25 09:37:00 PDT 2007    <cjac@colliertech.org>
    |
    o  changeset:   24:297cde33a07c
    |  branch:      Simple-Granular
    |  user:        cjcollier@bb7b6759-d628-0410-895d-7b6b7dc49dde
    |  date:        Mon Apr 30 23:17:46 2007 +0000
    |  summary:     1.43_02 Wed Apr 25 09:37:00 PDT 2007    <cjac@colliertech.org>
    |
    o  changeset:   23:0dc49ead91ad
    |  branch:      Simple-Granular
    |  user:        cjcollier@bb7b6759-d628-0410-895d-7b6b7dc49dde
    |  date:        Wed Apr 25 21:53:31 2007 +0000
    |  summary:     forgot to bump the version.
    |
    o  changeset:   22:59c0ba12eb41
    |  branch:      Simple-Granular
    |  user:        cjcollier@bb7b6759-d628-0410-895d-7b6b7dc49dde
    |  date:        Wed Apr 25 21:49:36 2007 +0000
    |  summary:     1.43_02 Wed Apr 25 09:37:00 PDT 2007    <cjac@colliertech.org>
    |
    o  changeset:   21:5ba22ec444cf
    |  branch:      Simple-Granular
    |  parent:      19:9df072bbcda9
    |  user:        cjcollier@bb7b6759-d628-0410-895d-7b6b7dc49dde
    |  date:        Wed Apr 25 16:40:21 2007 +0000
    |  summary:     1.43_02 Wed Apr 25 09:37:00 PDT 2007    <cjac@colliertech.org>
    |
    | o  changeset:   20:afb4bf087340
    | |  branch:      cjcollier
    | |  parent:      18:fc1d6a0ac259
    | |  user:        cjcollier@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | |  date:        Wed Apr 25 15:08:55 2007 +0000
    | |  summary:     Andy suggested a better name for the branch
    | |
    o |  changeset:   19:9df072bbcda9
    |/   branch:      Simple-Granular
    |    user:        cjcollier@bb7b6759-d628-0410-895d-7b6b7dc49dde
    |    date:        Wed Apr 25 15:08:55 2007 +0000
    |    summary:     Andy suggested a better name for the branch
    |
    o  changeset:   18:fc1d6a0ac259
    |  branch:      cjcollier
    |  parent:      15:5f5fec77e5e3
    |  user:        cjcollier@bb7b6759-d628-0410-895d-7b6b7dc49dde
    |  date:        Wed Apr 25 14:56:27 2007 +0000
    |  summary:     branched for development on Simple.pm
    |
    | o  changeset:   17:b9753a8322bb
    | |  branch:      /x
    | |  parent:      13:50ff930227f3
    | |  user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | |  date:        Wed Apr 25 14:54:23 2007 +0000
    | |  summary:     Removing old temp dir
    | |
    | | o  changeset:   16:3353f1b24af0
    | | |  parent:      14:9633280013b6
    | | |  user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | | |  date:        Wed Apr 25 14:50:16 2007 +0000
    | | |  summary:     moving trunk
    | | |
    o---+  changeset:   15:5f5fec77e5e3
    | | |  parent:      14:9633280013b6
    | | |  parent:      11:57c9719ab85c
    | | |  user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | | |  date:        Wed Apr 25 14:50:16 2007 +0000
    | | |  summary:     moving trunk
    | | |
    | | o  changeset:   14:9633280013b6
    | | |  parent:      10:3d78c016fd63
    | | |  user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | | |  date:        Wed Apr 25 14:49:43 2007 +0000
    | | |  summary:     moving trunk
    | | |
    | o |  changeset:   13:50ff930227f3
    | | |  branch:      /x
    | | |  parent:      1:fd96de5753ae
    | | |  user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | | |  date:        Wed Apr 25 14:49:43 2007 +0000
    | | |  summary:     moving trunk
    | | |
    | | | o  changeset:   12:a8133acebda5
    | | |/   parent:      10:3d78c016fd63
    | | |    user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | | |    date:        Wed Apr 25 14:49:43 2007 +0000
    | | |    summary:     moving trunk
    | | |
    o | |  changeset:   11:57c9719ab85c
    |/ /   parent:      1:fd96de5753ae
    | |    user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | |    date:        Wed Apr 25 14:49:43 2007 +0000
    | |    summary:     moving trunk
    | |
    | o  changeset:   10:3d78c016fd63
    | |  user:        rsignes@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | |  date:        Wed Mar 28 16:23:12 2007 +0000
    | |  summary:     prep to release dev version
    | |
    | o  changeset:   9:6538a8c3ce9f
    | |  user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | |  date:        Tue Feb 13 16:59:40 2007 +0000
    | |  summary:     More little Perl::Critic cleanups
    | |
    | o  changeset:   8:f8667e065ec8
    | |  user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | |  date:        Thu Feb 08 19:06:58 2007 +0000
    | |  summary:     croak instead of die
    | |
    | o  changeset:   7:de54b3a29473
    | |  user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | |  date:        Wed Feb 07 21:18:34 2007 +0000
    | |  summary:     More P::C fixes
    | |
    | o  changeset:   6:d7e311cdf60c
    | |  user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | |  date:        Wed Feb 07 07:45:09 2007 +0000
    | |  summary:     lots of exciting Perl::Critic cleanups
    | |
    | o  changeset:   5:5c04cf039878
    | |  user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | |  date:        Wed Feb 07 00:21:23 2007 +0000
    | |  summary:     Added Curtis' Build.PL patch
    | |
    | o  changeset:   4:961e8ef4917d
    | |  user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | |  date:        Tue Feb 06 23:43:37 2007 +0000
    | |  summary:     Added Marcus Ramberg Module::Install patch
    | |
    | o  changeset:   3:463e32ab2d70
    | |  user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    | |  date:        Tue Feb 06 22:35:26 2007 +0000
    | |  summary:     importing latest trunk from my local, at-home repository
    | |
    | o  changeset:   2:708734a7eabe
    |    parent:      -1:000000000000
    |    user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    |    date:        Tue Feb 06 22:33:43 2007 +0000
    |    summary:     skeleton
    |
    o  changeset:   1:fd96de5753ae
    |  user:        petdance@bb7b6759-d628-0410-895d-7b6b7dc49dde
    |  date:        Tue Feb 06 22:33:43 2007 +0000
    |  summary:     skeleton
    |
    o  changeset:   0:ab5761f5cd3a
       user:        (no author)@bb7b6759-d628-0410-895d-7b6b7dc49dde
       date:        Tue Feb 06 22:29:56 2007 +0000
       summary:     Initial directory structure.
    
    
    D:\CI\bld\module-starter>
    
  3. JRS reporter

    I pull the fork locally but seems it doesn't resolve the issue (not sure). During pull I have some merge conflicts and not sure that I correct resolved them.

    BTW the issue easy to reproduce (all copy operation are on server side):

    1. create standard repository structure prj/trunk, prj/branches
    2. commit something to trunk
    3. create correct branch (copy from prj/trunk to prj/branches/1)
    4. commit something to branch 1
    5. create wrong branch (copy from prj/branches to prj/branches/2)

    branch 2 now contains ref to its parent.

  4. JRS reporter

    Manual work around:

    Lets wrong revision in SVN is 3994 (create wrong branch). Next revision (3995) in SVN removes wrong branch. To skip these wrong revisions just create too fake change sets in local hg repository:

    • hg up null
    • hg branch wrong svn r3994
    • hg commit --message=Open
    • hg commit --message=Close --close-branch

    Then update .hg/svn/lastpulled with value 3995, and .hg/svn/rev_map with

    3994 ##here copy/paste hash of the first fake changeset## wrong svn r3994
    3995 ##here copy/paste hash of the second fake changeset## wrong svn r3994
    

    After that hg pull continue work with next revision after 3995

  5. JRS reporter

    Update to work around:

    It is enough to update the file .hg/svn/lastpulled with value of SVN revision which you want to skip.

  6. Log in to comment