##// END OF EJS Templates
tests: unify test-clone-update-order
Adrian Buehlmann -
r12286:63352a7a default
parent child Browse files
Show More
@@ -1,66 +1,110 b''
1 #!/bin/sh
1 $ hg init
2 $ echo foo > bar
3 $ hg commit -Am default
4 adding bar
5 $ hg up -r null
6 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
7 $ hg branch mine
8 marked working directory as branch mine
9 $ echo hello > world
10 $ hg commit -Am hello
11 adding world
12 $ hg up -r null
13 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
14 $ hg branch other
15 marked working directory as branch other
16 $ echo good > bye
17 $ hg commit -Am other
18 adding bye
19 $ hg up -r mine
20 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
21
22 $ hg clone -U -u . .#other ../b -r 0 -r 1 -r 2 -b other
23 abort: cannot specify both --noupdate and --updaterev
2
24
3 echo
25 $ hg clone -U .#other ../b -r 0 -r 1 -r 2 -b other
4 echo % prepare repo a
26 requesting all changes
5 mkdir a
27 adding changesets
6 cd a
28 adding manifests
7 hg init
29 adding file changes
8 echo foo > bar
30 added 3 changesets with 3 changes to 3 files (+2 heads)
9 hg commit -Am default
31 $ rm -rf ../b
10 hg up -r null
11 hg branch mine
12 echo hello > world
13 hg commit -Am hello
14 hg up -r null
15 hg branch other
16 echo good > bye
17 hg commit -Am other
18 hg up -r mine
19
32
20 echo % test -U -u
33 $ hg clone -u . .#other ../b -r 0 -r 1 -r 2 -b other
21 hg clone -U -u . .#other ../b -r 0 -r 1 -r 2 -b other
34 requesting all changes
35 adding changesets
36 adding manifests
37 adding file changes
38 added 3 changesets with 3 changes to 3 files (+2 heads)
39 updating to branch mine
40 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
41 $ rm -rf ../b
22
42
23 echo % test -U
43 $ hg clone -u 0 .#other ../b -r 0 -r 1 -r 2 -b other
24 hg clone -U .#other ../b -r 0 -r 1 -r 2 -b other
44 requesting all changes
25 rm -rf ../b
45 adding changesets
26
46 adding manifests
27 echo % test -u .
47 adding file changes
28 hg clone -u . .#other ../b -r 0 -r 1 -r 2 -b other
48 added 3 changesets with 3 changes to 3 files (+2 heads)
29 rm -rf ../b
49 updating to branch default
50 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
51 $ rm -rf ../b
30
52
31 echo % test -u 0
53 $ hg clone -u 1 .#other ../b -r 0 -r 1 -r 2 -b other
32 hg clone -u 0 .#other ../b -r 0 -r 1 -r 2 -b other
54 requesting all changes
33 rm -rf ../b
55 adding changesets
34
56 adding manifests
35 echo % test -u 1
57 adding file changes
36 hg clone -u 1 .#other ../b -r 0 -r 1 -r 2 -b other
58 added 3 changesets with 3 changes to 3 files (+2 heads)
37 rm -rf ../b
59 updating to branch mine
60 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
61 $ rm -rf ../b
38
62
39 echo % test -u 2
63 $ hg clone -u 2 .#other ../b -r 0 -r 1 -r 2 -b other
40 hg clone -u 2 .#other ../b -r 0 -r 1 -r 2 -b other
64 requesting all changes
41 rm -rf ../b
65 adding changesets
66 adding manifests
67 adding file changes
68 added 3 changesets with 3 changes to 3 files (+2 heads)
69 updating to branch other
70 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
71 $ rm -rf ../b
42
72
43 echo % test -r 0
73 Test -r mine ... mine is ignored:
44 hg clone -u 2 .#other ../b -r 0 -r 1 -r 2 -b other
45 rm -rf ../b
46
74
47 echo % test -r mine ... mine is ignored
75 $ hg clone -u 2 .#other ../b -r mine -r 0 -r 1 -r 2 -b other
48 hg clone -u 2 .#other ../b -r mine -r 0 -r 1 -r 2 -b other
76 requesting all changes
49 rm -rf ../b
77 adding changesets
50
78 adding manifests
51 echo % test -b default
79 adding file changes
52 hg clone .#other ../b -b default -b mine
80 added 3 changesets with 3 changes to 3 files (+2 heads)
53 rm -rf ../b
81 updating to branch other
82 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
83 $ rm -rf ../b
54
84
55 echo % test #other
85 $ hg clone .#other ../b -b default -b mine
56 hg clone .#other ../b
86 requesting all changes
57 rm -rf ../b
87 adding changesets
88 adding manifests
89 adding file changes
90 added 3 changesets with 3 changes to 3 files (+2 heads)
91 updating to branch default
92 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
93 $ rm -rf ../b
58
94
59 echo % test tip
95 $ hg clone .#other ../b
60 hg clone -U . ../c -r 1 -r 2 > /dev/null
96 requesting all changes
61 hg clone ../c ../b
97 adding changesets
62 rm -rf ../b ../c
98 adding manifests
63 cd ..
99 adding file changes
100 added 1 changesets with 1 changes to 1 files
101 updating to branch other
102 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
103 $ rm -rf ../b
64
104
65 rm -rf a
105 $ hg clone -U . ../c -r 1 -r 2 > /dev/null
66 exit 0
106 $ hg clone ../c ../b
107 updating to branch other
108 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
109 $ rm -rf ../b ../c
110
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now