[issue2644] Subrepo commit fails if .hgsub includes backslash and path specified on command-line
Tim Henigan
bugs at mercurial.selenic.com
Tue Feb 15 21:19:24 UTC 2011
New submission from Tim Henigan <tim.henigan at gmail.com>:
If the subrepo definition in .hgsub includes a backslash in the path on the
left-hand side, then commit will fail if the path to the subrepo is
specified.
It fails with the following error:
"abort: <.hgsub right-hand side>: no match under directory!"
If the subrepo is definition in .hgsub includes a forward slash, then the
commit completes without error.
+--------+
| Setup |
+--------+
rm -rf test_repo
hg init test_repo
echo test > test_repo/README.txt
hg ci --addremove -R test_repo -m "commit 1"
hg init test_repo/lib/subrepo
echo test > test_repo/lib/subrepo/README.txt
hg ci --addremove -R test_repo/lib/subrepo -m "commit 1"
echo lib\subrepo=lib/subrepo > test_repo/.hgsub
hg ci --addremove -R test_repo -m "commit 2, added subrepo"
echo setup complete >> test_repo/lib/subrepo/README.txt
hg ci --addremove -R test_repo/lib/subrepo -m "commit 2"
+--------+
| Tests |
+--------+
$ hg ci -m "test" -- lib/subrepo
abort: lib/subrepo: no match under directory!
$ hg ci -m "test" -- lib\subrepo
abort: lib/subrepo: no match under directory!
$ hg ci -m "test"
committing subrepository lib\subrepo
I tested this with various versions of Mercurial up to v1.7.5 (on WinXP and
Win7 32-bit).
----------
messages: 15260
nosy: sborho, thenigan
priority: bug
status: unread
title: Subrepo commit fails if .hgsub includes backslash and path specified on command-line
topic: subrepo
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2644>
____________________________________________________
More information about the Mercurial-devel
mailing list