Mercurial > hg
comparison tests/test-branch-option @ 10365:d757bc0c7865
interpret repo#name url syntax as branch instead of revision
Previously, the name part of an repo#name url was interpreted as a
revision, similar to using the --rev option. Now it is instead looked
up as a branch first, and if that succeeds all the heads of the branch
will be processed instead of just its tip-most head. If the branch
lookup fails, it will be assumed to be an revision as before (e.g. for
tags).
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Sun, 07 Feb 2010 14:29:07 +0100 |
parents | |
children | a78bfaf988e1 |
comparison
equal
deleted
inserted
replaced
10364:de1e7099d100 | 10365:d757bc0c7865 |
---|---|
1 #!/bin/sh | |
2 | |
3 # test branch selection options | |
4 hg init branch | |
5 cd branch | |
6 hg branch a | |
7 echo a > foo | |
8 hg ci -d '0 0' -Ama | |
9 echo a2 > foo | |
10 hg ci -d '0 0' -ma2 | |
11 hg up 0 | |
12 hg branch c | |
13 echo c > foo | |
14 hg ci -d '0 0' -mc | |
15 cd .. | |
16 hg clone -r 0 branch branch2 | |
17 cd branch2 | |
18 hg up 0 | |
19 hg branch b | |
20 echo b > foo | |
21 hg ci -d '0 0' -mb | |
22 hg up 0 | |
23 hg branch -f b | |
24 echo b2 > foo | |
25 hg ci -d '0 0' -mb2 | |
26 | |
27 echo in rev c branch a | |
28 hg in -qr c ../branch#a | |
29 echo out branch . | |
30 hg out -q ../branch#. | |
31 echo clone branch b | |
32 cd .. | |
33 hg clone branch2#b branch3 | |
34 hg -q -R branch3 heads b | |
35 hg -q -R branch3 parents | |
36 rm -rf branch3 | |
37 echo clone rev a branch b | |
38 hg clone -r a branch2#b branch3 | |
39 hg -q -R branch3 heads b | |
40 hg -q -R branch3 parents | |
41 rm -rf branch3 |