Point to a subdirectory of a copied directory which has not been modified since the copy. Subversion shows the last changed revision as a revision before the url existed. 1) svn mkdir ^/trunk/asubdir 2) svn copy ^/trunk ^/branches/xyz 3) echo "mysub = [svn] .../branches/xyz/asubdir" > .hgsub 4) svn co .../branches/xyz/asubdir mysub 5) hg commit 6) hg up -r-2 && hg up path doesn't exist, because the revision is the 'last changed' revision instead of the current revision.
Fix submitted here: http://selenic.com/pipermail/mercurial-devel/2012-April/039594.html Thank you for the report.
Fixed by http://selenic.com/repo/hg/rev/ae2664ee0223 Patrick Mezard <patrick@mezard.eu> subrepo/svn: fix checked out rev number retrieval (issue2968) (please test the fix)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:22 EDT --- This bug was previously known as _bug_ 2968 at http://mercurial.selenic.com/bts/issue2968 Bug Status was UNCONFIRMED but everconfirmed was true Setting status to CONFIRMED
With svn 1.6.12 tests run fine, but with 1.5.1 the following error occurs: --- /home/hg/crew-stable/tests/test-subrepo-svn.t +++ /home/hg/crew-stable/tests/test-subrepo-svn.t.err @@ -596,10 +596,10 @@ $ echo "subdir = [svn] $SVNREPO/branches/somebranch/subdir" > .hgsub $ hg add .hgsub $ hg ci -m addsub + file://$TESTTMP/svn-repo/branches/somebranch/subdir@14: (Not a valid URL) $ hg up null 0 files updated, 0 files merged, 2 files removed, 0 files unresolved $ hg up - A *subdir/a (glob) - Checked out revision 15. - 2 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd .. + abort: svn: URL 'file://$TESTTMP/svn-repo/branches/somebranch/subdir' doesn't exist + [255] + $ cd ..
The problem is caused "svn info" returning exit code 0 with subversion 1.5.1
Using svn list instead of svn info is the solution. Fix pushed to crew-stable and merged to crew: http://hg.intevation.org/mercurial/crew/rev/ba0286e149aa changeset: 17035:ba0286e149aa branch: stable user: Thomas Arendsen Hein <thomas@intevation.de> date: Tue Jun 26 14:27:33 2012 +0200 summary: subrepo/svn: make rev number retrieval compatible with svn 1.5 (issue2968)
Fixed in 2.2.3 by: ba0286e149aa subrepo/svn: make rev number retrieval compatible with svn 1.5