[issue2752] svn subrepos can disallow history navigation when history refers to different subrepo urls (or revisions)

Philip Jenvey bugs at mercurial.selenic.com
Mon Apr 4 23:40:54 UTC 2011


New submission from Philip Jenvey <pjenvey at underboss.org>:

I've noticed a problem while attempting to migrate the Jython subversion 
repository to hg 1.8.1+svn subrepos.

Jython has an svn:externals to CPython's Lib directory. Say jython's trunk 
is targeting Python 2.6 compatibility, it points its CPythonLib dir to:

CPythonLib https://svn.python.org/projects/python/branches/release26-
maint/Lib

The older 2.5 branch might point to the 2.5 release version:

CPythonLib https://svn.python.org/projects/python/branches/release25-
maint/Lib

Once transferred to hg with [svn] subrepos, the subrepo prevents me from 
downgrading to an older revision in the repo with an older external subrepos 
svn URL.

E.g. Going from default to the 2.5 branch:

# Go to tip on default
$ hg up
A    /Users/pjenvey/src/java/pymigr/jython-hg-small/CPythonLib/fractions.py
<snip>
U   /Users/pjenvey/src/java/pymigr/jython-hg-small/CPythonLib
Checked out revision 88766.
1808 files updated, 0 files merged, 0 files removed, 0 files unresolved
# Then going to 2.5
$ hg up 2.5
abort: svn: '/Users/pjenvey/src/java/pymigr/jython-hg-small/CPythonLib' is 
already a working copy for a different URL
# No love from -C either
$ hg revert -a
reverting .hgignore
<snip>
reverting tests/java/org/python/core/StringFormatTest.java
$ hg up -C 2.5
abort: svn: '/Users/pjenvey/src/java/pymigr/jython-hg-small/CPythonLib' is 
already a working copy for a different URL

The only way I can successfully get to the 2.5 branch is to revert the 
working directory, move the CPythonLib dir out of the way, rm .hgsub & 
.hgsubstate, then hg up -C 2.5

Here's a reproduction case:

$ hg init r
$ cd r
$ echo "msilib = [svn] 
https://svn.python.org/projects/python/branches/release26-maint/Lib/msilib" 
> .hgsub
$ hg add .hgsub 
$ svn co https://svn.python.org/projects/python/branches/release26-
maint/Lib/msilib
A    msilib/sequence.py
A    msilib/__init__.py
A    msilib/schema.py
A    msilib/text.py
 U   msilib
Checked out revision 88810.
$ hg commit -m "added 2.6 externals"
committing subrepository msilib
$ ls -a
.           ..          .hg         .hgsub      .hgsubstate msilib
$ cat .hgsub
msilib = [svn] https://svn.python.org/projects/python/branches/release26-
maint/Lib/msilib
$ cat .hgsubstate 
73406 msilib
$ echo "msilib = [svn] 
https://svn.python.org/projects/python/branches/release27-maint/Lib/msilib" 
> .hgsub
$ svn switch https://svn.python.org/projects/python/branches/release27-
maint/Lib/msilib msilib
U    msilib/__init__.py
Updated to revision 88810.
$ hg commit -m "2.7 externals"
committing subrepository msilib
$ hg up 0
abort: svn: '/private/tmp/r/msilib' is already a working copy for a 
different URL
$ hg up -C 0
abort: svn: '/private/tmp/r/msilib' is already a working copy for a 
different URL

----------
assignedto: durin42
messages: 15967
nosy: durin42, pjenvey
priority: bug
status: unread
title: svn subrepos can disallow history navigation when history refers to different subrepo urls (or revisions)

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2752>
____________________________________________________


More information about the Mercurial-devel mailing list