Mercurial > hg
annotate tests/test-mq @ 11353:f2b25e8ea6c1
merge: when current branch has 1 or > 2 heads, actually abort.
Currently merge just prints abort-like messages to stderr and then
exits with a misleading status 0 (cleverly disguised as "False").
With this change it raises Abort, just like every other fatal error.
author | Greg Ward <greg-hg@gerg.ca> |
---|---|
date | Mon, 14 Jun 2010 16:06:52 -0400 |
parents | 6c469f2f9f12 |
children | d8d0fc3988ca |
rev | line source |
---|---|
2729 | 1 #!/bin/sh |
2 | |
11208
2313dc4d9817
tests: fix bashism to load helpers.sh
Yuya Nishihara <yuya@tcha.org>
parents:
11200
diff
changeset
|
3 . $TESTDIR/helpers.sh |
11200
12e5149cafca
strip: improve full backup message
Matt Mackall <mpm@selenic.com>
parents:
11108
diff
changeset
|
4 |
5527
0b3f910dfd17
mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5294
diff
changeset
|
5 checkundo() |
0b3f910dfd17
mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5294
diff
changeset
|
6 { |
0b3f910dfd17
mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5294
diff
changeset
|
7 if [ -f .hg/store/undo ]; then |
0b3f910dfd17
mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5294
diff
changeset
|
8 echo ".hg/store/undo still exists after $1" |
0b3f910dfd17
mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5294
diff
changeset
|
9 fi |
0b3f910dfd17
mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5294
diff
changeset
|
10 } |
0b3f910dfd17
mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5294
diff
changeset
|
11 |
2990
61fcd9fac434
Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2935
diff
changeset
|
12 echo "[extensions]" >> $HGRCPATH |
61fcd9fac434
Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2935
diff
changeset
|
13 echo "mq=" >> $HGRCPATH |
2729 | 14 |
10397
8cb81d75730c
mq: add parent node IDs to MQ patches on qrefresh/qnew
Steve Losh <steve@stevelosh.com>
parents:
10149
diff
changeset
|
15 echo "[mq]" >> $HGRCPATH |
8cb81d75730c
mq: add parent node IDs to MQ patches on qrefresh/qnew
Steve Losh <steve@stevelosh.com>
parents:
10149
diff
changeset
|
16 echo "plain=true" >> $HGRCPATH |
8cb81d75730c
mq: add parent node IDs to MQ patches on qrefresh/qnew
Steve Losh <steve@stevelosh.com>
parents:
10149
diff
changeset
|
17 |
2729 | 18 echo % help |
19 hg help mq | |
20 | |
21 hg init a | |
22 cd a | |
23 echo a > a | |
2848
307439d6fede
mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2846
diff
changeset
|
24 hg ci -Ama |
307439d6fede
mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2846
diff
changeset
|
25 |
307439d6fede
mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2846
diff
changeset
|
26 hg clone . ../k |
307439d6fede
mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2846
diff
changeset
|
27 |
2729 | 28 mkdir b |
29 echo z > b/z | |
30 hg ci -Ama | |
31 | |
32 echo % qinit | |
33 | |
34 hg qinit | |
35 | |
36 cd .. | |
37 hg init b | |
38 | |
39 echo % -R qinit | |
40 | |
41 hg -R b qinit | |
42 | |
43 hg init c | |
44 | |
45 echo % qinit -c | |
46 | |
47 hg --cwd c qinit -c | |
48 hg -R c/.hg/patches st | |
49 | |
4071
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
50 echo '% qinit; qinit -c' |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
51 hg init d |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
52 cd d |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
53 hg qinit |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
54 hg qinit -c |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
55 # qinit -c should create both files if they don't exist |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
56 echo ' .hgignore:' |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
57 cat .hg/patches/.hgignore |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
58 echo ' series:' |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
59 cat .hg/patches/series |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
60 hg qinit -c 2>&1 | sed -e 's/repository.*already/repository already/' |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
61 cd .. |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
62 |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
63 echo '% qinit; <stuff>; qinit -c' |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
64 hg init e |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
65 cd e |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
66 hg qnew A |
5527
0b3f910dfd17
mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5294
diff
changeset
|
67 checkundo qnew |
4071
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
68 echo foo > foo |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
69 hg add foo |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
70 hg qrefresh |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
71 hg qnew B |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
72 echo >> foo |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
73 hg qrefresh |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
74 echo status >> .hg/patches/.hgignore |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
75 echo bleh >> .hg/patches/.hgignore |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
76 hg qinit -c |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
77 hg -R .hg/patches status |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
78 # qinit -c shouldn't touch these files if they already exist |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
79 echo ' .hgignore:' |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
80 cat .hg/patches/.hgignore |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
81 echo ' series:' |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
82 cat .hg/patches/series |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
83 cd .. |
165abe554c80
mq: qinit -c creates a repo even after a regular qinit
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
84 |
10691
a778a367c20b
mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents:
10397
diff
changeset
|
85 echo '% init --mq without repo' |
a778a367c20b
mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents:
10397
diff
changeset
|
86 mkdir f |
a778a367c20b
mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents:
10397
diff
changeset
|
87 cd f |
a778a367c20b
mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents:
10397
diff
changeset
|
88 hg init --mq |
a778a367c20b
mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents:
10397
diff
changeset
|
89 cd .. |
a778a367c20b
mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents:
10397
diff
changeset
|
90 |
10710
47fbbc4845ff
mq: test for init --mq with a destination argument
Cédric Duval <cedricduval@free.fr>
parents:
10691
diff
changeset
|
91 echo '% init --mq with repo path' |
47fbbc4845ff
mq: test for init --mq with a destination argument
Cédric Duval <cedricduval@free.fr>
parents:
10691
diff
changeset
|
92 hg init g |
47fbbc4845ff
mq: test for init --mq with a destination argument
Cédric Duval <cedricduval@free.fr>
parents:
10691
diff
changeset
|
93 hg init --mq g |
47fbbc4845ff
mq: test for init --mq with a destination argument
Cédric Duval <cedricduval@free.fr>
parents:
10691
diff
changeset
|
94 test -d g/.hg/patches/.hg && echo "ok" || echo "failed" |
47fbbc4845ff
mq: test for init --mq with a destination argument
Cédric Duval <cedricduval@free.fr>
parents:
10691
diff
changeset
|
95 |
10691
a778a367c20b
mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents:
10397
diff
changeset
|
96 echo '% init --mq with nonexistent directory' |
a778a367c20b
mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents:
10397
diff
changeset
|
97 hg init --mq nonexistentdir |
a778a367c20b
mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents:
10397
diff
changeset
|
98 |
a778a367c20b
mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents:
10397
diff
changeset
|
99 echo '% init --mq with bundle (non "local")' |
a778a367c20b
mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents:
10397
diff
changeset
|
100 hg -R a bundle --all a.bundle >/dev/null |
a778a367c20b
mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents:
10397
diff
changeset
|
101 hg init --mq a.bundle |
a778a367c20b
mq: fix init with nonexistent or non-local repository
Cédric Duval <cedricduval@free.fr>
parents:
10397
diff
changeset
|
102 |
2729 | 103 cd a |
104 | |
105 hg qnew -m 'foo bar' test.patch | |
106 | |
107 echo % qrefresh | |
108 | |
109 echo a >> a | |
110 hg qrefresh | |
2843
0b9ac7dfcf56
Fix some tests for portability.
Danek Duvall <danek.duvall@sun.com>
parents:
2729
diff
changeset
|
111 sed -e "s/^\(diff -r \)\([a-f0-9]* \)/\1 x/" \ |
2729 | 112 -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
113 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch | |
114 | |
4173
7307d2e98b32
fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4090
diff
changeset
|
115 echo % empty qrefresh |
7307d2e98b32
fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4090
diff
changeset
|
116 |
7307d2e98b32
fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4090
diff
changeset
|
117 hg qrefresh -X a |
7307d2e98b32
fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4090
diff
changeset
|
118 echo 'revision:' |
7307d2e98b32
fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4090
diff
changeset
|
119 hg diff -r -2 -r -1 |
7307d2e98b32
fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4090
diff
changeset
|
120 echo 'patch:' |
7307d2e98b32
fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4090
diff
changeset
|
121 cat .hg/patches/test.patch |
7307d2e98b32
fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4090
diff
changeset
|
122 echo 'working dir diff:' |
7307d2e98b32
fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4090
diff
changeset
|
123 hg diff --nodates -q |
7307d2e98b32
fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4090
diff
changeset
|
124 # restore things |
7307d2e98b32
fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4090
diff
changeset
|
125 hg qrefresh |
5527
0b3f910dfd17
mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5294
diff
changeset
|
126 checkundo qrefresh |
4173
7307d2e98b32
fix qrefresh'ing an empty patch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4090
diff
changeset
|
127 |
2729 | 128 echo % qpop |
129 | |
130 hg qpop | |
5527
0b3f910dfd17
mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5294
diff
changeset
|
131 checkundo qpop |
2729 | 132 |
9151
f528d1a93491
tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
8167
diff
changeset
|
133 echo % qpush with dump of tag cache |
2729 | 134 |
9151
f528d1a93491
tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
8167
diff
changeset
|
135 # Dump the tag cache to ensure that it has exactly one head after qpush. |
f528d1a93491
tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
8167
diff
changeset
|
136 rm -f .hg/tags.cache |
f528d1a93491
tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
8167
diff
changeset
|
137 hg tags > /dev/null |
f528d1a93491
tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
8167
diff
changeset
|
138 echo ".hg/tags.cache (pre qpush):" |
f528d1a93491
tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
8167
diff
changeset
|
139 sed 's/ [0-9a-f]*//' .hg/tags.cache |
2729 | 140 hg qpush |
9151
f528d1a93491
tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
8167
diff
changeset
|
141 hg tags > /dev/null |
f528d1a93491
tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
8167
diff
changeset
|
142 echo ".hg/tags.cache (post qpush):" |
f528d1a93491
tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
8167
diff
changeset
|
143 sed 's/ [0-9a-f]*//' .hg/tags.cache |
f528d1a93491
tags: implement persistent tag caching (issue548).
Greg Ward <greg-hg@gerg.ca>
parents:
8167
diff
changeset
|
144 |
5527
0b3f910dfd17
mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5294
diff
changeset
|
145 checkundo qpush |
2729 | 146 |
147 cd .. | |
148 | |
149 echo % pop/push outside repo | |
150 | |
151 hg -R a qpop | |
152 hg -R a qpush | |
153 | |
154 cd a | |
155 hg qnew test2.patch | |
156 | |
157 echo % qrefresh in subdir | |
158 | |
159 cd b | |
160 echo a > a | |
161 hg add a | |
162 hg qrefresh | |
163 | |
164 echo % pop/push -a in subdir | |
165 | |
166 hg qpop -a | |
167 hg --traceback qpush -a | |
168 | |
11327
6c469f2f9f12
mq: use ui.formatted() instead of ui.plain().
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11208
diff
changeset
|
169 # setting columns & formatted tests truncating (issue1912) |
2729 | 170 echo % qseries |
11327
6c469f2f9f12
mq: use ui.formatted() instead of ui.plain().
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11208
diff
changeset
|
171 COLUMNS=4 hg qseries --config ui.formatted=true |
6c469f2f9f12
mq: use ui.formatted() instead of ui.plain().
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
11208
diff
changeset
|
172 COLUMNS=20 hg qseries --config ui.formatted=true -vs |
3681
05d877dfd33d
fix qseries -v when there are unapplied patches
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3464
diff
changeset
|
173 hg qpop |
05d877dfd33d
fix qseries -v when there are unapplied patches
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3464
diff
changeset
|
174 hg qseries -vs |
11108 | 175 hg sum | grep mq |
3681
05d877dfd33d
fix qseries -v when there are unapplied patches
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3464
diff
changeset
|
176 hg qpush |
11108 | 177 hg sum | grep mq |
2729 | 178 |
179 echo % qapplied | |
180 hg qapplied | |
181 | |
9439
f2acc0c00bec
Backed out premature qprev/qnext removal
Matt Mackall <mpm@selenic.com>
parents:
9365
diff
changeset
|
182 echo % qtop |
f2acc0c00bec
Backed out premature qprev/qnext removal
Matt Mackall <mpm@selenic.com>
parents:
9365
diff
changeset
|
183 hg qtop |
f2acc0c00bec
Backed out premature qprev/qnext removal
Matt Mackall <mpm@selenic.com>
parents:
9365
diff
changeset
|
184 |
9364
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
185 echo % prev |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
186 hg qapp -1 |
2729 | 187 |
9364
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
188 echo % next |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
189 hg qunapp -1 |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
190 |
2729 | 191 hg qpop |
2846
b8d587cfa3bb
mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2843
diff
changeset
|
192 echo % commit should fail |
b8d587cfa3bb
mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2843
diff
changeset
|
193 hg commit |
b8d587cfa3bb
mq: test commit in repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2843
diff
changeset
|
194 |
2848
307439d6fede
mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2846
diff
changeset
|
195 echo % push should fail |
307439d6fede
mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2846
diff
changeset
|
196 hg push ../../k |
307439d6fede
mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2846
diff
changeset
|
197 |
7142
88f1b8081f1c
Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents:
7048
diff
changeset
|
198 echo % import should fail |
88f1b8081f1c
Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents:
7048
diff
changeset
|
199 hg st . |
88f1b8081f1c
Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents:
7048
diff
changeset
|
200 echo foo >> ../a |
88f1b8081f1c
Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents:
7048
diff
changeset
|
201 hg diff > ../../import.diff |
88f1b8081f1c
Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents:
7048
diff
changeset
|
202 hg revert --no-backup ../a |
88f1b8081f1c
Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents:
7048
diff
changeset
|
203 hg import ../../import.diff |
88f1b8081f1c
Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents:
7048
diff
changeset
|
204 hg st |
9867
81f1462ef2c7
Allow import --no-commit over an applied MQ patch.
Brendan Cully <brendan@kublai.com>
parents:
9439
diff
changeset
|
205 echo % import --no-commit should succeed |
81f1462ef2c7
Allow import --no-commit over an applied MQ patch.
Brendan Cully <brendan@kublai.com>
parents:
9439
diff
changeset
|
206 hg import --no-commit ../../import.diff |
81f1462ef2c7
Allow import --no-commit over an applied MQ patch.
Brendan Cully <brendan@kublai.com>
parents:
9439
diff
changeset
|
207 hg st |
81f1462ef2c7
Allow import --no-commit over an applied MQ patch.
Brendan Cully <brendan@kublai.com>
parents:
9439
diff
changeset
|
208 hg revert --no-backup ../a |
7142
88f1b8081f1c
Prevent import over an applied patch (closes issue795)
Brendan Cully <brendan@kublai.com>
parents:
7048
diff
changeset
|
209 |
2729 | 210 echo % qunapplied |
211 hg qunapplied | |
212 | |
3081
760414dc7ac6
Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3027
diff
changeset
|
213 echo % qpush/qpop with index |
760414dc7ac6
Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3027
diff
changeset
|
214 hg qnew test1b.patch |
760414dc7ac6
Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3027
diff
changeset
|
215 echo 1b > 1b |
760414dc7ac6
Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3027
diff
changeset
|
216 hg add 1b |
760414dc7ac6
Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3027
diff
changeset
|
217 hg qrefresh |
760414dc7ac6
Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3027
diff
changeset
|
218 hg qpush 2 |
760414dc7ac6
Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3027
diff
changeset
|
219 hg qpop 0 |
760414dc7ac6
Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3027
diff
changeset
|
220 hg qpush test.patch+1 |
760414dc7ac6
Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3027
diff
changeset
|
221 hg qpush test.patch+2 |
760414dc7ac6
Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3027
diff
changeset
|
222 hg qpop test2.patch-1 |
760414dc7ac6
Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3027
diff
changeset
|
223 hg qpop test2.patch-2 |
760414dc7ac6
Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3027
diff
changeset
|
224 hg qpush test1b.patch+1 |
760414dc7ac6
Added tests for qpush/qpop with index.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
3027
diff
changeset
|
225 |
11064
590b1d6ef50b
mq: qpush --move, reorder patch series and apply only the patch
Mads Kiilerich <mads@kiilerich.com>
parents:
10710
diff
changeset
|
226 echo % qpush --move |
590b1d6ef50b
mq: qpush --move, reorder patch series and apply only the patch
Mads Kiilerich <mads@kiilerich.com>
parents:
10710
diff
changeset
|
227 hg qpop -a |
590b1d6ef50b
mq: qpush --move, reorder patch series and apply only the patch
Mads Kiilerich <mads@kiilerich.com>
parents:
10710
diff
changeset
|
228 hg qpush --move test2.patch # move to front |
590b1d6ef50b
mq: qpush --move, reorder patch series and apply only the patch
Mads Kiilerich <mads@kiilerich.com>
parents:
10710
diff
changeset
|
229 hg qpush --move test1b.patch |
590b1d6ef50b
mq: qpush --move, reorder patch series and apply only the patch
Mads Kiilerich <mads@kiilerich.com>
parents:
10710
diff
changeset
|
230 hg qpush --move test.patch # noop move |
590b1d6ef50b
mq: qpush --move, reorder patch series and apply only the patch
Mads Kiilerich <mads@kiilerich.com>
parents:
10710
diff
changeset
|
231 hg qseries -v |
590b1d6ef50b
mq: qpush --move, reorder patch series and apply only the patch
Mads Kiilerich <mads@kiilerich.com>
parents:
10710
diff
changeset
|
232 hg qpop -a |
590b1d6ef50b
mq: qpush --move, reorder patch series and apply only the patch
Mads Kiilerich <mads@kiilerich.com>
parents:
10710
diff
changeset
|
233 hg qpush --move test.patch # cleaning up |
590b1d6ef50b
mq: qpush --move, reorder patch series and apply only the patch
Mads Kiilerich <mads@kiilerich.com>
parents:
10710
diff
changeset
|
234 hg qpush --move test1b.patch |
590b1d6ef50b
mq: qpush --move, reorder patch series and apply only the patch
Mads Kiilerich <mads@kiilerich.com>
parents:
10710
diff
changeset
|
235 hg qpush --move bogus # nonexistent patch |
590b1d6ef50b
mq: qpush --move, reorder patch series and apply only the patch
Mads Kiilerich <mads@kiilerich.com>
parents:
10710
diff
changeset
|
236 hg qpush --move test.patch # already applied |
590b1d6ef50b
mq: qpush --move, reorder patch series and apply only the patch
Mads Kiilerich <mads@kiilerich.com>
parents:
10710
diff
changeset
|
237 hg qpush |
590b1d6ef50b
mq: qpush --move, reorder patch series and apply only the patch
Mads Kiilerich <mads@kiilerich.com>
parents:
10710
diff
changeset
|
238 |
9364
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
239 echo % pop, qapplied, qunapplied |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
240 hg qseries -v |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
241 echo % qapplied -1 test.patch |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
242 hg qapplied -1 test.patch |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
243 echo % qapplied -1 test1b.patch |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
244 hg qapplied -1 test1b.patch |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
245 echo % qapplied -1 test2.patch |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
246 hg qapplied -1 test2.patch |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
247 echo % qapplied -1 |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
248 hg qapplied -1 |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
249 echo % qapplied |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
250 hg qapplied |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
251 echo % qapplied test1b.patch |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
252 hg qapplied test1b.patch |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
253 echo % qunapplied -1 |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
254 hg qunapplied -1 |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
255 echo % qunapplied |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
256 hg qunapplied |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
257 echo % popping |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
258 hg qpop |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
259 echo % qunapplied -1 |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
260 hg qunapplied -1 |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
261 echo % qunapplied |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
262 hg qunapplied |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
263 echo % qunapplied test2.patch |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
264 hg qunapplied test2.patch |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
265 echo % qunapplied -1 test2.patch |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
266 hg qunapplied -1 test2.patch |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
267 echo % popping -a |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
268 hg qpop -a |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
269 echo % qapplied |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
270 hg qapplied |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
271 echo % qapplied -1 |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
272 hg qapplied -1 |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
273 hg qpush |
c7c2dd7524dd
mq: add options to qapplied/qunapplied to act like qprev/qnext
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9151
diff
changeset
|
274 |
2848
307439d6fede
mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2846
diff
changeset
|
275 echo % push should succeed |
307439d6fede
mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2846
diff
changeset
|
276 hg qpop -a |
307439d6fede
mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2846
diff
changeset
|
277 hg push ../../k |
307439d6fede
mq: do not allow to push from repo with patches applied
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2846
diff
changeset
|
278 |
4101
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
279 echo % qpush/qpop error codes |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
280 errorcode() |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
281 { |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
282 hg "$@" && echo " $@ succeeds" || echo " $@ fails" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
283 } |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
284 |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
285 # we want to start with some patches applied |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
286 hg qpush -a |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
287 echo " % pops all patches and succeeds" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
288 errorcode qpop -a |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
289 echo " % does nothing and succeeds" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
290 errorcode qpop -a |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
291 echo " % fails - nothing else to pop" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
292 errorcode qpop |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
293 echo " % pushes a patch and succeeds" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
294 errorcode qpush |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
295 echo " % pops a patch and succeeds" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
296 errorcode qpop |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
297 echo " % pushes up to test1b.patch and succeeds" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
298 errorcode qpush test1b.patch |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
299 echo " % does nothing and succeeds" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
300 errorcode qpush test1b.patch |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
301 echo " % does nothing and succeeds" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
302 errorcode qpop test1b.patch |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
303 echo " % fails - can't push to this patch" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
304 errorcode qpush test.patch |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
305 echo " % fails - can't pop to this patch" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
306 errorcode qpop test2.patch |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
307 echo " % pops up to test.patch and succeeds" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
308 errorcode qpop test.patch |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
309 echo " % pushes all patches and succeeds" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
310 errorcode qpush -a |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
311 echo " % does nothing and succeeds" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
312 errorcode qpush -a |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
313 echo " % fails - nothing else to push" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
314 errorcode qpush |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
315 echo " % does nothing and succeeds" |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
316 errorcode qpush test2.patch |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
317 |
e2ed92f4c0f7
add some tests for qpush/qpop error codes
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4096
diff
changeset
|
318 |
2729 | 319 echo % strip |
320 cd ../../b | |
321 echo x>x | |
322 hg ci -Ama | |
11200
12e5149cafca
strip: improve full backup message
Matt Mackall <mpm@selenic.com>
parents:
11108
diff
changeset
|
323 hg strip tip | hidebackup |
2729 | 324 hg unbundle .hg/strip-backup/* |
2934
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
325 |
6472
8c4cd80afd3e
mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
326 echo % strip with local changes, should complain |
8c4cd80afd3e
mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
327 hg up |
8c4cd80afd3e
mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
328 echo y>y |
8c4cd80afd3e
mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
329 hg add y |
11200
12e5149cafca
strip: improve full backup message
Matt Mackall <mpm@selenic.com>
parents:
11108
diff
changeset
|
330 hg strip tip | hidebackup |
6472
8c4cd80afd3e
mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
331 echo % --force strip with local changes |
11200
12e5149cafca
strip: improve full backup message
Matt Mackall <mpm@selenic.com>
parents:
11108
diff
changeset
|
332 hg strip -f tip | hidebackup |
6472
8c4cd80afd3e
mq: add --force option to strip
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
333 |
3027
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
334 echo '% cd b; hg qrefresh' |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
335 hg init refresh |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
336 cd refresh |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
337 echo a > a |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7621
diff
changeset
|
338 hg ci -Ama |
3027
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
339 hg qnew -mfoo foo |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
340 echo a >> a |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
341 hg qrefresh |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
342 mkdir b |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
343 cd b |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
344 echo f > f |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
345 hg add f |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
346 hg qrefresh |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
347 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
348 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
349 echo % hg qrefresh . |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
350 hg qrefresh . |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
351 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
352 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" ../.hg/patches/foo |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
353 hg status |
a4374f7331e4
Call patch.diff directly instead of printdiff - this also saves an
Brendan Cully <brendan@kublai.com>
parents:
2990
diff
changeset
|
354 |
3334
534806df5b5a
Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents:
3081
diff
changeset
|
355 echo % qpush failure |
534806df5b5a
Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents:
3081
diff
changeset
|
356 cd .. |
534806df5b5a
Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents:
3081
diff
changeset
|
357 hg qrefresh |
534806df5b5a
Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents:
3081
diff
changeset
|
358 hg qnew -mbar bar |
534806df5b5a
Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents:
3081
diff
changeset
|
359 echo foo > foo |
3464
ba3a96750de0
mq: test case for issue399
Brendan Cully <brendan@kublai.com>
parents:
3334
diff
changeset
|
360 echo bar > bar |
ba3a96750de0
mq: test case for issue399
Brendan Cully <brendan@kublai.com>
parents:
3334
diff
changeset
|
361 hg add foo bar |
3334
534806df5b5a
Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents:
3081
diff
changeset
|
362 hg qrefresh |
534806df5b5a
Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents:
3081
diff
changeset
|
363 hg qpop -a |
534806df5b5a
Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents:
3081
diff
changeset
|
364 echo bar > foo |
534806df5b5a
Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents:
3081
diff
changeset
|
365 hg qpush -a |
3464
ba3a96750de0
mq: test case for issue399
Brendan Cully <brendan@kublai.com>
parents:
3334
diff
changeset
|
366 hg st |
3334
534806df5b5a
Test case for bdiff on buffer objects
Brendan Cully <brendan@kublai.com>
parents:
3081
diff
changeset
|
367 |
4219
6cb5be6bd70f
mq: add qparent tag (first parent of qbase)
Brendan Cully <brendan@kublai.com>
parents:
4182
diff
changeset
|
368 echo % mq tags |
6cb5be6bd70f
mq: add qparent tag (first parent of qbase)
Brendan Cully <brendan@kublai.com>
parents:
4182
diff
changeset
|
369 hg log --template '{rev} {tags}\n' -r qparent:qtip |
6cb5be6bd70f
mq: add qparent tag (first parent of qbase)
Brendan Cully <brendan@kublai.com>
parents:
4182
diff
changeset
|
370 |
5979
b4858eb4b58f
mqrepo: don't abort if the status file has an unknown node
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5534
diff
changeset
|
371 echo % bad node in status |
b4858eb4b58f
mqrepo: don't abort if the status file has an unknown node
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5534
diff
changeset
|
372 hg qpop |
b4858eb4b58f
mqrepo: don't abort if the status file has an unknown node
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5534
diff
changeset
|
373 hg strip -qn tip |
b4858eb4b58f
mqrepo: don't abort if the status file has an unknown node
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5534
diff
changeset
|
374 hg tip 2>&1 | sed -e 's/unknown node .*/unknown node/' |
b4858eb4b58f
mqrepo: don't abort if the status file has an unknown node
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5534
diff
changeset
|
375 hg branches 2>&1 | sed -e 's/unknown node .*/unknown node/' |
7621
6d891df43a5f
mq: allow qpop if popped revisions are not working dir parents
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7296
diff
changeset
|
376 hg qpop 2>&1 | sed -e 's/unknown node .*/unknown node/' |
5979
b4858eb4b58f
mqrepo: don't abort if the status file has an unknown node
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5534
diff
changeset
|
377 |
2990
61fcd9fac434
Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2935
diff
changeset
|
378 cat >>$HGRCPATH <<EOF |
2934
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
379 [diff] |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
380 git = True |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
381 EOF |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
382 cd .. |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
383 hg init git |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
384 cd git |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
385 hg qinit |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
386 |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
387 hg qnew -m'new file' new |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
388 echo foo > new |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
389 chmod +x new |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
390 hg add new |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
391 hg qrefresh |
2935 | 392 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
393 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/new | |
2934
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
394 |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
395 hg qnew -m'copy file' copy |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
396 hg cp new copy |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
397 hg qrefresh |
2935 | 398 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
399 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/copy | |
2934
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
400 |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
401 hg qpop |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
402 hg qpush |
2f190e998eb3
Teach mq about git patches
Brendan Cully <brendan@kublai.com>
parents:
2848
diff
changeset
|
403 hg qdiff |
3697
da262f35fbc8
add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3681
diff
changeset
|
404 cat >>$HGRCPATH <<EOF |
da262f35fbc8
add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3681
diff
changeset
|
405 [diff] |
da262f35fbc8
add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3681
diff
changeset
|
406 git = False |
da262f35fbc8
add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3681
diff
changeset
|
407 EOF |
da262f35fbc8
add --git option to qdiff
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3681
diff
changeset
|
408 hg qdiff --git |
10149
fa7170d6529f
test-mq: better tests delimitation
Patrick Mezard <pmezard@gmail.com>
parents:
10061
diff
changeset
|
409 cd .. |
3699
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
410 |
10149
fa7170d6529f
test-mq: better tests delimitation
Patrick Mezard <pmezard@gmail.com>
parents:
10061
diff
changeset
|
411 echo % test file addition in slow path |
3699
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
412 hg init slow |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
413 cd slow |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
414 hg qinit |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
415 echo foo > foo |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
416 hg add foo |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
417 hg ci -m 'add foo' |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
418 hg qnew bar |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
419 echo bar > bar |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
420 hg add bar |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
421 hg mv foo baz |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
422 hg qrefresh --git |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
423 hg up -C 0 |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
424 echo >> foo |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
425 hg ci -m 'change foo' |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
426 hg up -C 1 |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
427 hg qrefresh --git 2>&1 | grep -v 'saving bundle' |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
428 cat .hg/patches/bar |
10061
9e2ab10728a2
Make {file_copies} usable as a --template key
Patrick Mezard <pmezard@gmail.com>
parents:
10060
diff
changeset
|
429 hg log -v --template '{rev} {file_copies}\n' -r . |
3700
4c158de5f245
qrefresh: fix handling of copies in the fast path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3699
diff
changeset
|
430 hg qrefresh --git |
4c158de5f245
qrefresh: fix handling of copies in the fast path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3699
diff
changeset
|
431 cat .hg/patches/bar |
10061
9e2ab10728a2
Make {file_copies} usable as a --template key
Patrick Mezard <pmezard@gmail.com>
parents:
10060
diff
changeset
|
432 hg log -v --template '{rev} {file_copies}\n' -r . |
4890
bbdcacf7cef8
mq: autodetect an existing git patch during qrefresh (issue 491)
Bryan O'Sullivan <bos@serpentine.com>
parents:
4862
diff
changeset
|
433 hg qrefresh |
bbdcacf7cef8
mq: autodetect an existing git patch during qrefresh (issue 491)
Bryan O'Sullivan <bos@serpentine.com>
parents:
4862
diff
changeset
|
434 grep 'diff --git' .hg/patches/bar |
3699
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
435 |
10149
fa7170d6529f
test-mq: better tests delimitation
Patrick Mezard <pmezard@gmail.com>
parents:
10061
diff
changeset
|
436 echo % test file move chains in the slow path |
3699
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
437 hg up -C 1 |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
438 echo >> foo |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
439 hg ci -m 'change foo again' |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
440 hg up -C 2 |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
441 hg mv bar quux |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
442 hg mv baz bleh |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
443 hg qrefresh --git 2>&1 | grep -v 'saving bundle' |
4bafcf7aeb32
qrefresh: fix handling of added files (including copies) in the slow path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3697
diff
changeset
|
444 cat .hg/patches/bar |
10061
9e2ab10728a2
Make {file_copies} usable as a --template key
Patrick Mezard <pmezard@gmail.com>
parents:
10060
diff
changeset
|
445 hg log -v --template '{rev} {file_copies}\n' -r . |
3700
4c158de5f245
qrefresh: fix handling of copies in the fast path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3699
diff
changeset
|
446 hg mv quux fred |
4c158de5f245
qrefresh: fix handling of copies in the fast path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3699
diff
changeset
|
447 hg mv bleh barney |
4c158de5f245
qrefresh: fix handling of copies in the fast path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3699
diff
changeset
|
448 hg qrefresh --git |
4c158de5f245
qrefresh: fix handling of copies in the fast path
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3699
diff
changeset
|
449 cat .hg/patches/bar |
10061
9e2ab10728a2
Make {file_copies} usable as a --template key
Patrick Mezard <pmezard@gmail.com>
parents:
10060
diff
changeset
|
450 hg log -v --template '{rev} {file_copies}\n' -r . |
4065
8ee983e3d461
fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3700
diff
changeset
|
451 |
5294
e14118f92730
mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents:
5148
diff
changeset
|
452 echo % refresh omitting an added file |
e14118f92730
mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents:
5148
diff
changeset
|
453 hg qnew baz |
e14118f92730
mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents:
5148
diff
changeset
|
454 echo newfile > newfile |
e14118f92730
mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents:
5148
diff
changeset
|
455 hg add newfile |
e14118f92730
mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents:
5148
diff
changeset
|
456 hg qrefresh |
e14118f92730
mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents:
5148
diff
changeset
|
457 hg st -A newfile |
e14118f92730
mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents:
5148
diff
changeset
|
458 hg qrefresh -X newfile |
e14118f92730
mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents:
5148
diff
changeset
|
459 hg st -A newfile |
e14118f92730
mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents:
5148
diff
changeset
|
460 hg revert newfile |
e14118f92730
mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents:
5148
diff
changeset
|
461 rm newfile |
e14118f92730
mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents:
5148
diff
changeset
|
462 hg qpop |
e14118f92730
mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents:
5148
diff
changeset
|
463 hg qdel baz |
e14118f92730
mq: fix regression in 6fd953d5faea
Brendan Cully <brendan@kublai.com>
parents:
5148
diff
changeset
|
464 |
5026 | 465 echo % create a git patch |
466 echo a > alexander | |
467 hg add alexander | |
468 hg qnew -f --git addalexander | |
5027
17d71a79a257
Fix bashism and remove useless use of cat.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5026
diff
changeset
|
469 grep diff .hg/patches/addalexander |
5026 | 470 |
471 echo % create a git binary patch | |
472 cat > writebin.py <<EOF | |
473 import sys | |
474 path = sys.argv[1] | |
475 open(path, 'wb').write('BIN\x00ARY') | |
476 EOF | |
477 python writebin.py bucephalus | |
478 | |
479 python "$TESTDIR/md5sum.py" bucephalus | |
480 hg add bucephalus | |
481 hg qnew -f --git addbucephalus | |
5027
17d71a79a257
Fix bashism and remove useless use of cat.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5026
diff
changeset
|
482 grep diff .hg/patches/addbucephalus |
5026 | 483 |
484 echo % check binary patches can be popped and pushed | |
485 hg qpop | |
5027
17d71a79a257
Fix bashism and remove useless use of cat.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5026
diff
changeset
|
486 test -f bucephalus && echo % bucephalus should not be there |
5026 | 487 hg qpush |
488 test -f bucephalus || echo % bucephalus should be there | |
489 python "$TESTDIR/md5sum.py" bucephalus | |
490 | |
491 | |
4065
8ee983e3d461
fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3700
diff
changeset
|
492 echo '% strip again' |
8ee983e3d461
fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3700
diff
changeset
|
493 cd .. |
8ee983e3d461
fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3700
diff
changeset
|
494 hg init strip |
8ee983e3d461
fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3700
diff
changeset
|
495 cd strip |
8ee983e3d461
fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3700
diff
changeset
|
496 touch foo |
8ee983e3d461
fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3700
diff
changeset
|
497 hg add foo |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7621
diff
changeset
|
498 hg ci -m 'add foo' |
4065
8ee983e3d461
fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3700
diff
changeset
|
499 echo >> foo |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7621
diff
changeset
|
500 hg ci -m 'change foo 1' |
4065
8ee983e3d461
fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3700
diff
changeset
|
501 hg up -C 0 |
8ee983e3d461
fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3700
diff
changeset
|
502 echo 1 >> foo |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7621
diff
changeset
|
503 hg ci -m 'change foo 2' |
4065
8ee983e3d461
fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3700
diff
changeset
|
504 HGMERGE=true hg merge |
8167
6c82beaaa11a
tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents:
7621
diff
changeset
|
505 hg ci -m merge |
4065
8ee983e3d461
fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3700
diff
changeset
|
506 hg log |
11200
12e5149cafca
strip: improve full backup message
Matt Mackall <mpm@selenic.com>
parents:
11108
diff
changeset
|
507 hg strip 1 | hidebackup |
5527
0b3f910dfd17
mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5294
diff
changeset
|
508 checkundo strip |
4065
8ee983e3d461
fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3700
diff
changeset
|
509 hg log |
4090
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
510 cd .. |
4065
8ee983e3d461
fix strip'ping the second parent of a merge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3700
diff
changeset
|
511 |
4090
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
512 echo '% qclone' |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
513 qlog() |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
514 { |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
515 echo 'main repo:' |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
516 hg log --template ' rev {rev}: {desc}\n' |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
517 echo 'patch repo:' |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
518 hg -R .hg/patches log --template ' rev {rev}: {desc}\n' |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
519 } |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
520 hg init qclonesource |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
521 cd qclonesource |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
522 echo foo > foo |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
523 hg add foo |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
524 hg ci -m 'add foo' |
4862
cba10652a901
mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents:
4219
diff
changeset
|
525 hg qinit |
4090
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
526 hg qnew patch1 |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
527 echo bar >> foo |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
528 hg qrefresh -m 'change foo' |
4862
cba10652a901
mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents:
4219
diff
changeset
|
529 cd .. |
cba10652a901
mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents:
4219
diff
changeset
|
530 |
cba10652a901
mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents:
4219
diff
changeset
|
531 # repo with unversioned patch dir |
cba10652a901
mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents:
4219
diff
changeset
|
532 hg qclone qclonesource failure |
cba10652a901
mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents:
4219
diff
changeset
|
533 |
cba10652a901
mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents:
4219
diff
changeset
|
534 cd qclonesource |
cba10652a901
mq: improve qclone error handling when patch directory is not a repository.
Brendan Cully <brendan@kublai.com>
parents:
4219
diff
changeset
|
535 hg qinit -c |
4090
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
536 hg qci -m checkpoint |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
537 qlog |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
538 cd .. |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
539 |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
540 # repo with patches applied |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
541 hg qclone qclonesource qclonedest |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
542 cd qclonedest |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
543 qlog |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
544 cd .. |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
545 |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
546 # repo with patches unapplied |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
547 cd qclonesource |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
548 hg qpop -a |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
549 qlog |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
550 cd .. |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
551 hg qclone qclonesource qclonedest2 |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
552 cd qclonedest2 |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
553 qlog |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
554 cd .. |
785ad8cd1d31
qclone: don't call reposetup manually
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4065
diff
changeset
|
555 |
6280
9db24a36d182
patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents:
5981
diff
changeset
|
556 echo % 'test applying on an empty file (issue 1033)' |
9db24a36d182
patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents:
5981
diff
changeset
|
557 hg init empty |
9db24a36d182
patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents:
5981
diff
changeset
|
558 cd empty |
9db24a36d182
patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents:
5981
diff
changeset
|
559 touch a |
9db24a36d182
patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents:
5981
diff
changeset
|
560 hg ci -Am addempty |
9db24a36d182
patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents:
5981
diff
changeset
|
561 echo a > a |
9db24a36d182
patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents:
5981
diff
changeset
|
562 hg qnew -f -e changea |
9db24a36d182
patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents:
5981
diff
changeset
|
563 hg qpop |
9db24a36d182
patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents:
5981
diff
changeset
|
564 hg qpush |
9db24a36d182
patch: check filename is /dev/null for creation or deletion (issue 1033)
Patrick Mezard <pmezard@gmail.com>
parents:
5981
diff
changeset
|
565 cd .. |
6554
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
566 |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
567 echo % test qpush with --force, issue1087 |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
568 hg init forcepush |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
569 cd forcepush |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
570 echo hello > hello.txt |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
571 echo bye > bye.txt |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
572 hg ci -Ama |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
573 hg qnew -d '0 0' empty |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
574 hg qpop |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
575 echo world >> hello.txt |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
576 |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
577 echo % qpush should fail, local changes |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
578 hg qpush |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
579 |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
580 echo % apply force, should not discard changes with empty patch |
7042
0ada66dcc259
tests: fix reported patch tool name in test-mq
Mads Kiilerich <mads@kiilerich.com>
parents:
6554
diff
changeset
|
581 hg qpush -f 2>&1 | sed 's,^.*/patch,patch,g' |
6554
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
582 hg diff --config diff.nodates=True |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
583 hg qdiff --config diff.nodates=True |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
584 hg log -l1 -p |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
585 hg qref -d '0 0' |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
586 hg qpop |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
587 echo universe >> hello.txt |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
588 echo universe >> bye.txt |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
589 |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
590 echo % qpush should fail, local changes |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
591 hg qpush |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
592 |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
593 echo % apply force, should discard changes in hello, but not bye |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
594 hg qpush -f |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
595 hg st |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
596 hg diff --config diff.nodates=True |
3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
6280
diff
changeset
|
597 hg qdiff --config diff.nodates=True |
7621
6d891df43a5f
mq: allow qpop if popped revisions are not working dir parents
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7296
diff
changeset
|
598 |
6d891df43a5f
mq: allow qpop if popped revisions are not working dir parents
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7296
diff
changeset
|
599 echo % test popping revisions not in working dir ancestry |
6d891df43a5f
mq: allow qpop if popped revisions are not working dir parents
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7296
diff
changeset
|
600 hg qseries -v |
6d891df43a5f
mq: allow qpop if popped revisions are not working dir parents
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7296
diff
changeset
|
601 hg up qparent |
6d891df43a5f
mq: allow qpop if popped revisions are not working dir parents
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7296
diff
changeset
|
602 hg qpop |
10048
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
603 |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
604 cd .. |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
605 hg init deletion-order |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
606 cd deletion-order |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
607 |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
608 touch a |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
609 hg ci -Aqm0 |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
610 |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
611 hg qnew rename-dir |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
612 hg rm a |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
613 hg qrefresh |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
614 |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
615 mkdir a b |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
616 touch a/a b/b |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
617 hg add -q a b |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
618 hg qrefresh |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
619 |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
620 echo % test popping must remove files added in subdirectories first |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
621 hg qpop |
46de82e50790
mq: qpop: remove added files before re-adding removed files
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9874
diff
changeset
|
622 cd .. |