Mercurial > hg
annotate tests/test-clone @ 11385:e5a2134c083b
revset: nicer exception for empty queries
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 18 Jun 2010 17:34:13 -0500 |
parents | 07e425d63dbd |
children | be5e86c80628 |
rev | line source |
---|---|
834
78a9f95766dc
Use sh instead of bash in tests.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
814
diff
changeset
|
1 #!/bin/sh |
550 | 2 |
6947
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
3 echo |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
4 echo % prepare repo a |
550 | 5 mkdir a |
6 cd a | |
7 hg init | |
8 echo a > a | |
9 hg add a | |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7927
diff
changeset
|
10 hg commit -m test |
6947
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
11 echo first line > b |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
12 hg add b |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
13 # create a non-inlined filelog |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
14 python -c 'for x in range(10000): print x' >> data1 |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
15 for j in 0 1 2 3 4 5 6 7 8 9; do |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
16 cat data1 >> b |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7927
diff
changeset
|
17 hg commit -m test |
6947
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
18 done |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
19 echo % "list files in store/data (should show a 'b.d')" |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
20 for i in .hg/store/data/*; do |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
21 echo $i |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
22 done |
550 | 23 |
6947
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
24 echo |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
25 echo % default operation |
550 | 26 hg clone . ../b |
27 cd ../b | |
28 cat a | |
29 hg verify | |
30 | |
6947
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
31 echo |
11295
07e425d63dbd
tests: use --debug on test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
9996
diff
changeset
|
32 echo % no update, with debug option |
07e425d63dbd
tests: use --debug on test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
9996
diff
changeset
|
33 hg --debug clone -U . ../c |
550 | 34 cd ../c |
1926
ba198d17eea9
changes by John Levon to standardize some erroroutput
Peter van Dijk <peter@dataloss.nl>
parents:
839
diff
changeset
|
35 cat a 2>/dev/null || echo "a not present" |
550 | 36 hg verify |
37 | |
6947
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
38 echo |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
39 echo % default destination |
550 | 40 mkdir ../d |
41 cd ../d | |
42 hg clone ../a | |
43 cd a | |
44 hg cat a | |
5225
76c4cadb49fc
clone: remove "file://" before making the path absolute
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
1926
diff
changeset
|
45 |
6947
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
46 echo |
9996
2770d03ae49f
handle file URIs correctly, according to RFC 2396 (issue1153)
Sune Foldager <cryo@cyanite.org>
parents:
9714
diff
changeset
|
47 echo % "check that we drop the file: from the path before" |
6947
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
48 echo % "writing the .hgrc" |
5225
76c4cadb49fc
clone: remove "file://" before making the path absolute
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
1926
diff
changeset
|
49 cd ../.. |
9996
2770d03ae49f
handle file URIs correctly, according to RFC 2396 (issue1153)
Sune Foldager <cryo@cyanite.org>
parents:
9714
diff
changeset
|
50 hg clone file:a e |
5225
76c4cadb49fc
clone: remove "file://" before making the path absolute
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
1926
diff
changeset
|
51 grep 'file:' e/.hg/hgrc |
76c4cadb49fc
clone: remove "file://" before making the path absolute
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
1926
diff
changeset
|
52 |
6947
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
53 echo |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
54 echo % check that path aliases are expanded |
6088
3b96cefc1b2b
clone: expand the path before saving it in .hg/hgrc
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5225
diff
changeset
|
55 hg clone -q -U --config 'paths.foobar=a#0' foobar f |
3b96cefc1b2b
clone: expand the path before saving it in .hg/hgrc
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5225
diff
changeset
|
56 hg -R f showconfig paths.default | sed -e 's,.*/,,' |
3b96cefc1b2b
clone: expand the path before saving it in .hg/hgrc
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5225
diff
changeset
|
57 |
6947
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
58 echo |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
59 echo % use --pull |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
60 hg clone --pull a g |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
61 hg -R g verify |
a7fcb43af82e
increase code coverage of test-clone
Adrian Buehlmann <adrian@cadifra.com>
parents:
6088
diff
changeset
|
62 |
7927
a218ba5f60df
allow clone into existing but empty directories
Steve Borho <steve@borho.org>
parents:
6947
diff
changeset
|
63 echo |
a218ba5f60df
allow clone into existing but empty directories
Steve Borho <steve@borho.org>
parents:
6947
diff
changeset
|
64 echo % clone to '.' |
a218ba5f60df
allow clone into existing but empty directories
Steve Borho <steve@borho.org>
parents:
6947
diff
changeset
|
65 mkdir h |
a218ba5f60df
allow clone into existing but empty directories
Steve Borho <steve@borho.org>
parents:
6947
diff
changeset
|
66 cd h |
a218ba5f60df
allow clone into existing but empty directories
Steve Borho <steve@borho.org>
parents:
6947
diff
changeset
|
67 hg clone ../a . |
a218ba5f60df
allow clone into existing but empty directories
Steve Borho <steve@borho.org>
parents:
6947
diff
changeset
|
68 cd .. |
a218ba5f60df
allow clone into existing but empty directories
Steve Borho <steve@borho.org>
parents:
6947
diff
changeset
|
69 |
9714
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
70 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
71 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
72 echo % "*** tests for option -u ***" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
73 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
74 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
75 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
76 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
77 echo % "adding some more history to repo a" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
78 cd a |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
79 echo % "tag ref1" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
80 hg tag ref1 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
81 echo the quick brown fox >a |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
82 hg ci -m "hacked default" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
83 echo % "updating back to ref1" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
84 hg up ref1 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
85 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
86 echo % "add branch 'stable' to repo a for later tests" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
87 hg branch stable |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
88 echo some text >a |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
89 hg ci -m "starting branch stable" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
90 echo % "tag ref2" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
91 hg tag ref2 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
92 echo some more text >a |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
93 hg ci -m "another change for branch stable" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
94 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
95 echo % "updating back to ref2" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
96 hg up ref2 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
97 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
98 echo % "parents of repo a" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
99 hg parents |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
100 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
101 echo % "repo a has two heads" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
102 hg heads |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
103 cd .. |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
104 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
105 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
106 echo % "testing clone -U -u 1 a ua (must abort)" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
107 hg clone -U -u 1 a ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
108 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
109 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
110 echo % "testing clone -u . a ua" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
111 hg clone -u . a ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
112 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
113 echo % "repo ua has both heads" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
114 hg -R ua heads |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
115 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
116 echo % "same revision checked out in repo a and ua" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
117 hg -R a parents --template "{node|short}\n" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
118 hg -R ua parents --template "{node|short}\n" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
119 rm -r ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
120 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
121 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
122 echo % "testing clone --pull -u . a ua" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
123 hg clone --pull -u . a ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
124 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
125 echo % "repo ua has both heads" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
126 hg -R ua heads |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
127 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
128 echo % "same revision checked out in repo a and ua" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
129 hg -R a parents --template "{node|short}\n" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
130 hg -R ua parents --template "{node|short}\n" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
131 rm -r ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
132 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
133 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
134 echo % "testing clone -u stable a ua" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
135 hg clone -u stable a ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
136 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
137 echo % "repo ua has both heads" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
138 hg -R ua heads |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
139 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
140 echo % "branch stable is checked out" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
141 hg -R ua parents |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
142 rm -r ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
143 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
144 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
145 echo % "testing clone a ua" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
146 hg clone a ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
147 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
148 echo % "repo ua has both heads" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
149 hg -R ua heads |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
150 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
151 echo % "branch default is checked out" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
152 hg -R ua parents |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
153 rm -r ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
154 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
155 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
156 echo % "testing clone -u . a#stable ua" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
157 hg clone -u . a#stable ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
158 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
159 echo % "repo ua has only branch stable" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
160 hg -R ua heads |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
161 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
162 echo % "same revision checked out in repo a and ua" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
163 hg -R a parents --template "{node|short}\n" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
164 hg -R ua parents --template "{node|short}\n" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
165 rm -r ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
166 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
167 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
168 echo % "testing clone -u . -r stable a ua" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
169 hg clone -u . -r stable a ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
170 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
171 echo % "repo ua has only branch stable" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
172 hg -R ua heads |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
173 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
174 echo % "same revision checked out in repo a and ua" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
175 hg -R a parents --template "{node|short}\n" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
176 hg -R ua parents --template "{node|short}\n" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
177 rm -r ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
178 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
179 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
180 echo % "testing clone -r stable a ua" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
181 hg clone -r stable a ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
182 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
183 echo % "repo ua has only branch stable" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
184 hg -R ua heads |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
185 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
186 echo % "branch stable is checked out" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
187 hg -R ua parents |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
188 rm -r ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
189 |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
190 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
191 echo % "testing clone -u . -r stable -r default a ua" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
192 hg clone -u . -r stable -r default a ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
193 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
194 echo % "repo ua has two heads" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
195 hg -R ua heads |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
196 echo |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
197 echo % "same revision checked out in repo a and ua" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
198 hg -R a parents --template "{node|short}\n" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
199 hg -R ua parents --template "{node|short}\n" |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
200 rm -r ua |
2f1ab7f77ddc
clone: add option -u/--updaterev
Adrian Buehlmann <adrian@cadifra.com>
parents:
8167
diff
changeset
|
201 |
5225
76c4cadb49fc
clone: remove "file://" before making the path absolute
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
1926
diff
changeset
|
202 exit 0 |