File: test-clone-update-order

package info (click to toggle)
mercurial 1.6.4-1%2Bdeb6u1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 17,928 kB
  • ctags: 6,062
  • sloc: python: 44,238; sh: 20,985; tcl: 3,578; ansic: 2,557; lisp: 1,412; makefile: 176; xml: 15
file content (66 lines) | stat: -rwxr-xr-x 1,159 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/sh

echo
echo % prepare repo a
mkdir a
cd a
hg init
echo foo > bar
hg commit -Am default
hg up -r null
hg branch mine
echo hello > world
hg commit -Am hello
hg up -r null
hg branch other
echo good > bye
hg commit -Am other
hg up -r mine

echo % test -U -u
hg clone -U -u . .#other ../b -r 0 -r 1 -r 2 -b other

echo % test -U
hg clone -U .#other ../b -r 0 -r 1 -r 2 -b other
rm -rf ../b

echo % test -u .
hg clone -u . .#other ../b -r 0 -r 1 -r 2 -b other
rm -rf ../b

echo % test -u 0
hg clone -u 0 .#other ../b -r 0 -r 1 -r 2 -b other
rm -rf ../b

echo % test -u 1
hg clone -u 1 .#other ../b -r 0 -r 1 -r 2 -b other
rm -rf ../b

echo % test -u 2
hg clone -u 2 .#other ../b -r 0 -r 1 -r 2 -b other
rm -rf ../b

echo % test -r 0
hg clone -u 2 .#other ../b -r 0 -r 1 -r 2 -b other
rm -rf ../b

echo % test -r mine ... mine is ignored
hg clone -u 2 .#other ../b -r mine -r 0 -r 1 -r 2 -b other
rm -rf ../b

echo % test -b default
hg clone .#other ../b -b default -b mine
rm -rf ../b

echo % test #other
hg clone .#other ../b
rm -rf ../b

echo % test tip
hg clone -U . ../c -r 1 -r 2 > /dev/null
hg clone ../c ../b
rm -rf ../b ../c
cd ..

rm -rf a
exit 0