##// END OF EJS Templates
tests: add exit codes to unified tests
Matt Mackall -
r12316:4134686b default
parent child Browse files
Show More
@@ -474,7 +474,7 b' def tsttest(test, options):'
474 474 after.setdefault(pos, []).append(l)
475 475 prepos = pos
476 476 pos = n
477 script.append('echo %s %s\n' % (salt, n))
477 script.append('echo %s %s $?\n' % (salt, n))
478 478 script.append(l[4:])
479 479 elif l.startswith(' > '): # continuations
480 480 after.setdefault(prepos, []).append(l)
@@ -486,6 +486,8 b' def tsttest(test, options):'
486 486 # non-command/result - queue up for merged output
487 487 after.setdefault(pos, []).append(l)
488 488
489 script.append('echo %s %s $?\n' % (salt, n + 1))
490
489 491 fd, name = tempfile.mkstemp(suffix='hg-tst')
490 492
491 493 try:
@@ -508,8 +510,13 b' def tsttest(test, options):'
508 510
509 511 pos = -1
510 512 postout = []
513 ret = 0
511 514 for n, l in enumerate(output):
512 515 if l.startswith(salt):
516 # add on last return code
517 ret = int(l.split()[2])
518 if ret != 0:
519 postout.append(" [%s]\n" % ret)
513 520 if pos in after:
514 521 postout += after.pop(pos)
515 522 pos = int(l.split()[1])
@@ -24,10 +24,12 b' called and .hg/journal.dirstate will not'
24 24 transaction abort!
25 25 rollback completed
26 26 abort: no commits allowed
27 [255]
27 28 $ hg ci -m foo
28 29 error: pretxncommit.nocommits hook failed: no commits allowed
29 30 transaction abort!
30 31 rollback completed
31 32 abort: no commits allowed
33 [255]
32 34
33 35 $ exit 0
@@ -54,6 +54,7 b' should fail'
54 54 merging a failed!
55 55 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
56 56 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
57 [1]
57 58 $ hg st
58 59 M a
59 60 ? a.orig
@@ -86,9 +87,11 b' issue683'
86 87
87 88 $ hg add c && echo "unexpected addition of missing file"
88 89 c: No such file or directory
90 [1]
89 91 $ echo c > c
90 92 $ hg add d c && echo "unexpected addition of missing file"
91 93 d: No such file or directory
94 [1]
92 95 $ hg st
93 96 M a
94 97 A c
@@ -59,10 +59,13 b' should all fail'
59 59
60 60 $ hg addremove -s foo
61 61 abort: similarity must be a number
62 [255]
62 63 $ hg addremove -s -1
63 64 abort: similarity must be between 0 and 100
65 [255]
64 66 $ hg addremove -s 1e6
65 67 abort: similarity must be between 0 and 100
68 [255]
66 69
67 70 $ cd ..
68 71
@@ -197,5 +197,6 b' invalid arguments'
197 197 Returns 0 on success.
198 198
199 199 use "hg -v help rt" to show global options
200 [255]
200 201
201 202 $ exit 0
@@ -164,6 +164,7 b' archives and rename them afterwards.'
164 164
165 165 $ hg archive -t zip -p /illegal test.zip
166 166 abort: archive prefix contains illegal components
167 [255]
167 168 $ hg archive -t zip -p very/../bad test.zip
168 169
169 170 $ hg archive --config ui.archivemeta=false -t zip -r 2 test.zip
@@ -205,6 +206,7 b' test .hg_archival.txt'
205 206
206 207 $ hg archive -t bogus test.bogus
207 208 abort: unknown archive type 'bogus'
209 [255]
208 210
209 211 server errors
210 212
@@ -216,5 +218,6 b' empty repo'
216 218 $ cd ../empty
217 219 $ hg archive ../test-empty
218 220 abort: no working directory: please specify a revision
221 [255]
219 222
220 223 $ exit 0
@@ -4,6 +4,7 b' should fail'
4 4
5 5 $ hg add .hg/00changelog.i
6 6 abort: path contains illegal component: .hg/00changelog.i
7 [255]
7 8
8 9 $ mkdir a
9 10 $ echo a > a/a
@@ -16,6 +17,7 b' should fail'
16 17
17 18 $ hg add b/b
18 19 abort: path 'b/b' traverses symbolic link 'b'
20 [255]
19 21
20 22 should succeed
21 23
@@ -25,6 +27,7 b' should still fail - maybe'
25 27
26 28 $ hg add b/b
27 29 abort: path 'b/b' traverses symbolic link 'b'
30 [255]
28 31
29 32 unbundle tampered bundle
30 33
@@ -43,6 +46,7 b' attack .hg/test'
43 46 .hg/test
44 47 $ hg update -Cr0
45 48 abort: path contains illegal component: .hg/test
49 [255]
46 50
47 51 attack foo/.hg/test
48 52
@@ -50,6 +54,7 b' attack foo/.hg/test'
50 54 foo/.hg/test
51 55 $ hg update -Cr1
52 56 abort: path 'foo/.hg/test' is inside repo 'foo'
57 [255]
53 58
54 59 attack back/test where back symlinks to ..
55 60
@@ -58,6 +63,7 b' attack back/test where back symlinks to '
58 63 back/test
59 64 $ hg update -Cr2
60 65 abort: path 'back/test' traverses symbolic link 'back'
66 [255]
61 67
62 68 attack ../test
63 69
@@ -65,6 +71,7 b' attack ../test'
65 71 ../test
66 72 $ hg update -Cr3
67 73 abort: path contains illegal component: ../test
74 [255]
68 75
69 76 attack /tmp/test
70 77
@@ -72,5 +79,6 b' attack /tmp/test'
72 79 /tmp/test
73 80 $ hg update -Cr4
74 81 abort: No such file or directory: .*/test-audit-path.t/target//tmp/test
82 [255]
75 83
76 84 $ exit 0
@@ -7,8 +7,10 b''
7 7
8 8 $ hg backout
9 9 abort: please specify a revision to backout
10 [255]
10 11 $ hg backout -r 0 0
11 12 abort: please specify just one revision
13 [255]
12 14
13 15 # basic operation
14 16
@@ -69,6 +71,7 b' should fail'
69 71
70 72 $ hg backout 1
71 73 abort: cannot backout change on a different branch
74 [255]
72 75 $ echo c > c
73 76 $ hg ci -Am2
74 77 adding c
@@ -78,6 +81,7 b' should fail'
78 81
79 82 $ hg backout 1
80 83 abort: cannot backout change on a different branch
84 [255]
81 85
82 86 # backout with merge
83 87
@@ -138,6 +142,7 b' check line 1 is back'
138 142 $ hg update -C tip
139 143 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
140 144 $ hg locate b
145 [1]
141 146
142 147 $ cd ..
143 148 $ hg init m
@@ -166,16 +171,19 b' check line 1 is back'
166 171
167 172 $ hg backout 4
168 173 abort: cannot backout a merge changeset without --parent
174 [255]
169 175
170 176 # backout of merge with bad parent should fail
171 177
172 178 $ hg backout --parent 0 4
173 179 abort: cb9a9f314b8b is not a parent of b2f3bb92043e
180 [255]
174 181
175 182 # backout of non-merge with parent should fail
176 183
177 184 $ hg backout --parent 0 3
178 185 abort: cannot use --parent on non-merge changeset
186 [255]
179 187
180 188 # backout with valid parent should be ok
181 189
@@ -1,5 +1,6 b''
1 1 $ hg clone http://localhost:$HGPORT/ copy
2 2 abort: error: Connection refused
3 [255]
3 4
4 5 $ echo $?
5 6 0
@@ -27,6 +28,7 b' give the server some time to start runni'
27 28
28 29 $ hg clone http://localhost:$HGPORT/foo copy2 2>&1
29 30 abort: HTTP Error 404: .*
31 [255]
30 32
31 33 $ echo $?
32 34 0
@@ -132,6 +132,7 b''
132 132
133 133 $ heads -r 3 .
134 134 no open branch heads found on branches c (started at 3)
135 [1]
135 136 $ echo $?
136 137 0
137 138 $ heads -r 2 .
@@ -157,6 +158,7 b''
157 158 -------
158 159 $ heads -r 7 .
159 160 no open branch heads found on branches b (started at 7)
161 [1]
160 162 $ echo $?
161 163 0
162 164
@@ -386,6 +386,7 b' assuming that the shell returns 127 if c'
386 386 $ hg bisect -r
387 387 $ hg bisect --command 'exit 127'
388 388 abort: failed to execute exit 127
389 [255]
389 390
390 391
391 392 test bisecting command
@@ -393,6 +393,7 b' test unrelated revs:'
393 393 $ hg bisect -b 7
394 394 $ hg bisect -g 14
395 395 abort: starting revisions are not directly related
396 [255]
396 397 $ hg bisect --reset
397 398
398 399 end at merge: 17 bad, 11 good (but 9 is first bad)
@@ -60,6 +60,8 b" push/pull name that doesn't exist"
60 60
61 61 $ hg push -B badname ../a
62 62 bookmark badname does not exist on the local or remote repository!
63 [2]
63 64 $ hg pull -B anotherbadname ../a
64 65 abort: remote bookmark anotherbadname not found!
66 [255]
65 67 $ true
@@ -89,11 +89,13 b' rename nonexistent bookmark'
89 89
90 90 $ hg bookmark -m A B
91 91 abort: a bookmark of this name does not exist
92 [255]
92 93
93 94 rename to existent bookmark
94 95
95 96 $ hg bookmark -m X Y
96 97 abort: a bookmark of the same name already exists
98 [255]
97 99
98 100 force rename to existent bookmark
99 101
@@ -110,16 +112,19 b' rename without new name'
110 112
111 113 $ hg bookmark -m Y
112 114 abort: new bookmark name required
115 [255]
113 116
114 117 delete without name
115 118
116 119 $ hg bookmark -d
117 120 abort: bookmark name required
121 [255]
118 122
119 123 delete nonexistent bookmark
120 124
121 125 $ hg bookmark -d A
122 126 abort: a bookmark of this name does not exist
127 [255]
123 128
124 129 bookmark name with spaces should be stripped
125 130
@@ -151,11 +156,13 b' reject bookmark name with newline'
151 156 $ hg bookmark '
152 157 > '
153 158 abort: bookmark name cannot contain newlines
159 [255]
154 160
155 161 bookmark with existing name
156 162
157 163 $ hg bookmark Z
158 164 abort: a bookmark of the same name already exists
165 [255]
159 166
160 167 force bookmark with existing name
161 168
@@ -173,10 +180,12 b' revision but no bookmark name'
173 180
174 181 $ hg bookmark -r .
175 182 abort: bookmark name required
183 [255]
176 184
177 185 bookmark name with whitespace only
178 186
179 187 $ hg bookmark ' '
180 188 abort: bookmark names cannot consist entirely of whitespace
189 [255]
181 190
182 191 $ true
@@ -57,10 +57,12 b' unknown branch and fallback'
57 57
58 58 $ hg in -qbz
59 59 abort: unknown branch 'z'!
60 [255]
60 61 $ hg in -q ../branch#z
61 62 2:f25d57ab0566
62 63 $ hg out -qbz
63 64 abort: unknown branch 'z'!
65 [255]
64 66
65 67 in rev c branch a
66 68
@@ -43,10 +43,13 b''
43 43
44 44 $ hg branch tip
45 45 abort: the name 'tip' is reserved
46 [255]
46 47 $ hg branch null
47 48 abort: the name 'null' is reserved
49 [255]
48 50 $ hg branch .
49 51 abort: the name '.' is reserved
52 [255]
50 53
51 54 $ echo 'd' >d
52 55 $ hg add d
@@ -235,6 +238,7 b''
235 238 a branch name much longer than the default justification used by branches 7:10ff5895aa57
236 239 $ hg heads b
237 240 no open branch heads found on branches b
241 [1]
238 242 $ hg heads --closed b
239 243 changeset: 12:2da6583810df
240 244 branch: b
@@ -316,6 +320,7 b' branch a'
316 320
317 321 $ hg heads --active a
318 322 no open branch heads found on branches a
323 [1]
319 324
320 325 branch b
321 326
@@ -207,8 +207,10 b' should fail'
207 207
208 208 $ hg -R test bundle --base 2 -r tip test-bundle-branch1.hg test-3
209 209 abort: --base is incompatible with specifying a destination
210 [255]
210 211 $ hg -R test bundle -r tip test-bundle-branch1.hg
211 212 abort: repository default-push not found!
213 [255]
212 214
213 215 $ hg -R test bundle --base 2 -r tip test-bundle-branch1.hg
214 216 2 changesets found
@@ -223,6 +225,7 b' empty bundle'
223 225
224 226 $ hg -R test bundle --base 7 --base 8 test-bundle-empty.hg
225 227 no changes found
228 [1]
226 229
227 230 issue76 msg2163
228 231
@@ -248,6 +251,7 b' revision 2'
248 251 transaction abort!
249 252 rollback completed
250 253 abort: 00changelog.i@eebf5a27f8ca: unknown parent!
254 [255]
251 255
252 256 revision 2
253 257
@@ -88,6 +88,7 b' test garbage file'
88 88 $ cd tgarbage
89 89 $ hg pull ../bgarbage
90 90 abort: ../bgarbage: not a Mercurial bundle
91 [255]
91 92 $ cd ..
92 93
93 94 test invalid bundle type
@@ -96,4 +97,5 b' test invalid bundle type'
96 97 $ hg bundle -a -t garbage ../bgarbage
97 98 1 changesets found
98 99 abort: unknown bundle type specified with --type
100 [255]
99 101 $ cd ..
@@ -62,6 +62,7 b' Unbundle full.hg in test'
62 62 Verify empty
63 63
64 64 $ hg -R empty heads
65 [1]
65 66 $ hg -R empty verify
66 67 checking changesets
67 68 checking manifests
@@ -371,6 +372,7 b' Outgoing -R does-not-exist.hg vs partial'
371 372
372 373 $ hg -R bundle://../does-not-exist.hg outgoing ../partial2
373 374 abort: No such file or directory: ../does-not-exist.hg
375 [255]
374 376 $ cd ..
375 377
376 378 Direct clone from bundle (all-history)
@@ -462,11 +464,13 b' partial history bundle, fails w/ unkown '
462 464
463 465 $ hg -R bundle.hg verify
464 466 abort: 00changelog.i@bbd179dfa0a7: unknown parent!
467 [255]
465 468
466 469 full history bundle, refuses to verify non-local repo
467 470
468 471 $ hg -R all.hg verify
469 472 abort: cannot verify bundle or remote repos
473 [255]
470 474
471 475 but, regular verify must continue to work
472 476
@@ -18,5 +18,6 b''
18 18 0
19 19 $ hg cat -r 1 a
20 20 a: no such file in rev 7040230c159c
21 [1]
21 22 $ hg cat -r 1 b
22 23 1
@@ -21,6 +21,7 b''
21 21
22 22 $ hg clone -U -u . .#other ../b -r 0 -r 1 -r 2 -b other
23 23 abort: cannot specify both --noupdate and --updaterev
24 [255]
24 25
25 26 $ hg clone -U .#other ../b -r 0 -r 1 -r 2 -b other
26 27 requesting all changes
@@ -74,6 +74,7 b" Check that we drop the 'file:' from the "
74 74 updating to branch default
75 75 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
76 76 $ grep 'file:' e/.hg/hgrc
77 [1]
77 78
78 79 Check that path aliases are expanded:
79 80
@@ -160,6 +161,7 b' Testing --noupdate with --updaterev (mus'
160 161
161 162 $ hg clone --noupdate --updaterev 1 a ua
162 163 abort: cannot specify both --noupdate and --updaterev
164 [255]
163 165
164 166
165 167 Testing clone -u:
@@ -437,23 +437,27 b' Error if style not readable:'
437 437 $ chmod 0 q
438 438 $ hg log --style ./q
439 439 abort: Permission denied: ./q
440 [255]
440 441
441 442 Error if no style:
442 443
443 444 $ hg log --style notexist
444 445 abort: style not found: notexist
446 [255]
445 447
446 448 Error if style missing key:
447 449
448 450 $ echo 'q = q' > t
449 451 $ hg log --style ./t
450 452 abort: ./t: no key named 'changeset'
453 [255]
451 454
452 455 Error if include fails:
453 456
454 457 $ echo 'changeset = q' >> t
455 458 $ hg log --style ./t
456 459 abort: template file ./q: Permission denied
460 [255]
457 461
458 462 Include works:
459 463
@@ -1192,6 +1196,7 b' Error on syntax:'
1192 1196 $ echo 'x = "f' >> t
1193 1197 $ hg log
1194 1198 abort: t:3: unmatched quotes
1199 [255]
1195 1200
1196 1201 $ cd ..
1197 1202
@@ -32,12 +32,14 b' Merging a conflict araises'
32 32 merging A failed!
33 33 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
34 34 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
35 [1]
35 36
36 37 Correct the conflict without marking the file as resolved
37 38
38 39 $ echo "ABCD" > A
39 40 $ hg commit -m "Merged"
40 41 abort: unresolved merge conflicts (see hg resolve)
42 [255]
41 43
42 44 Mark the conflict as resolved and commit
43 45
@@ -6,17 +6,22 b' commit date test'
6 6 $ hg add foo
7 7 $ HGEDITOR=true hg commit -m ""
8 8 abort: empty commit message
9 [255]
9 10 $ hg commit -d '0 0' -m commit-1
10 11 $ echo foo >> foo
11 12 $ hg commit -d '1 4444444' -m commit-3
12 13 abort: impossible time zone offset: 4444444
14 [255]
13 15 $ hg commit -d '1 15.1' -m commit-4
14 16 abort: invalid date: '1\t15.1'
17 [255]
15 18 $ hg commit -d 'foo bar' -m commit-5
16 19 abort: invalid date: 'foo bar'
20 [255]
17 21 $ hg commit -d ' 1 4444' -m commit-6
18 22 $ hg commit -d '111111111111 0' -m commit-7
19 23 abort: date exceeds 32 bits: 111111111111
24 [255]
20 25
21 26 commit added file that has been deleted
22 27
@@ -25,8 +30,10 b' commit added file that has been deleted'
25 30 $ rm bar
26 31 $ hg commit -m commit-8
27 32 nothing changed
33 [1]
28 34 $ hg commit -m commit-8-2 bar
29 35 abort: bar: file not found!
36 [255]
30 37
31 38 $ hg -q revert -a --no-backup
32 39
@@ -43,6 +50,7 b' commit added file that has been deleted'
43 50 adding dir.file
44 51 $ hg commit -m commit-10 dir dir.file
45 52 abort: dir: no match under directory!
53 [255]
46 54
47 55 $ echo >> dir/file
48 56 $ mkdir bleh
@@ -50,8 +58,10 b' commit added file that has been deleted'
50 58 $ cd bleh
51 59 $ hg commit -m commit-11 .
52 60 abort: bleh: no match under directory!
61 [255]
53 62 $ hg commit -m commit-12 ../dir ../dir2
54 63 abort: dir2: no match under directory!
64 [255]
55 65 $ hg -v commit -m commit-13 ../dir
56 66 dir/file
57 67 committed changeset 3:1cd62a2d8db5
@@ -59,12 +69,15 b' commit added file that has been deleted'
59 69
60 70 $ hg commit -m commit-14 does-not-exist
61 71 abort: does-not-exist: No such file or directory
72 [255]
62 73 $ ln -s foo baz
63 74 $ hg commit -m commit-15 baz
64 75 abort: baz: file not tracked!
76 [255]
65 77 $ touch quux
66 78 $ hg commit -m commit-16 quux
67 79 abort: quux: file not tracked!
80 [255]
68 81 $ echo >> dir/file
69 82 $ hg -v commit -m commit-17 dir/file
70 83 dir/file
@@ -75,6 +88,7 b' An empty date was interpreted as epoch o'
75 88 $ echo foo >> foo
76 89 $ hg commit -d '' -m commit-no-date
77 90 $ hg tip --template '{date|isodate}\n' | grep '1970'
91 [1]
78 92 $ cd ..
79 93
80 94
@@ -212,11 +226,13 b' should fail because we are specifying a '
212 226
213 227 $ hg ci -mmerge a
214 228 abort: cannot partially commit a merge (do not specify files or patterns)
229 [255]
215 230
216 231 should fail because we are specifying a pattern
217 232
218 233 $ hg ci -mmerge -I a
219 234 abort: cannot partially commit a merge (do not specify files or patterns)
235 [255]
220 236
221 237 should succeed
222 238
@@ -248,6 +264,7 b' test commit message content'
248 264 HG: changed changed
249 265 HG: removed removed
250 266 abort: empty commit message
267 [255]
251 268 $ cd ..
252 269
253 270 $ exit 0
@@ -50,6 +50,7 b''
50 50 $ echo "username = " >> .hg/hgrc
51 51 $ hg commit -m commit-1
52 52 abort: no username supplied (see "hg help config")
53 [255]
53 54 $ rm .hg/hgrc
54 55 $ hg commit -m commit-1 2>&1
55 56 No username found, using '[^']*' instead
@@ -59,5 +60,6 b''
59 60 transaction abort!
60 61 rollback completed
61 62 abort: empty username!
63 [255]
62 64
63 65 $ true
@@ -16,6 +16,7 b''
16 16 merging a failed!
17 17 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
18 18 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
19 [1]
19 20
20 21 $ hg id
21 22 32e80765d7fe+75234512624c+ tip
@@ -60,6 +60,7 b' Revert should fail:'
60 60
61 61 $ hg revert --all
62 62 abort: uncommitted merge - please provide a specific revision
63 [255]
63 64
64 65 Revert should be ok now:
65 66
@@ -4,6 +4,7 b' should fail - foo is not managed'
4 4 $ hg mv foo bar
5 5 foo: not copying - file is not managed
6 6 abort: no files to copy
7 [255]
7 8 $ hg st -A
8 9 ? foo
9 10 $ hg add foo
@@ -60,6 +60,7 b' Problem encoding:'
60 60 $ hg add morestuff.txt
61 61 $ hg ci -m morestuff
62 62 abort: missing header "Copyright 2046, The Masters" in morestuff.txt
63 [255]
63 64 $ hg stat
64 65 M stuff.txt
65 66 A morestuff.txt
@@ -173,6 +173,7 b' Show an error if we use --options with a'
173 173 $ hg debugcomplete --options s
174 174 hg: command 's' is ambiguous:
175 175 serve showconfig status summary
176 [255]
176 177
177 178 Show all commands + options
178 179 $ hg debugcommands
@@ -46,6 +46,7 b' invalid --unified'
46 46
47 47 $ hg diff --nodates -U foo
48 48 abort: diff context lines count must be an integer, not 'foo'
49 [255]
49 50
50 51
51 52 $ hg diff --nodates -U 2
@@ -86,6 +87,7 b' invalid diff.unified'
86 87
87 88 $ hg --config diff.unified=foo diff --nodates
88 89 abort: diff context lines count must be an integer, not 'foo'
90 [255]
89 91
90 92 test off-by-one error with diff -p
91 93
@@ -244,6 +244,7 b' git=abort: fail on execute bit change'
244 244
245 245 $ hg autodiff --git=abort regular setexec
246 246 abort: losing data for setexec
247 [255]
247 248
248 249 git=abort: succeed on regular file
249 250
@@ -34,7 +34,9 b''
34 34
35 35 $ hg diff -r ""
36 36 abort: 00changelog.i@: ambiguous identifier!
37 [255]
37 38 $ hg diff -r tip -r ""
38 39 abort: 00changelog.i@: ambiguous identifier!
40 [255]
39 41
40 42 $ true
@@ -43,6 +43,7 b' Missing arg:'
43 43 [+] marked option can be specified multiple times
44 44
45 45 use "hg -v help cat" to show global options
46 [255]
46 47
47 48 [defaults]
48 49
@@ -54,12 +55,14 b' Missing arg:'
54 55 > EOF
55 56 $ hg cat a
56 57 a: no such file in rev 000000000000
58 [1]
57 59
58 60 No repo:
59 61
60 62 $ cd $dir
61 63 $ hg cat
62 64 abort: There is no Mercurial repository here (.hg not found)!
65 [255]
63 66
64 67 $ exit 0
65 68
@@ -97,11 +97,13 b' Compare repos:'
97 97 comparing with repo-a
98 98 searching for changes
99 99 no changes found
100 [1]
100 101
101 102 $ hg -R repo-a incoming repo-c
102 103 comparing with repo-c
103 104 searching for changes
104 105 no changes found
106 [1]
105 107
106 108 $ exit 0
107 109
@@ -7,6 +7,7 b' Try some commands:'
7 7
8 8 $ hg log
9 9 $ hg grep wah
10 [1]
10 11 $ hg manifest
11 12 $ hg verify
12 13 checking changesets
@@ -14,6 +14,7 b' Should diff cloned directories:'
14 14 $ hg extdiff -o -r $opt
15 15 Only in a: a
16 16 Only in a: b
17 [1]
17 18
18 19 $ echo "[extdiff]" >> $HGRCPATH
19 20 $ echo "cmd.falabala=echo" >> $HGRCPATH
@@ -21,6 +22,7 b' Should diff cloned directories:'
21 22
22 23 $ hg falabala
23 24 diffing a.000000000000 a
25 [1]
24 26
25 27 $ hg help falabala
26 28 hg falabala [OPTION]... [FILE]...
@@ -56,6 +58,7 b' Should diff cloned files directly:'
56 58
57 59 $ hg falabala -r 0:1
58 60 diffing a.8a5febb7f867/a a.34eed99112ab/a
61 [1]
59 62
60 63 Test diff during merge:
61 64
@@ -72,6 +75,7 b' Test diff during merge:'
72 75 Should diff cloned file against wc file:
73 76
74 77 $ hg falabala > out
78 [1]
75 79
76 80 Cleanup the output since the wc is a tmp directory:
77 81
@@ -83,6 +87,7 b' Test --change option:'
83 87 $ hg ci -d '2 0' -mtest3
84 88 $ hg falabala -c 1
85 89 diffing a.8a5febb7f867/a a.34eed99112ab/a
90 [1]
86 91
87 92 Check diff are made from the first parent:
88 93
@@ -133,6 +138,7 b' Prepare custom diff/edit tool:'
133 138 # will change to /tmp/extdiff.TMP and populate directories a.TMP and a
134 139 # and start tool
135 140 $ hg extdiff -p "`pwd`/diff tool.py"
141 [1]
136 142
137 143 Diff in working directory, after:
138 144
@@ -158,9 +164,11 b' Test extdiff with --option:'
158 164
159 165 $ hg extdiff -p echo -o this -c 1
160 166 this a.8a5febb7f867/a a.34eed99112ab/a
167 [1]
161 168
162 169 $ hg falabala -o this -c 1
163 170 diffing this a.8a5febb7f867/a a.34eed99112ab/a
171 [1]
164 172
165 173 $ true
166 174
@@ -275,6 +275,7 b' Disabled extension commands:'
275 275 mq manage a stack of patches
276 276
277 277 use "hg help extensions" for information on enabling extensions
278 [255]
278 279 $ hg churn
279 280 hg: unknown command 'churn'
280 281 'churn' is provided by the following extension:
@@ -282,6 +283,7 b' Disabled extension commands:'
282 283 churn command to display statistics about repository history
283 284
284 285 use "hg help extensions" for information on enabling extensions
286 [255]
285 287
286 288 Disabled extensions:
287 289
@@ -315,6 +317,7 b' Broken disabled extension and command:'
315 317
316 318 $ hg --config extensions.path=./path.py help foo > /dev/null
317 319 hg: unknown command 'foo'
320 [255]
318 321
319 322 $ exit 0
320 323
@@ -41,6 +41,7 b' Creating branch b:'
41 41 We shouldn't have anything but n state here:
42 42
43 43 $ hg debugstate --nodates | grep -v "^n"
44 [1]
44 45
45 46 Merging:
46 47
@@ -54,6 +54,7 b' Testing verify:'
54 54 3 files, 3 changesets, 3 total revisions
55 55 3 integrity errors encountered!
56 56 (first damaged changeset appears to be 0)
57 [1]
57 58 $ cd ..
58 59
59 60 Non store repo:
@@ -192,6 +192,7 b' Rename and modify:'
192 192 8:c32b0d7e6f44
193 193
194 194 $ hg locate copy2
195 [1]
195 196 $ hg cat rename2
196 197 a
197 198 a
@@ -60,10 +60,13 b' Implicit -R:'
60 60 0: a
61 61 $ hg ann a/a b/b
62 62 abort: There is no Mercurial repository here (.hg not found)!
63 [255]
63 64 $ hg -R b ann a/a
64 65 abort: a/a not under root
66 [255]
65 67 $ hg log
66 68 abort: There is no Mercurial repository here (.hg not found)!
69 [255]
67 70
68 71 Abbreviation of long option:
69 72
@@ -103,16 +106,22 b' earlygetopt with illegal abbreviations:'
103 106
104 107 $ hg --confi "foo.bar=baz"
105 108 abort: option --config may not be abbreviated!
109 [255]
106 110 $ hg --cw a tip
107 111 abort: option --cwd may not be abbreviated!
112 [255]
108 113 $ hg --rep a tip
109 114 abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
115 [255]
110 116 $ hg --repositor a tip
111 117 abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
118 [255]
112 119 $ hg -qR a tip
113 120 abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
121 [255]
114 122 $ hg -qRa tip
115 123 abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
124 [255]
116 125
117 126 Testing --cwd:
118 127
@@ -179,14 +188,19 b' Testing --config:'
179 188 quuxfoo
180 189 $ hg --cwd c --config '' tip -q
181 190 abort: malformed --config option: '' (use --config section.name=value)
191 [255]
182 192 $ hg --cwd c --config a.b tip -q
183 193 abort: malformed --config option: 'a.b' (use --config section.name=value)
194 [255]
184 195 $ hg --cwd c --config a tip -q
185 196 abort: malformed --config option: 'a' (use --config section.name=value)
197 [255]
186 198 $ hg --cwd c --config a.= tip -q
187 199 abort: malformed --config option: 'a.=' (use --config section.name=value)
200 [255]
188 201 $ hg --cwd c --config .b= tip -q
189 202 abort: malformed --config option: '.b=' (use --config section.name=value)
203 [255]
190 204
191 205 Testing --debug:
192 206
@@ -20,6 +20,7 b' pattern error'
20 20
21 21 $ hg grep '**test**'
22 22 grep: invalid match pattern: nothing to repeat
23 [1]
23 24
24 25 simple
25 26
@@ -79,7 +80,9 b' follow'
79 80 $ hg init t2
80 81 $ cd t2
81 82 $ hg grep foobar foo
83 [1]
82 84 $ hg grep foobar
85 [1]
83 86 $ echo blue >> color
84 87 $ echo black >> color
85 88 $ hg add color
@@ -400,6 +400,7 b' Test help option with version option'
400 400 [+] marked option can be specified multiple times
401 401
402 402 use "hg -v help add" to show global options
403 [255]
403 404
404 405 Test ambiguous command help
405 406
@@ -573,6 +574,7 b' Test command without options'
573 574 update update working directory (or switch revisions)
574 575
575 576 use "hg help" for the full list of commands or "hg -v" for details
577 [255]
576 578
577 579 $ hg skjdfks
578 580 hg: unknown command 'skjdfks'
@@ -599,6 +601,7 b' Test command without options'
599 601 update update working directory (or switch revisions)
600 602
601 603 use "hg help" for the full list of commands or "hg -v" for details
604 [255]
602 605
603 606 $ cat > helpext.py <<EOF
604 607 > import os
@@ -70,6 +70,7 b''
70 70 $ hg id
71 71 pre-identify hook: HG_ARGS=id HG_OPTS={'tags': None, 'rev': '', 'num': None, 'branch': None, 'id': None} HG_PATS=[]
72 72 warning: pre-identify hook exited with status 1
73 [1]
73 74 $ hg cat b
74 75 pre-cat hook: HG_ARGS=cat b HG_OPTS={'rev': '', 'decode': None, 'exclude': [], 'output': '', 'include': []} HG_PATS=['b']
75 76 post-cat hook: HG_ARGS=cat b HG_OPTS={'rev': '', 'decode': None, 'exclude': [], 'output': '', 'include': []} HG_PATS=['b'] HG_RESULT=0
@@ -114,10 +115,12 b''
114 115 pretag hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa
115 116 pretag.forbid hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa
116 117 abort: pretag.forbid hook exited with status 1
118 [255]
117 119 $ hg tag -l fla
118 120 pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla
119 121 pretag.forbid hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla
120 122 abort: pretag.forbid hook exited with status 1
123 [255]
121 124
122 125 # pretxncommit hook can see changeset, can roll back txn, changeset
123 126 # no more there after
@@ -137,6 +140,7 b''
137 140 transaction abort!
138 141 rollback completed
139 142 abort: pretxncommit.forbid1 hook exited with status 1
143 [255]
140 144 $ hg -q tip
141 145 4:539e4b31b6dc
142 146
@@ -147,6 +151,7 b''
147 151 precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
148 152 precommit.forbid hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
149 153 abort: precommit.forbid hook exited with status 1
154 [255]
150 155 $ hg -q tip
151 156 4:539e4b31b6dc
152 157
@@ -177,6 +182,7 b''
177 182 pulling from ../a
178 183 searching for changes
179 184 abort: prechangegroup.forbid hook exited with status 1
185 [255]
180 186
181 187 # pretxnchangegroup hook can see incoming changes, can roll back txn,
182 188 # incoming changes no longer there after
@@ -196,6 +202,7 b''
196 202 transaction abort!
197 203 rollback completed
198 204 abort: pretxnchangegroup.forbid1 hook exited with status 1
205 [255]
199 206 $ hg -q tip
200 207 3:07f3376c1e65
201 208
@@ -227,6 +234,7 b''
227 234 pulling from ../a
228 235 searching for changes
229 236 abort: preoutgoing.forbid hook exited with status 1
237 [255]
230 238
231 239 # outgoing hooks work for local clones
232 240
@@ -248,6 +256,7 b''
248 256 preoutgoing hook: HG_SOURCE=clone
249 257 preoutgoing.forbid hook: HG_SOURCE=clone
250 258 abort: preoutgoing.forbid hook exited with status 1
259 [255]
251 260 $ cd b
252 261
253 262 $ cat > hooktests.py <<EOF
@@ -309,6 +318,7 b''
309 318 searching for changes
310 319 error: preoutgoing.abort hook failed: raise abort from hook
311 320 abort: raise abort from hook
321 [255]
312 322
313 323 $ echo '[hooks]' > ../a/.hg/hgrc
314 324 $ echo 'preoutgoing.fail = python:hooktests.failhook' >> ../a/.hg/hgrc
@@ -319,6 +329,7 b''
319 329 hooktype preoutgoing
320 330 source pull
321 331 abort: preoutgoing.fail hook failed
332 [255]
322 333
323 334 $ echo '[hooks]' > ../a/.hg/hgrc
324 335 $ echo 'preoutgoing.uncallable = python:hooktests.uncallable' >> ../a/.hg/hgrc
@@ -326,6 +337,7 b''
326 337 pulling from ../a
327 338 searching for changes
328 339 abort: preoutgoing.uncallable hook is invalid ("hooktests.uncallable" is not callable)
340 [255]
329 341
330 342 $ echo '[hooks]' > ../a/.hg/hgrc
331 343 $ echo 'preoutgoing.nohook = python:hooktests.nohook' >> ../a/.hg/hgrc
@@ -333,6 +345,7 b''
333 345 pulling from ../a
334 346 searching for changes
335 347 abort: preoutgoing.nohook hook is invalid ("hooktests.nohook" is not defined)
348 [255]
336 349
337 350 $ echo '[hooks]' > ../a/.hg/hgrc
338 351 $ echo 'preoutgoing.nomodule = python:nomodule' >> ../a/.hg/hgrc
@@ -340,6 +353,7 b''
340 353 pulling from ../a
341 354 searching for changes
342 355 abort: preoutgoing.nomodule hook is invalid ("nomodule" not in a module)
356 [255]
343 357
344 358 $ echo '[hooks]' > ../a/.hg/hgrc
345 359 $ echo 'preoutgoing.badmodule = python:nomodule.nowhere' >> ../a/.hg/hgrc
@@ -347,6 +361,7 b''
347 361 pulling from ../a
348 362 searching for changes
349 363 abort: preoutgoing.badmodule hook is invalid (import of "nomodule" failed)
364 [255]
350 365
351 366 $ echo '[hooks]' > ../a/.hg/hgrc
352 367 $ echo 'preoutgoing.unreachable = python:hooktests.container.unreachable' >> ../a/.hg/hgrc
@@ -354,6 +369,7 b''
354 369 pulling from ../a
355 370 searching for changes
356 371 abort: preoutgoing.unreachable hook is invalid (import of "hooktests.container" failed)
372 [255]
357 373
358 374 $ echo '[hooks]' > ../a/.hg/hgrc
359 375 $ echo 'preoutgoing.pass = python:hooktests.passhook' >> ../a/.hg/hgrc
@@ -426,6 +442,7 b''
426 442 $ hg commit -d '0 0'
427 443 hook works
428 444 nothing changed
445 [1]
429 446
430 447 $ cd ../../b
431 448
@@ -4,6 +4,7 b' no repo'
4 4
5 5 $ hg id
6 6 abort: there is no Mercurial repository here (.hg not found)
7 [255]
7 8
8 9 create repo
9 10
@@ -65,5 +66,6 b' remote with tags?'
65 66
66 67 $ hg id -t http://localhost:$HGPORT1/
67 68 abort: can't query remote revision number, branch, or tags
69 [255]
68 70
69 71 $ true # ends with util.Abort -> returns 255
@@ -37,6 +37,7 b' invalid eol'
37 37 $ hg --config patch.eol='LFCR' import eol.diff
38 38 applying eol.diff
39 39 abort: unsupported line endings type: LFCR
40 [255]
40 41 $ hg revert -a
41 42
42 43
@@ -74,6 +74,7 b' import of plain diff should fail without'
74 74 $ hg --cwd b import ../tip.patch
75 75 applying ../tip.patch
76 76 abort: empty commit message
77 [255]
77 78 $ rm -r b
78 79
79 80
@@ -287,6 +288,7 b' plain diff in email, no subject, no mess'
287 288 $ egrep -v '^(Subject|email)' msg.patch | hg --cwd b import -
288 289 applying patch from stdin
289 290 abort: empty commit message
291 [255]
290 292 $ rm -r b
291 293
292 294
@@ -605,6 +607,7 b' test paths outside repo root'
605 607 > EOF
606 608 applying patch from stdin
607 609 abort: ../outside/foo not under root
610 [255]
608 611 $ cd ..
609 612
610 613
@@ -65,6 +65,7 b' test failure'
65 65
66 66 $ hg init local
67 67 abort: repository local already exists!
68 [255]
68 69
69 70 init+push to remote2
70 71
@@ -100,12 +101,14 b' init to existing repo'
100 101 $ hg init -e "python ./dummyssh" ssh://user@dummy/remote1
101 102 abort: repository remote1 already exists!
102 103 abort: could not create remote repo!
104 [255]
103 105
104 106 clone to existing repo
105 107
106 108 $ hg clone -e "python ./dummyssh" local ssh://user@dummy/remote1
107 109 abort: repository remote1 already exists!
108 110 abort: could not create remote repo!
111 [255]
109 112
110 113 output of dummyssh
111 114
@@ -19,5 +19,6 b' hg debuginstall with no username'
19 19 no username supplied (see "hg help config")
20 20 (specify a username in your configuration file)
21 21 1 problems detected, please check your install!
22 [1]
22 23
23 24 $ true
@@ -15,6 +15,7 b' Should fail - would corrupt dirstate:'
15 15
16 16 $ hg add a/a
17 17 abort: file 'a' in dirstate clashes with 'a/a'
18 [255]
18 19
19 20 $ cd ..
20 21
@@ -34,6 +35,7 b' Should fail - would corrupt dirstate:'
34 35
35 36 $ hg add a
36 37 abort: directory 'a' already in dirstate
38 [255]
37 39
38 40 $ cd ..
39 41
@@ -53,6 +55,7 b' Should fail - would corrupt dirstate:'
53 55
54 56 $ hg add b
55 57 abort: directory 'b' already in dirstate
58 [255]
56 59
57 60 $ exit 0
58 61
@@ -7,6 +7,7 b''
7 7
8 8 $ hg parents -r 0 doesnotexist
9 9 abort: 'doesnotexist' not found in manifest!
10 [255]
10 11
11 12 $ true
12 13
@@ -25,6 +25,7 b' Bogus fast-forward should fail:'
25 25
26 26 $ hg merge b
27 27 abort: merging with a working directory ancestor has no effect
28 [255]
28 29
29 30 $ true
30 31
@@ -18,6 +18,7 b' Should fail - would corrupt dirstate:'
18 18
19 19 $ hg add a/a
20 20 abort: file 'a' in dirstate clashes with 'a/a'
21 [255]
21 22
22 23 Removing shadow:
23 24
@@ -36,6 +37,7 b' Should fail - would corrupt dirstate:'
36 37
37 38 $ hg add b
38 39 abort: directory 'b' already in dirstate
40 [255]
39 41
40 42 Removing shadow:
41 43
@@ -58,6 +60,7 b' Revert reintroducing shadow - should fai'
58 60 $ rm -r a b
59 61 $ hg revert b/b
60 62 abort: file 'b' in dirstate clashes with 'b/b'
63 [255]
61 64
62 65 Revert all - should succeed:
63 66
@@ -110,6 +113,7 b' Should fail - would corrupt dirstate:'
110 113
111 114 $ hg add d
112 115 abort: directory 'd' already in dirstate
116 [255]
113 117
114 118 Removing shadow:
115 119
@@ -10,6 +10,7 b''
10 10 $ echo foo > a
11 11 $ hg ci -Am0
12 12 abort: abandoned transaction found - run hg recover!
13 [255]
13 14
14 15 $ hg recover
15 16 rolling back interrupted transaction
@@ -27,6 +28,7 b' Check that zero-size journals are correc'
27 28 $ hg -R foo unbundle repo.hg
28 29 adding changesets
29 30 abort: Permission denied: .*
31 [255]
30 32
31 33 $ if test -f foo/.hg/store/journal; then echo 'journal exists :-('; fi
32 34
@@ -116,6 +116,7 b' Interrupted commit should not change sta'
116 116
117 117 $ hg --debug commit
118 118 abort: empty commit message
119 [255]
119 120 $ hg status
120 121 A a
121 122 A b
@@ -540,6 +541,7 b' Interrupted commit should not change sta'
540 541
541 542 $ hg commit
542 543 abort: empty commit message
544 [255]
543 545 $ hg status
544 546 M a
545 547 ? c
@@ -689,6 +691,7 b' kwexpand x/a should abort'
689 691
690 692 $ hg --verbose kwexpand x/a
691 693 abort: outstanding uncommitted changes
694 [255]
692 695 $ cd x
693 696 $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
694 697 x/a
@@ -818,6 +821,7 b' conflict: keyword should stay outside co'
818 821 merging m failed!
819 822 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
820 823 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
824 [1]
821 825 $ cat m
822 826 $Id$
823 827 <<<<<<< local
@@ -42,8 +42,11 b''
42 42 $ hg ci -m m
43 43
44 44 $ hg locate a
45 [1]
45 46 $ hg locate NONEXISTENT
47 [1]
46 48 $ hg locate relpath:NONEXISTENT
49 [1]
47 50 $ hg locate
48 51 b
49 52 dir.h/foo
@@ -54,7 +57,9 b''
54 57 $ hg locate -r 0 a
55 58 a
56 59 $ hg locate -r 0 NONEXISTENT
60 [1]
57 61 $ hg locate -r 0 relpath:NONEXISTENT
62 [1]
58 63 $ hg locate -r 0
59 64 a
60 65 b
@@ -16,6 +16,7 b''
16 16 $ hg -R b push a
17 17 pushing to a
18 18 abort: could not lock repository a: Permission denied
19 [255]
19 20
20 21 $ chmod 700 a/.hg/store
21 22
@@ -31,6 +31,7 b''
31 31
32 32 $ hg log -f dir
33 33 abort: cannot follow nonexistent file: "dir"
34 [255]
34 35
35 36 -f, but no args
36 37
@@ -495,11 +496,13 b' log -r ""'
495 496
496 497 $ hg log -r ''
497 498 hg: parse error: empty query
499 [255]
498 500
499 501 log -r <some unknown node id>
500 502
501 503 $ hg log -r 1000000000000000000000000000000000000000
502 504 abort: unknown revision '1000000000000000000000000000000000000000'!
505 [255]
503 506
504 507 log -k r1
505 508
@@ -658,6 +661,7 b' log -b dummy'
658 661
659 662 $ hg log -b dummy
660 663 abort: unknown revision 'dummy'!
664 [255]
661 665
662 666
663 667 log -b .
@@ -899,6 +903,7 b' log -p -R repo'
899 903 merging foo failed!
900 904 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
901 905 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
906 [1]
902 907 $ echo 'merge 1' > foo
903 908 $ hg resolve -m foo
904 909 $ hg ci -m "First merge, related"
@@ -909,6 +914,7 b' log -p -R repo'
909 914 merging foo failed!
910 915 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
911 916 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
917 [1]
912 918 $ echo 'merge 2' > foo
913 919 $ hg resolve -m foo
914 920 $ hg ci -m "Last merge, related"
@@ -60,9 +60,11 b' The next two calls are expected to abort'
60 60
61 61 $ hg manifest -r 2
62 62 abort: unknown revision '2'!
63 [255]
63 64
64 65 $ hg manifest -r tip tip
65 66 abort: please specify just one revision
67 [255]
66 68
67 69
68 70 $ true
@@ -44,6 +44,7 b' fail with three heads'
44 44 $ hg merge
45 45 abort: branch 'default' has 3 heads - please merge with an explicit rev
46 46 (run 'hg heads .' to see heads)
47 [255]
47 48
48 49 close one of the heads
49 50 $ hg up -C 6
@@ -29,6 +29,7 b' Should fail because not at a head:'
29 29 $ hg merge
30 30 abort: branch 'default' has 3 heads - please merge with an explicit rev
31 31 (run 'hg heads .' to see heads)
32 [255]
32 33
33 34 $ hg up
34 35 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -39,6 +40,7 b' Should fail because > 2 heads:'
39 40 $ hg merge
40 41 abort: branch 'default' has 3 heads - please merge with an explicit rev
41 42 (run 'hg heads .' to see heads)
43 [255]
42 44
43 45 Should succeed:
44 46
@@ -65,6 +67,7 b' Should fail because at tip:'
65 67
66 68 $ hg merge
67 69 abort: there is nothing to merge
70 [255]
68 71
69 72 $ hg up 0
70 73 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -73,6 +76,7 b' Should fail because there is only one he'
73 76
74 77 $ hg merge
75 78 abort: there is nothing to merge - use "hg update" instead
79 [255]
76 80
77 81 $ hg up 3
78 82 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -87,6 +91,7 b' Should fail because merge with other bra'
87 91 $ hg merge
88 92 abort: branch 'foobranch' has one head - please merge with an explicit rev
89 93 (run 'hg heads' to see all heads)
94 [255]
90 95
91 96
92 97 Test for issue2043: ensure that 'merge -P' shows ancestors of 6 that
@@ -20,6 +20,7 b' Should fail, since there are deleted fil'
20 20
21 21 $ hg merge
22 22 abort: outstanding uncommitted changes (use 'hg status' to list changes)
23 [255]
23 24
24 25 Should succeed with --force:
25 26
@@ -43,6 +43,7 b' Merge using internal:fail tool:'
43 43 $ hg merge
44 44 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
45 45 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
46 [1]
46 47
47 48 $ cat f
48 49 line 1
@@ -57,6 +57,7 b' Local merge with bad merge tool:'
57 57 merging zzz2_merge_bad failed!
58 58 3 files updated, 1 files merged, 2 files removed, 1 files unresolved
59 59 use 'hg resolve' to retry unresolved file merges
60 [1]
60 61
61 62 $ hg co 0
62 63 merging zzz1_merge_ok
@@ -65,6 +66,7 b' Local merge with bad merge tool:'
65 66 merging zzz2_merge_bad failed!
66 67 2 files updated, 1 files merged, 3 files removed, 1 files unresolved
67 68 use 'hg resolve' to retry unresolved file merges
69 [1]
68 70
69 71 $ hg diff --nodates | grep "^[+-][^<>]"
70 72 --- a/zzz1_merge_ok
@@ -89,6 +91,7 b' Local merge with conflicts:'
89 91 merging zzz2_merge_bad failed!
90 92 3 files updated, 1 files merged, 2 files removed, 1 files unresolved
91 93 use 'hg resolve' to retry unresolved file merges
94 [1]
92 95
93 96 $ hg co 0
94 97 merging zzz1_merge_ok
@@ -97,6 +100,7 b' Local merge with conflicts:'
97 100 merging zzz2_merge_bad failed!
98 101 2 files updated, 1 files merged, 3 files removed, 1 files unresolved
99 102 use 'hg resolve' to retry unresolved file merges
103 [1]
100 104
101 105 $ hg diff --nodates | grep "^[+-][^<>]"
102 106 --- a/zzz1_merge_ok
@@ -48,6 +48,7 b''
48 48 merging file1 failed!
49 49 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
50 50 use 'hg resolve' to retry unresolved file merges
51 [1]
51 52
52 53 $ hg diff --nodates
53 54 diff -r dfab7f3c2efb file1
@@ -69,6 +69,7 b' no merges expected'
69 69 merge should fail
70 70 $ hg merge 1
71 71 abort: untracked file in working directory differs from file in requested revision: 'b'
72 [255]
72 73 merge of b expected
73 74 $ hg merge -f 1
74 75 merging for b
@@ -111,6 +112,7 b' Contents of b should be "this is file b1'
111 112 merge fails
112 113 $ hg merge 2
113 114 abort: outstanding uncommitted changes (use 'hg status' to list changes)
115 [255]
114 116 $ echo %% merge expected!
115 117 %% merge expected!
116 118 $ hg merge -f 2
@@ -148,6 +150,7 b' merge fails'
148 150 merge of b should fail
149 151 $ hg merge 2
150 152 abort: outstanding uncommitted changes (use 'hg status' to list changes)
153 [255]
151 154 merge of b expected
152 155 $ hg merge -f 2
153 156 merging for b
@@ -15,6 +15,7 b''
15 15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 16 $ hg update
17 17 abort: crosses branches (use 'hg merge' or use 'hg update -c')
18 [255]
18 19 $ hg update -c
19 20 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
20 21 $ mv a c
@@ -27,6 +28,7 b' Should abort:'
27 28
28 29 $ hg update -y 1
29 30 abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes)
31 [255]
30 32 $ mv c a
31 33
32 34 Should succeed:
@@ -48,6 +48,7 b' now pull and merge from test-a'
48 48 merging test.txt failed!
49 49 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
50 50 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
51 [1]
51 52 resolve conflict
52 53 $ cat >test.txt <<"EOF"
53 54 > one
@@ -92,6 +93,7 b' pull and merge from test-a again'
92 93 merging test.txt failed!
93 94 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
94 95 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
96 [1]
95 97
96 98 $ cat test.txt
97 99 one
@@ -31,6 +31,7 b' test with the rename on the remote side'
31 31 merging foo and baz to baz
32 32 1 files updated, 1 files merged, 0 files removed, 1 files unresolved
33 33 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
34 [1]
34 35 $ hg resolve -l
35 36 U bar
36 37 R baz
@@ -44,6 +45,7 b' test with the rename on the local side'
44 45 merging baz and foo to baz
45 46 1 files updated, 1 files merged, 0 files removed, 1 files unresolved
46 47 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
48 [1]
47 49
48 50 show unresolved
49 51 $ hg resolve -l
@@ -75,12 +77,14 b' after resolve'
75 77 resolve all warning
76 78 $ hg resolve
77 79 abort: no files or directories specified; use --all to remerge all files
80 [255]
78 81
79 82 resolve all
80 83 $ hg resolve -a
81 84 merging bar
82 85 warning: conflicts during merge.
83 86 merging bar failed!
87 [1]
84 88
85 89 after
86 90 $ hg resolve -l
@@ -60,6 +60,7 b' should fail in strict mode'
60 60 patch failed, unable to continue (try -v)
61 61 patch failed, rejects left in working dir
62 62 errors during apply, please fix and refresh eol.diff
63 [2]
63 64 $ hg qpop
64 65 popping eol.diff
65 66 patch queue now empty
@@ -71,6 +72,7 b' invalid eol'
71 72 patch failed, unable to continue (try -v)
72 73 patch failed, rejects left in working dir
73 74 errors during apply, please fix and refresh eol.diff
75 [2]
74 76 $ hg qpop
75 77 popping eol.diff
76 78 patch queue now empty
@@ -34,12 +34,14 b' should fail'
34 34
35 35 $ hg qguard does-not-exist.patch +bleh
36 36 abort: no patch named does-not-exist.patch
37 [255]
37 38
38 39
39 40 should fail
40 41
41 42 $ hg qguard +fail
42 43 abort: no patches applied
44 [255]
43 45
44 46 $ hg qpush
45 47 applying a.patch
@@ -62,6 +64,7 b' should fail'
62 64
63 65 $ hg qpush a.patch
64 66 cannot push 'a.patch' - guarded by ['+a']
67 [1]
65 68
66 69 $ hg qguard a.patch
67 70 a.patch: +a
@@ -80,6 +83,7 b' test selection of an empty guard'
80 83
81 84 $ hg qselect ""
82 85 abort: guard cannot be an empty string
86 [255]
83 87 $ hg qselect a
84 88 number of unguarded, unapplied patches has changed from 2 to 3
85 89
@@ -23,6 +23,7 b' try to commit on top of a patch'
23 23 $ echo quux >> foo
24 24 $ hg ci -m 'append quux'
25 25 abort: cannot commit over an applied mq patch
26 [255]
26 27
27 28
28 29 cheat a bit...
@@ -36,18 +37,23 b' qpop/qrefresh on the wrong revision'
36 37
37 38 $ hg qpop
38 39 abort: popping would remove a revision not managed by this patch queue
40 [255]
39 41 $ hg qpop -n patches
40 42 using patch queue: .*/repo/.hg/patches
41 43 abort: popping would remove a revision not managed by this patch queue
44 [255]
42 45 $ hg qrefresh
43 46 abort: working directory revision is not qtip
47 [255]
44 48
45 49 $ hg up -C qtip
46 50 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 51 $ hg qpop
48 52 abort: popping would remove a revision not managed by this patch queue
53 [255]
49 54 $ hg qrefresh
50 55 abort: cannot refresh a revision with children
56 [255]
51 57 $ hg tip --template '{rev} {desc}\n'
52 58 3 append quux
53 59
@@ -136,6 +136,7 b' qinit -c should create both files if the'
136 136 $ cat .hg/patches/series
137 137 $ hg qinit -c
138 138 abort: repository .* already exists!
139 [255]
139 140 $ cd ..
140 141
141 142 $ echo '% qinit; <stuff>; qinit -c'
@@ -196,6 +197,7 b' init --mq without repo'
196 197 $ cd f
197 198 $ hg init --mq
198 199 abort: there is no Mercurial repository here (.hg not found)
200 [255]
199 201 $ cd ..
200 202
201 203 init --mq with repo path
@@ -209,6 +211,7 b' init --mq with nonexistent directory'
209 211
210 212 $ hg init --mq nonexistentdir
211 213 abort: repository nonexistentdir not found!
214 [255]
212 215
213 216
214 217 init --mq with bundle (non "local")
@@ -216,6 +219,7 b' init --mq with bundle (non "local")'
216 219 $ hg -R a bundle --all a.bundle >/dev/null
217 220 $ hg init --mq a.bundle
218 221 abort: only a local queue repository may be initialized
222 [255]
219 223
220 224 $ cd a
221 225
@@ -370,6 +374,7 b' next'
370 374
371 375 $ hg qunapp -1
372 376 all patches applied
377 [1]
373 378
374 379 $ hg qpop
375 380 popping test2.patch
@@ -379,12 +384,14 b' commit should fail'
379 384
380 385 $ hg commit
381 386 abort: cannot commit over an applied mq patch
387 [255]
382 388
383 389 push should fail
384 390
385 391 $ hg push ../../k
386 392 pushing to ../../k
387 393 abort: source has mq patches applied
394 [255]
388 395
389 396
390 397 import should fail
@@ -395,6 +402,7 b' import should fail'
395 402 $ hg revert --no-backup ../a
396 403 $ hg import ../../import.diff
397 404 abort: cannot import over an applied patch
405 [255]
398 406 $ hg st
399 407
400 408 import --no-commit should succeed
@@ -454,6 +462,7 b' qpush --move'
454 462 $ hg qguard test2.patch -- +posguard
455 463 $ hg qpush --move test2.patch # can't move guarded patch
456 464 cannot push 'test2.patch' - guarded by ['+posguard']
465 [1]
457 466 $ hg qselect posguard
458 467 number of unguarded, unapplied patches has changed from 2 to 3
459 468 $ hg qpush --move test2.patch # move to front
@@ -490,10 +499,13 b' cleaning up'
490 499 now at: test1b.patch
491 500 $ hg qpush --move bogus # nonexistent patch
492 501 abort: patch bogus not in series
502 [255]
493 503 $ hg qpush --move # no patch
494 504 abort: please specify the patch to move
505 [255]
495 506 $ hg qpush --move test.patch # already applied
496 507 abort: cannot push to a previous patch: test.patch
508 [255]
497 509 $ hg qpush
498 510 applying test2.patch
499 511 now at: test2.patch
@@ -520,6 +532,7 b' qapplied -1 test.patch'
520 532
521 533 $ hg qapplied -1 test.patch
522 534 only one patch applied
535 [1]
523 536
524 537 qapplied -1 test1b.patch
525 538
@@ -553,6 +566,7 b' qunapplied -1'
553 566
554 567 $ hg qunapplied -1
555 568 all patches applied
569 [1]
556 570
557 571 qunapplied
558 572
@@ -582,6 +596,7 b' qunapplied -1 test2.patch'
582 596
583 597 $ hg qunapplied -1 test2.patch
584 598 all patches applied
599 [1]
585 600
586 601 popping -a
587 602
@@ -598,6 +613,7 b' qapplied -1'
598 613
599 614 $ hg qapplied -1
600 615 no patches applied
616 [1]
601 617 $ hg qpush
602 618 applying test.patch
603 619 now at: test.patch
@@ -760,6 +776,7 b' strip with local changes, should complai'
760 776 $ hg add y
761 777 $ hg strip tip
762 778 abort: local changes found
779 [255]
763 780
764 781 --force strip with local changes
765 782
@@ -835,6 +852,7 b' qpush failure'
835 852 patch failed, unable to continue (try -v)
836 853 patch failed, rejects left in working dir
837 854 errors during apply, please fix and refresh bar
855 [2]
838 856 $ hg st
839 857 ? foo
840 858 ? foo.rej
@@ -865,6 +883,7 b' bad node in status'
865 883 default 0:cb9a9f314b8b
866 884 $ hg qpop
867 885 no patches applied
886 [1]
868 887
869 888 $ cat >>$HGRCPATH <<EOF
870 889 > [diff]
@@ -1064,6 +1083,7 b' check binary patches can be popped and p'
1064 1083 popping addbucephalus
1065 1084 now at: addalexander
1066 1085 $ test -f bucephalus && echo % bucephalus should not be there
1086 [1]
1067 1087 $ hg qpush
1068 1088 applying addbucephalus
1069 1089 now at: addbucephalus
@@ -1162,6 +1182,7 b' repo with unversioned patch dir'
1162 1182
1163 1183 $ hg qclone qclonesource failure
1164 1184 abort: versioned patch repository not found (see init --mq)
1185 [255]
1165 1186
1166 1187 $ cd qclonesource
1167 1188 $ hg qinit -c
@@ -1254,6 +1275,7 b' qpush should fail, local changes'
1254 1275
1255 1276 $ hg qpush
1256 1277 abort: local changes found, refresh first
1278 [255]
1257 1279
1258 1280
1259 1281 apply force, should not discard changes with empty patch
@@ -1299,6 +1321,7 b' qpush should fail, local changes'
1299 1321
1300 1322 $ hg qpush
1301 1323 abort: local changes found, refresh first
1324 [255]
1302 1325
1303 1326
1304 1327 apply force, should discard changes in hello, but not bye
@@ -12,13 +12,16 b' Should fail:'
12 12
13 13 $ hg st b/x
14 14 abort: path 'b/x' is inside repo 'b'
15 [255]
15 16 $ hg add b/x
16 17 abort: path 'b/x' is inside repo 'b'
18 [255]
17 19
18 20 Should fail:
19 21
20 22 $ hg add b b/x
21 23 abort: path 'b/x' is inside repo 'b'
24 [255]
22 25 $ hg st
23 26
24 27 Should arguably print nothing:
@@ -32,5 +35,6 b' Should fail:'
32 35
33 36 $ hg mv a b
34 37 abort: path 'b/a' is inside repo 'b'
38 [255]
35 39 $ hg st
36 40
@@ -20,6 +20,7 b' Branch shadowing:'
20 20
21 21 $ hg branch default
22 22 abort: a branch of the same name already exists (use 'hg update' to switch to it)
23 [255]
23 24
24 25 $ hg branch -f default
25 26 marked working directory as branch default
@@ -186,6 +187,7 b' Update with no arguments: tipmost revisi'
186 187
187 188 $ hg up
188 189 abort: branch foobar not found
190 [255]
189 191
190 192 Fastforward merge:
191 193
@@ -292,6 +294,7 b' Implicit merge with test branch as paren'
292 294 $ hg merge
293 295 abort: branch 'test' has one head - please merge with an explicit rev
294 296 (run 'hg heads' to see all heads)
297 [255]
295 298 $ hg up -C default
296 299 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
297 300
@@ -300,6 +303,7 b' Implicit merge with default branch as pa'
300 303 $ hg merge
301 304 abort: branch 'default' has 3 heads - please merge with an explicit rev
302 305 (run 'hg heads .' to see heads)
306 [255]
303 307
304 308 3 branch heads, explicit merge required:
305 309
@@ -54,6 +54,7 b' hg parents c, single revision'
54 54
55 55 $ hg parents -r 3 c
56 56 abort: 'c' not found in manifest!
57 [255]
57 58
58 59 $ hg parents -r 2
59 60 changeset: 1:d786049f033a
@@ -71,6 +72,7 b' hg parents c, single revision'
71 72
72 73 $ hg parents -r 2 ../a
73 74 abort: ../a not under root
75 [255]
74 76
75 77
76 78 cd dir; hg parents -r 2 ../a
@@ -93,6 +95,7 b' cd dir; hg parents -r 2 ../a'
93 95
94 96 $ hg parents -r 2 glob:a
95 97 abort: can only specify an explicit filename
98 [255]
96 99
97 100
98 101 merge working dir with 2 parents, hg parents c
@@ -18,10 +18,13 b' This runs with TZ="GMT"'
18 18 $ echo "fail" >> a
19 19 $ hg ci -d "should fail" -m "fail"
20 20 abort: invalid date: 'should fail'
21 [255]
21 22 $ hg ci -d "100000000000000000 1400" -m "fail"
22 23 abort: date exceeds 32 bits: 100000000000000000
24 [255]
23 25 $ hg ci -d "100000 1400000" -m "fail"
24 26 abort: impossible time zone offset: 1400000
27 [255]
25 28
26 29 Check with local timezone other than GMT and with DST
27 30
@@ -62,6 +62,7 b''
62 62 1 files changed, 1 insertions(+), 0 deletions(-)
63 63
64 64 are you sure you want to send (yn)? abort: patchbomb canceled
65 [255]
65 66
66 67 $ echo b > b
67 68 $ hg commit -Amb -d '2 0'
@@ -1447,6 +1448,7 b' test inreplyto:'
1447 1448 This patch series consists of 2 patches.
1448 1449
1449 1450 abort: Subject: [PATCH 0 of 2] Please enter a valid value
1451 [255]
1450 1452
1451 1453 $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
1452 1454 > -s test -r 0:1 | fixheaders
@@ -8,8 +8,10 b''
8 8 $ hg in dupe
9 9 comparing with .*/test-paths.t/b
10 10 no changes found
11 [1]
11 12 $ cd ..
12 13 $ hg -R a in dupe
13 14 comparing with .*/test-paths.t/b
14 15 no changes found
16 [1]
15 17 $ true
@@ -34,6 +34,7 b' Pull a missing revision:'
34 34
35 35 $ hg pull -qr missing ../repo
36 36 abort: unknown revision 'missing'!
37 [255]
37 38
38 39 Pull multiple revisions with update:
39 40
@@ -69,6 +69,7 b" Test 'file:' uri handling:"
69 69
70 70 $ hg pull -q file://../test-doesnt-exist
71 71 abort: repository /test-doesnt-exist not found!
72 [255]
72 73
73 74 $ hg pull -q file:../test
74 75
@@ -35,6 +35,7 b' Expected to fail:'
35 35 2 files, 2 changesets, 2 total revisions
36 36 1 integrity errors encountered!
37 37 (first damaged changeset appears to be 1)
38 [1]
38 39
39 40 Expected to fail:
40 41
@@ -47,6 +48,7 b' Expected to fail:'
47 48 transaction abort!
48 49 rollback completed
49 50 abort: missing file data for beta:dddc47b3ba30e54484720ce0f4f768a0f4b6efb9 - run hg verify
51 [255]
50 52
51 53 $ true
52 54
@@ -28,6 +28,7 b''
28 28 searching for changes
29 29 abort: push creates new remote heads on branch 'default'!
30 30 (you should pull and merge or use push -f to force)
31 [255]
31 32
32 33 $ hg pull ../a
33 34 pulling from ../a
@@ -43,6 +44,7 b''
43 44 searching for changes
44 45 abort: push creates new remote heads on branch 'default'!
45 46 (did you forget to merge? use push -f to force)
47 [255]
46 48
47 49 $ hg merge
48 50 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -139,6 +141,7 b''
139 141 comparing with ../c
140 142 searching for changes
141 143 no changes found
144 [1]
142 145
143 146
144 147 Issue 450:
@@ -315,6 +318,7 b' Failed push of new named branch:'
315 318
316 319 $ echo 12 > foo
317 320 $ hg -q ci -m 12a
321 [1]
318 322 $ hg -q up 11
319 323 $ echo 13 > foo
320 324 $ hg -q branch e
@@ -372,6 +376,7 b' multiple new heads:'
372 376 searching for changes
373 377 abort: push creates new remote heads on branch 'default'!
374 378 (you should pull and merge or use push -f to force)
379 [255]
375 380
376 381
377 382 Check prepush logic with merged branches:
@@ -405,6 +410,7 b' Check prepush logic with merged branches'
405 410 searching for changes
406 411 abort: push creates new remote branches: b!
407 412 (use 'hg push --new-branch' to create new remote branches)
413 [255]
408 414
409 415
410 416 Prepush -r should not allow you to sneak in new heads:
@@ -440,6 +446,7 b' Prepush -r should not allow you to sneak'
440 446 searching for changes
441 447 abort: push creates new remote heads on branch 'a'!
442 448 (did you forget to merge? use push -f to force)
449 [255]
443 450
444 451 $ cd ..
445 452
@@ -685,17 +692,20 b' outgoing:'
685 692 searching for changes
686 693 abort: push creates new remote heads on branch 'A'!
687 694 (did you forget to merge? use push -f to force)
695 [255]
688 696
689 697 $ hg push inner -r4 -r5
690 698 pushing to inner
691 699 searching for changes
692 700 abort: push creates new remote heads on branch 'A'!
693 701 (did you forget to merge? use push -f to force)
702 [255]
694 703
695 704 $ hg in inner
696 705 comparing with inner
697 706 searching for changes
698 707 no changes found
708 [1]
699 709
700 710 $ cd ..
701 711
@@ -32,6 +32,7 b' help (no mq, so no qrecord)'
32 32 update update working directory (or switch revisions)
33 33
34 34 use "hg help" for the full list of commands or "hg -v" for details
35 [255]
35 36
36 37 help (mq present)
37 38
@@ -86,6 +86,7 b' Select files but no hunks'
86 86 new file mode 100644
87 87 examine changes to 'empty-rw'? [Ynsfdaq?]
88 88 abort: empty commit message
89 [255]
89 90
90 91 $ hg tip -p
91 92 changeset: -1:000000000000
@@ -698,6 +699,7 b' Help, quit'
698 699 ? - display help
699 700 examine changes to 'subdir/f1'? [Ynsfdaq?]
700 701 abort: user quit
702 [255]
701 703
702 704 Skip
703 705
@@ -710,6 +712,7 b' Skip'
710 712 diff --git a/subdir/f2 b/subdir/f2
711 713 1 hunks, 1 lines changed
712 714 examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected
715 [255]
713 716
714 717 No
715 718
@@ -722,6 +725,7 b' No'
722 725 diff --git a/subdir/f2 b/subdir/f2
723 726 1 hunks, 1 lines changed
724 727 examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected
728 [255]
725 729
726 730 f, quit
727 731
@@ -736,6 +740,7 b' f, quit'
736 740 1 hunks, 1 lines changed
737 741 examine changes to 'subdir/f2'? [Ynsfdaq?]
738 742 abort: user quit
743 [255]
739 744
740 745 s, all
741 746
@@ -926,6 +931,7 b' Abort early when a merge is in progress'
926 931
927 932 $ hg record -m'will abort'
928 933 abort: cannot partially commit a merge (use hg commit instead)
934 [255]
929 935
930 936 $ hg up -C
931 937 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -10,4 +10,5 b" test that 'hg commit' does not crash if "
10 10 $ hg commit -A -m"comment #1"
11 11 removing b
12 12 nothing changed
13 [1]
13 14 $ exit 0
@@ -268,6 +268,7 b' overwrite existing files (d2/b)'
268 268 @@ -1 +1 @@
269 269 -d1/b
270 270 +d2/b
271 [1]
271 272 $ hg update -C
272 273 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
273 274 $ rm d2/a d2/ba d2/d11/a1
@@ -276,6 +277,7 b' attempt to move one file into a non-exis'
276 277
277 278 $ hg rename d1/a dx/
278 279 abort: destination dx/ is not a directory
280 [255]
279 281 $ hg status -C
280 282 $ hg update -C
281 283 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -284,6 +286,7 b' attempt to move potentially more than on'
284 286
285 287 $ hg rename 'glob:d1/**' dx
286 288 abort: with multiple sources, destination must be an existing directory
289 [255]
287 290
288 291 move every file under d1 to d2/d21 (glob)
289 292
@@ -560,14 +563,17 b' check illegal path components'
560 563
561 564 $ hg rename d1/d11/a1 .hg/foo
562 565 abort: path contains illegal component: .hg/foo
566 [255]
563 567 $ hg status -C
564 568 $ hg rename d1/d11/a1 ../foo
565 569 abort: ../foo not under root
570 [255]
566 571 $ hg status -C
567 572
568 573 $ mv d1/d11/a1 .hg/foo
569 574 $ hg rename --after d1/d11/a1 .hg/foo
570 575 abort: path contains illegal component: .hg/foo
576 [255]
571 577 $ hg status -C
572 578 ! d1/d11/a1
573 579 $ hg update -C
@@ -576,14 +582,17 b' check illegal path components'
576 582
577 583 $ hg rename d1/d11/a1 .hg
578 584 abort: path contains illegal component: .hg/a1
585 [255]
579 586 $ hg status -C
580 587 $ hg rename d1/d11/a1 ..
581 588 abort: ../a1 not under root
589 [255]
582 590 $ hg status -C
583 591
584 592 $ mv d1/d11/a1 .hg
585 593 $ hg rename --after d1/d11/a1 .hg
586 594 abort: path contains illegal component: .hg/a1
595 [255]
587 596 $ hg status -C
588 597 ! d1/d11/a1
589 598 $ hg update -C
@@ -592,8 +601,10 b' check illegal path components'
592 601
593 602 $ (cd d1/d11; hg rename ../../d2/b ../../.hg/foo)
594 603 abort: path contains illegal component: .hg/foo
604 [255]
595 605 $ hg status -C
596 606 $ (cd d1/d11; hg rename ../../d2/b ../../../foo)
597 607 abort: ../../../foo not under root
608 [255]
598 609 $ hg status -C
599 610
@@ -7,8 +7,10 b''
7 7 $ rm .hg/requires
8 8 $ hg tip
9 9 abort: index 00changelog.i unknown format 2!
10 [255]
10 11 $ echo indoor-pool > .hg/requires
11 12 $ hg tip
12 13 abort: requirement 'indoor-pool' not supported!
14 [255]
13 15
14 16 $ true
@@ -24,6 +24,7 b' failing merge'
24 24 $ HGMERGE=internal:fail hg merge
25 25 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
26 26 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
27 [1]
27 28
28 29 $ echo resolved > file
29 30 $ hg resolve -m file
@@ -186,6 +186,7 b' should fail - no arguments'
186 186
187 187 $ hg revert -rtip
188 188 abort: no files or directories specified; use --all to revert the whole repo
189 [255]
189 190
190 191 should succeed
191 192
@@ -61,6 +61,7 b''
61 61 marked working directory as branch all
62 62 $ hg ci --close-branch -Aqm8
63 63 abort: can only close branch heads
64 [255]
64 65
65 66 $ hg co 4
66 67 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -97,11 +98,13 b' names that should work without quoting'
97 98 7
98 99 $ try -- '-a-b-c-' # complains
99 100 hg: parse error at 7: not a prefix: end
101 [255]
100 102 $ log -a-b-c- # succeeds with fallback
101 103 4
102 104 $ try -- -a-b-c--a # complains
103 105 ('minus', ('minus', ('minus', ('negate', ('symbol', 'a')), ('symbol', 'b')), ('symbol', 'c')), ('negate', ('symbol', 'a')))
104 106 abort: unknown revision '-a'!
107 [255]
105 108 $ try é
106 109 ('symbol', '\xc3\xa9')
107 110 9
@@ -143,21 +146,28 b' quoting needed'
143 146 4
144 147 $ log 'date(this is a test)'
145 148 hg: parse error at 10: unexpected token: symbol
149 [255]
146 150 $ log 'date()'
147 151 hg: parse error: date wants a string
152 [255]
148 153 $ log 'date'
149 154 hg: parse error: can't use date here
155 [255]
150 156 $ log 'date('
151 157 hg: parse error at 5: not a prefix: end
158 [255]
152 159 $ log 'date(tip)'
153 160 abort: invalid date: 'tip'
161 [255]
154 162 $ log '"date"'
155 163 abort: unknown revision 'date'!
164 [255]
156 165 $ log 'date(2005) and 1::'
157 166 4
158 167
159 168 $ log 'ancestor(1)'
160 169 hg: parse error: ancestor wants two arguments
170 [255]
161 171 $ log 'ancestor(4,5)'
162 172 1
163 173 $ log 'ancestor(4,5) and 4'
@@ -268,6 +268,7 b' test unknown color'
268 268 merging b failed!
269 269 0 files updated, 0 files merged, 0 files removed, 2 files unresolved
270 270 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
271 [1]
271 272 $ hg resolve -m b
272 273
273 274 hg resolve with one unresolved, one resolved:
@@ -35,6 +35,7 b''
35 35 update update working directory (or switch revisions)
36 36
37 37 use "hg help" for the full list of commands or "hg -v" for details
38 [255]
38 39 $ hg annotate a
39 40 0: a
40 41
@@ -29,5 +29,6 b' test bad subpaths pattern'
29 29 > EOF
30 30 $ hg debugsub
31 31 abort: bad subrepository pattern in .*/test-subrepo-paths.t/outer/.hg/hgrc:2: invalid group reference
32 [255]
32 33
33 34 $ exit 0
@@ -253,6 +253,7 b' Clone and test outgoing:'
253 253 comparing with .*/test-subrepo-recursion.t/repo/foo
254 254 searching for changes
255 255 no changes found
256 [1]
256 257 $ echo $?
257 258 0
258 259
@@ -315,6 +316,7 b' Test incoming:'
315 316
316 317 $ hg incoming -S --bundle incoming.hg
317 318 abort: cannot combine --bundle and --subrepos
319 [255]
318 320
319 321 Test missing subrepo:
320 322
@@ -153,6 +153,7 b' this commit fails because of externals c'
153 153 $ hg ci -m 'amend externals from hg'
154 154 committing subrepository s
155 155 abort: cannot commit svn externals
156 [255]
156 157 $ hg diff --subrepos -r 1:2 | grep -v diff
157 158 --- a/.hgsubstate Thu Jan 01 00:00:00 1970 +0000
158 159 +++ b/.hgsubstate Thu Jan 01 00:00:00 1970 +0000
@@ -173,6 +174,7 b' this commit fails because of externals m'
173 174 $ hg ci -m 'amend externals from hg'
174 175 committing subrepository s
175 176 abort: cannot commit svn externals
177 [255]
176 178 $ svn revert -q s/externals/other
177 179
178 180 clone
@@ -21,6 +21,7 b' issue2232 - committing a subrepo without'
21 21
22 22 $ hg ci -mbad s
23 23 abort: can't commit subrepos without .hgsub
24 [255]
24 25
25 26 $ hg -R s ci -Ams0
26 27 adding a
@@ -302,6 +303,7 b' push -f'
302 303 searching for changes
303 304 abort: push creates new remote heads on branch 'default'!
304 305 (did you forget to merge? use push -f to force)
306 [255]
305 307 $ hg push -f
306 308 pushing .*sub/t
307 309 pushing .*sub/t/s/ss
@@ -361,6 +363,7 b' bogus subrepo path aborts'
361 363 $ echo 'bogus=[boguspath' >> .hgsub
362 364 $ hg ci -m 'bogus subrepo path'
363 365 abort: missing ] in subrepo source
366 [255]
364 367
365 368 issue 1986
366 369
@@ -577,6 +580,7 b' issue 1977'
577 580 $ hg -q -R repo2 push
578 581 abort: push creates new remote heads on branch 'default'!
579 582 (did you forget to merge? use push -f to force)
583 [255]
580 584 $ hg -R repo update
581 585 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
582 586 $ rm -rf repo2 repo
@@ -178,6 +178,7 b' now addremove should remove old files'
178 178 $ ln -s nothing dangling
179 179 $ hg commit -m 'commit symlink without adding' dangling
180 180 abort: dangling: file not tracked!
181 [255]
181 182 $ hg add dangling
182 183 $ hg commit -m 'add symlink'
183 184
@@ -14,6 +14,7 b''
14 14
15 15 $ hg tag ' '
16 16 abort: tag names cannot consist entirely of whitespace
17 [255]
17 18
18 19 $ hg tag "bleah"
19 20 $ hg history
@@ -88,8 +89,10 b''
88 89 $ hg tag -l 'xx
89 90 > newline'
90 91 abort: '\n' cannot be used in a tag name
92 [255]
91 93 $ hg tag -l 'xx:xx'
92 94 abort: ':' cannot be used in a tag name
95 [255]
93 96
94 97 cloning local tags
95 98
@@ -242,6 +242,7 b' Remove nonexistent tag:'
242 242
243 243 $ hg tag --remove foobar
244 244 abort: tag 'foobar' does not exist
245 [255]
245 246 $ hg tip
246 247 changeset: 5:5f6e8655b1c7
247 248 tag: tip
@@ -290,6 +291,7 b" Don't allow moving tag without -f:"
290 291
291 292 $ hg tag -r 3 bar
292 293 abort: tag 'bar' already exists (use -f to force)
294 [255]
293 295 $ hg tags
294 296 tip 6:735c3ca72986
295 297 bar 0:bbd179dfa0a7
@@ -356,10 +358,12 b' to remove a tag of type X which actually'
356 358 $ hg tag -r 0 -l localtag
357 359 $ hg tag --remove localtag
358 360 abort: tag 'localtag' is not a global tag
361 [255]
359 362 $
360 363 $ hg tag -r 0 globaltag
361 364 $ hg tag --remove -l globaltag
362 365 abort: tag 'globaltag' is not a local tag
366 [255]
363 367 $ hg tags -v
364 368 tip 1:a0b6fe111088
365 369 localtag 0:bbd179dfa0a7 local
@@ -207,6 +207,7 b' transplant --continue'
207 207 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
208 208 patch failed to apply
209 209 abort: fix up the merge and run hg transplant --continue
210 [255]
210 211
211 212 transplant -c shouldn't use an old changeset
212 213
@@ -220,6 +221,7 b" transplant -c shouldn't use an old chang"
220 221 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
221 222 patch failed to apply
222 223 abort: fix up the merge and run hg transplant --continue
224 [255]
223 225 $ hg transplant --continue
224 226 a1e30dd1b8e7 transplanted as f1563cf27039
225 227 $ hg transplant 1:3
@@ -320,6 +322,7 b' test filter with failed patch'
320 322 1 out of 1 hunks FAILED -- saving rejects to file b1.rej
321 323 patch failed to apply
322 324 abort: fix up the merge and run hg transplant --continue
325 [255]
323 326 $ cd ..
324 327
325 328
@@ -345,6 +348,7 b' test with a win32ext like setup (differi'
345 348 $ python -c "file('b', 'wb').write('b\r\nb\r\n')"
346 349 $ hg ci -m addb
347 350 nothing changed
351 [1]
348 352 $ hg transplant -s ../twin1 tip
349 353 applying 2e849d776c17
350 354 2e849d776c17 transplanted to 589cea8ba85b
@@ -17,6 +17,7 b''
17 17 pulling from ../a
18 18 searching for changes
19 19 abort: repository is unrelated
20 [255]
20 21
21 22 $ hg pull -f ../a
22 23 pulling from ../a
@@ -10,6 +10,7 b''
10 10 $ echo dirty > foo
11 11 $ hg up -c
12 12 abort: uncommitted local changes
13 [255]
13 14 $ hg up -q
14 15 $ cat foo
15 16 dirty
@@ -23,6 +24,7 b' Validate update of standalone execute bi'
23 24 $ chmod -x foo
24 25 $ hg ci -m removeexec
25 26 nothing changed
27 [1]
26 28 $ hg up -C 0
27 29 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
28 30 $ hg up
@@ -24,6 +24,7 b''
24 24 merging b failed!
25 25 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
26 26 use 'hg resolve' to retry unresolved file merges
27 [1]
27 28
28 29 $ cd ..
29 30
@@ -10,15 +10,18 b''
10 10 adding a
11 11 abort: username 'foo\nbar1' contains a newline
12 12
13 [255]
13 14 $ rm .hg/hgrc
14 15
15 16 $ HGUSER=`(echo foo; echo bar2)` hg ci -Am m
16 17 abort: username 'foo\nbar2' contains a newline
17 18
19 [255]
18 20 $ hg ci -Am m -u "`(echo foo; echo bar3)`"
19 21 transaction abort!
20 22 rollback completed
21 23 abort: username 'foo\nbar3' contains a newline!
24 [255]
22 25
23 26 $ true
24 27
@@ -56,6 +56,7 b' introduce some bugs in repo'
56 56 3 files, 1 changesets, 0 total revisions
57 57 9 integrity errors encountered!
58 58 (first damaged changeset appears to be 0)
59 [1]
59 60
60 61 $ cd ..
61 62
@@ -83,6 +84,7 b' test revlog corruption'
83 84 1 warnings encountered!
84 85 1 integrity errors encountered!
85 86 (first damaged changeset appears to be 0)
87 [1]
86 88
87 89 $ cd ..
88 90
@@ -160,8 +160,10 b''
160 160 f mammals/skunk skunk
161 161 $ hg debugwalk .hg
162 162 abort: path 'mammals/.hg' is inside repo 'mammals'
163 [255]
163 164 $ hg debugwalk ../.hg
164 165 abort: path contains illegal component: .hg
166 [255]
165 167 $ cd ..
166 168
167 169 $ hg debugwalk -Ibeans
@@ -187,16 +189,22 b''
187 189 f mammals/skunk mammals/skunk
188 190 $ hg debugwalk ..
189 191 abort: .. not under root
192 [255]
190 193 $ hg debugwalk beans/../..
191 194 abort: beans/../.. not under root
195 [255]
192 196 $ hg debugwalk .hg
193 197 abort: path contains illegal component: .hg
198 [255]
194 199 $ hg debugwalk beans/../.hg
195 200 abort: path contains illegal component: .hg
201 [255]
196 202 $ hg debugwalk beans/../.hg/data
197 203 abort: path contains illegal component: .hg/data
204 [255]
198 205 $ hg debugwalk beans/.hg
199 206 abort: path 'beans/.hg' is inside repo 'beans'
207 [255]
200 208
201 209 Test absolute paths:
202 210
@@ -209,6 +217,7 b' Test absolute paths:'
209 217 f beans/turtle beans/turtle
210 218 $ hg debugwalk `pwd`/..
211 219 abort: .*/.. not under root
220 [255]
212 221
213 222 Test patterns:
214 223
General Comments 0
You need to be logged in to leave comments. Login now