Mercurial > hg
diff tests/test-branch-option @ 11322:3d6915f5a2bb
improve --branch processing (and differentiate from # syntax)
Previously #foo and --branch foo were handled identically.
The behavior of #foo hasn't changed, but --branch now works like this:
1) If branchmap is not supported on the remote, the operation fails.
2) If branch is '.', substitute with branch of the working dir parent.
3) If branch exists remotely, its heads are expanded.
4) Otherwise, the operation fails.
Tests have been added for the new cases.
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Thu, 10 Jun 2010 12:46:09 +0200 |
parents | deaeb2d84d8a |
children |
line wrap: on
line diff
--- a/tests/test-branch-option Sun Jun 06 17:25:00 2010 +0900 +++ b/tests/test-branch-option Thu Jun 10 12:46:09 2010 +0200 @@ -12,6 +12,7 @@ hg branch c echo c > foo hg ci -d '0 0' -mc +hg tag -l z cd .. hg clone -r 0 branch branch2 cd branch2 @@ -32,6 +33,10 @@ echo b2 > foo hg ci -d '0 0' -mb2 +echo unknown branch and fallback +hg in -qbz +hg in -q ../branch#z +hg out -qbz echo in rev c branch a hg in -qr c ../branch#a hg in -qr c -b a