##// END OF EJS Templates
tests: cleanup exit code handling in unified tests
Matt Mackall -
r12365:22f3353b default
parent child Browse files
Show More
@@ -20,7 +20,7 b''
20 $ hg st
20 $ hg st
21 A a
21 A a
22 ? b
22 ? b
23 $ hg add b || echo "failed to add b"
23 $ hg add b
24 $ hg st
24 $ hg st
25 A a
25 A a
26 A b
26 A b
@@ -2,9 +2,6 b''
2 abort: error: Connection refused
2 abort: error: Connection refused
3 [255]
3 [255]
4
4
5 $ echo $?
6 0
7
8 $ test -d copy || echo copy: No such file or directory
5 $ test -d copy || echo copy: No such file or directory
9 copy: No such file or directory
6 copy: No such file or directory
10
7
@@ -30,7 +27,4 b' give the server some time to start runni'
30 abort: HTTP Error 404: .*
27 abort: HTTP Error 404: .*
31 [255]
28 [255]
32
29
33 $ echo $?
34 0
35
36 $ kill $!
30 $ kill $!
@@ -133,34 +133,22 b''
133 $ heads -r 3 .
133 $ heads -r 3 .
134 no open branch heads found on branches c (started at 3)
134 no open branch heads found on branches c (started at 3)
135 [1]
135 [1]
136 $ echo $?
137 0
138 $ heads -r 2 .
136 $ heads -r 2 .
139 7: Adding c branch (c)
137 7: Adding c branch (c)
140 $ echo $?
141 0
142 -------
138 -------
143 $ hg update -C 4
139 $ hg update -C 4
144 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
140 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
145 $ echo $?
146 0
147 -------
141 -------
148 $ heads -r 3 .
142 $ heads -r 3 .
149 3: Adding b branch head 1 (b)
143 3: Adding b branch head 1 (b)
150 $ echo $?
151 0
152 -------
144 -------
153 $ heads -r 2 .
145 $ heads -r 2 .
154 6: Merging b branch head 2 and b branch head 3 (b)
146 6: Merging b branch head 2 and b branch head 3 (b)
155 3: Adding b branch head 1 (b)
147 3: Adding b branch head 1 (b)
156 $ echo $?
157 0
158 -------
148 -------
159 $ heads -r 7 .
149 $ heads -r 7 .
160 no open branch heads found on branches b (started at 7)
150 no open branch heads found on branches b (started at 7)
161 [1]
151 [1]
162 $ echo $?
163 0
164
152
165 =======
153 =======
166
154
@@ -1,4 +1,3 b''
1 $ set -e
2 $ hg init
1 $ hg init
3
2
4
3
@@ -270,12 +269,14 b' skip'
270 date: Thu Jan 01 00:00:01 1970 +0000
269 date: Thu Jan 01 00:00:01 1970 +0000
271 summary: msg 1
270 summary: msg 1
272
271
272 $ false
273 [1]
274
273
275
274 $ hg bisect -r
276 $ hg bisect -r
275 $ hg bisect -g tip
277 $ hg bisect -g tip
276 $ hg bisect -b tip || echo error
278 $ hg bisect -b tip
277 abort: starting revisions are not directly related
279 abort: starting revisions are not directly related
278 error
279
280
280 $ hg bisect -r
281 $ hg bisect -r
281 $ hg bisect -g null
282 $ hg bisect -g null
@@ -346,9 +347,8 b' reproduce non converging bisect, issue11'
346 test no action
347 test no action
347
348
348 $ hg bisect -r
349 $ hg bisect -r
349 $ hg bisect || echo failure
350 $ hg bisect
350 abort: cannot bisect (no known good revisions)
351 abort: cannot bisect (no known good revisions)
351 failure
352
352
353
353
354 reproduce AssertionError, issue1445
354 reproduce AssertionError, issue1445
@@ -27,8 +27,6 b' o 0'
27 > hg -q ci -m"rev $revno"
27 > hg -q ci -m"rev $revno"
28 > }
28 > }
29
29
30 $ set -e
31
32 setup test repo1
30 setup test repo1
33
31
34 $ hg init repo1
32 $ hg init repo1
@@ -43,7 +43,7 b' chmod +x:'
43 $ hg tip -q
43 $ hg tip -q
44 2:3a34410f282e
44 2:3a34410f282e
45
45
46 $ test -x new || echo failed
46 $ test -x new
47
47
48 Copy:
48 Copy:
49
49
@@ -65,10 +65,10 b' Copy:'
65 3:37bacb7ca14d
65 3:37bacb7ca14d
66
66
67 $ if "$TESTDIR/hghave" -q execbit; then
67 $ if "$TESTDIR/hghave" -q execbit; then
68 > test -f copy -a ! -x copy || echo failed
68 > test -f copy -a ! -x copy || echo bad
69 > test -x copyx || echo failed
69 > test -x copyx || echo bad
70 > else
70 > else
71 > test -f copy || echo failed
71 > test -f copy || echo bad
72 > fi
72 > fi
73
73
74 $ cat copy
74 $ cat copy
@@ -117,7 +117,8 b' Delete:'
117 new
117 new
118 rename
118 rename
119
119
120 $ test -f copyx && echo failed || true
120 $ test -f copyx
121 [1]
121
122
122 Regular diff:
123 Regular diff:
123
124
@@ -71,8 +71,6 b' o (0) root'
71
71
72 $ "$TESTDIR/hghave" no-outer-repo || exit 80
72 $ "$TESTDIR/hghave" no-outer-repo || exit 80
73
73
74 $ set -e
75
76 $ commit()
74 $ commit()
77 > {
75 > {
78 > rev=$1
76 > rev=$1
@@ -681,12 +679,12 b' File glog:'
681
679
682
680
683 Unused arguments:
681 Unused arguments:
684 $ hg glog -q foo bar || echo failed
682 $ hg glog -q foo bar
685 hg glog: invalid arguments
683 hg glog: invalid arguments
686 hg glog [OPTION]... [FILE]
684 hg glog [OPTION]... [FILE]
687
685
688 show revision history alongside an ASCII revision graph
686 show revision history alongside an ASCII revision graph
689 failed
687 [255]
690
688
691 Empty revision range - display nothing:
689 Empty revision range - display nothing:
692 $ hg glog -r 1..0
690 $ hg glog -r 1..0
@@ -22,12 +22,11 b''
22
22
23 $ touch nottracked
23 $ touch nottracked
24
24
25 $ hg locate a && echo locate succeeded || echo locate failed
25 $ hg locate a
26 a
26 a
27 locate succeeded
28
27
29 $ hg locate NONEXISTENT && echo locate succeeded || echo locate failed
28 $ hg locate NONEXISTENT
30 locate failed
29 [1]
31
30
32 $ hg locate
31 $ hg locate
33 a
32 a
@@ -6,7 +6,6 b' 840e2b315c1f: Fix misleading error and p'
6 (issue556)
6 (issue556)
7
7
8 $ status() {
8 $ status() {
9 > [ $? -ne 0 ] && echo "failed."
10 > echo "--- status ---"
9 > echo "--- status ---"
11 > hg st -A file1 file2
10 > hg st -A file1 file2
12 > for file in file1 file2; do
11 > for file in file1 file2; do
@@ -42,7 +41,7 b' 840e2b315c1f: Fix misleading error and p'
42
41
43 Non-interactive merge:
42 Non-interactive merge:
44
43
45 $ hg merge -y || echo "failed"
44 $ hg merge -y
46 local changed file1 which remote deleted
45 local changed file1 which remote deleted
47 use (c)hanged version or (d)elete? c
46 use (c)hanged version or (d)elete? c
48 remote changed file2 which local deleted
47 remote changed file2 which local deleted
@@ -67,7 +66,7 b' Interactive merge:'
67 $ hg co -C
66 $ hg co -C
68 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
67 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
69
68
70 $ hg merge --config ui.interactive=true <<EOF || echo "failed"
69 $ hg merge --config ui.interactive=true <<EOF
71 > c
70 > c
72 > d
71 > d
73 > EOF
72 > EOF
@@ -91,7 +90,7 b' Interactive merge with bad input:'
91 $ hg co -C
90 $ hg co -C
92 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
91 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
93
92
94 $ hg merge --config ui.interactive=true <<EOF || echo "failed"
93 $ hg merge --config ui.interactive=true <<EOF
95 > foo
94 > foo
96 > bar
95 > bar
97 > d
96 > d
@@ -124,13 +123,13 b' Interactive merge with not enough input:'
124 $ hg co -C
123 $ hg co -C
125 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
124 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
126
125
127 $ hg merge --config ui.interactive=true <<EOF || echo "failed"
126 $ hg merge --config ui.interactive=true <<EOF
128 > d
127 > d
129 > EOF
128 > EOF
130 local changed file1 which remote deleted
129 local changed file1 which remote deleted
131 use (c)hanged version or (d)elete? remote changed file2 which local deleted
130 use (c)hanged version or (d)elete? remote changed file2 which local deleted
132 use (c)hanged version or leave (d)eleted? abort: response expected
131 use (c)hanged version or leave (d)eleted? abort: response expected
133 failed
132 [255]
134
133
135 $ status
134 $ status
136 --- status ---
135 --- status ---
@@ -204,8 +204,7 b' init --mq with repo path'
204
204
205 $ hg init g
205 $ hg init g
206 $ hg init --mq g
206 $ hg init --mq g
207 $ test -d g/.hg/patches/.hg && echo "ok" || echo "failed"
207 $ test -d g/.hg/patches/.hg
208 ok
209
208
210 init --mq with nonexistent directory
209 init --mq with nonexistent directory
211
210
@@ -633,14 +632,6 b' push should succeed'
633 added 1 changesets with 1 changes to 1 files
632 added 1 changesets with 1 changes to 1 files
634
633
635
634
636 qpush/qpop error codes
637
638 $ errorcode()
639 > {
640 > hg "$@" && echo " $@ succeeds" || echo " $@ fails"
641 > }
642
643
644 we want to start with some patches applied
635 we want to start with some patches applied
645
636
646 $ hg qpush -a
637 $ hg qpush -a
@@ -651,105 +642,92 b' we want to start with some patches appli'
651
642
652 % pops all patches and succeeds
643 % pops all patches and succeeds
653
644
654 $ errorcode qpop -a
645 $ hg qpop -a
655 popping test2.patch
646 popping test2.patch
656 popping test1b.patch
647 popping test1b.patch
657 popping test.patch
648 popping test.patch
658 patch queue now empty
649 patch queue now empty
659 qpop -a succeeds
660
650
661 % does nothing and succeeds
651 % does nothing and succeeds
662
652
663 $ errorcode qpop -a
653 $ hg qpop -a
664 no patches applied
654 no patches applied
665 qpop -a succeeds
666
655
667 % fails - nothing else to pop
656 % fails - nothing else to pop
668
657
669 $ errorcode qpop
658 $ hg qpop
670 no patches applied
659 no patches applied
671 qpop fails
660 [1]
672
661
673 % pushes a patch and succeeds
662 % pushes a patch and succeeds
674
663
675 $ errorcode qpush
664 $ hg qpush
676 applying test.patch
665 applying test.patch
677 now at: test.patch
666 now at: test.patch
678 qpush succeeds
679
667
680 % pops a patch and succeeds
668 % pops a patch and succeeds
681
669
682 $ errorcode qpop
670 $ hg qpop
683 popping test.patch
671 popping test.patch
684 patch queue now empty
672 patch queue now empty
685 qpop succeeds
686
673
687 % pushes up to test1b.patch and succeeds
674 % pushes up to test1b.patch and succeeds
688
675
689 $ errorcode qpush test1b.patch
676 $ hg qpush test1b.patch
690 applying test.patch
677 applying test.patch
691 applying test1b.patch
678 applying test1b.patch
692 now at: test1b.patch
679 now at: test1b.patch
693 qpush test1b.patch succeeds
694
680
695 % does nothing and succeeds
681 % does nothing and succeeds
696
682
697 $ errorcode qpush test1b.patch
683 $ hg qpush test1b.patch
698 qpush: test1b.patch is already at the top
684 qpush: test1b.patch is already at the top
699 qpush test1b.patch succeeds
700
685
701 % does nothing and succeeds
686 % does nothing and succeeds
702
687
703 $ errorcode qpop test1b.patch
688 $ hg qpop test1b.patch
704 qpop: test1b.patch is already at the top
689 qpop: test1b.patch is already at the top
705 qpop test1b.patch succeeds
706
690
707 % fails - can't push to this patch
691 % fails - can't push to this patch
708
692
709 $ errorcode qpush test.patch
693 $ hg qpush test.patch
710 abort: cannot push to a previous patch: test.patch
694 abort: cannot push to a previous patch: test.patch
711 qpush test.patch fails
695 [255]
712
696
713 % fails - can't pop to this patch
697 % fails - can't pop to this patch
714
698
715 $ errorcode qpop test2.patch
699 $ hg qpop test2.patch
716 abort: patch test2.patch is not applied
700 abort: patch test2.patch is not applied
717 qpop test2.patch fails
701 [255]
718
702
719 % pops up to test.patch and succeeds
703 % pops up to test.patch and succeeds
720
704
721 $ errorcode qpop test.patch
705 $ hg qpop test.patch
722 popping test1b.patch
706 popping test1b.patch
723 now at: test.patch
707 now at: test.patch
724 qpop test.patch succeeds
725
708
726 % pushes all patches and succeeds
709 % pushes all patches and succeeds
727
710
728 $ errorcode qpush -a
711 $ hg qpush -a
729 applying test1b.patch
712 applying test1b.patch
730 applying test2.patch
713 applying test2.patch
731 now at: test2.patch
714 now at: test2.patch
732 qpush -a succeeds
733
715
734 % does nothing and succeeds
716 % does nothing and succeeds
735
717
736 $ errorcode qpush -a
718 $ hg qpush -a
737 all patches are currently applied
719 all patches are currently applied
738 qpush -a succeeds
739
720
740 % fails - nothing else to push
721 % fails - nothing else to push
741
722
742 $ errorcode qpush
723 $ hg qpush
743 patch series already fully applied
724 patch series already fully applied
744 qpush fails
725 [1]
745
726
746 % does nothing and succeeds
727 % does nothing and succeeds
747
728
748 $ errorcode qpush test2.patch
729 $ hg qpush test2.patch
749 qpush: test2.patch is already at the top
730 qpush: test2.patch is already at the top
750 qpush test2.patch succeeds
751
752
753
731
754 strip
732 strip
755
733
@@ -1087,7 +1065,7 b' check binary patches can be popped and p'
1087 $ hg qpush
1065 $ hg qpush
1088 applying addbucephalus
1066 applying addbucephalus
1089 now at: addbucephalus
1067 now at: addbucephalus
1090 $ test -f bucephalus || echo % bucephalus should be there
1068 $ test -f bucephalus
1091 $ python "$TESTDIR/md5sum.py" bucephalus
1069 $ python "$TESTDIR/md5sum.py" bucephalus
1092 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
1070 8ba2a2f3e77b55d03051ff9c24ad65e7 bucephalus
1093
1071
@@ -91,7 +91,7 b' Test 12-hours times'
91 $ hg debugdate "2006-02-01 1:00:30PM +0000"
91 $ hg debugdate "2006-02-01 1:00:30PM +0000"
92 internal: 1138798830 0
92 internal: 1138798830 0
93 standard: Wed Feb 01 13:00:30 2006 +0000
93 standard: Wed Feb 01 13:00:30 2006 +0000
94 $ hg debugdate "1:00:30PM" > /dev/null || echo 'failed'
94 $ hg debugdate "1:00:30PM" > /dev/null
95
95
96 Test date formats with '>' or '<' accompanied by space characters
96 Test date formats with '>' or '<' accompanied by space characters
97
97
@@ -15,17 +15,17 b''
15
15
16 $ chmod -r .hg/store/data/a.i
16 $ chmod -r .hg/store/data/a.i
17
17
18 $ hg verify || echo %%% verify failed
18 $ hg verify
19 checking changesets
19 checking changesets
20 checking manifests
20 checking manifests
21 crosschecking files in changesets and manifests
21 crosschecking files in changesets and manifests
22 checking files
22 checking files
23 abort: Permission denied: .*
23 abort: Permission denied: .*
24 %%% verify failed
24 [255]
25
25
26 $ chmod +r .hg/store/data/a.i
26 $ chmod +r .hg/store/data/a.i
27
27
28 $ hg verify || echo %%% verify failed
28 $ hg verify
29 checking changesets
29 checking changesets
30 checking manifests
30 checking manifests
31 crosschecking files in changesets and manifests
31 crosschecking files in changesets and manifests
@@ -35,10 +35,10 b''
35 $ chmod -w .hg/store/data/a.i
35 $ chmod -w .hg/store/data/a.i
36
36
37 $ echo barber > a
37 $ echo barber > a
38 $ hg commit -m "2" || echo %%% commit failed
38 $ hg commit -m "2"
39 trouble committing a!
39 trouble committing a!
40 abort: Permission denied: .*
40 abort: Permission denied: .*
41 %%% commit failed
41 [255]
42
42
43 $ chmod -w .
43 $ chmod -w .
44
44
@@ -92,50 +92,47 b''
92
92
93 $ hg ci -m c-d
93 $ hg ci -m c-d
94
94
95 $ hg push ../c; echo $?
95 $ hg push ../c
96 pushing to ../c
96 pushing to ../c
97 searching for changes
97 searching for changes
98 abort: push creates new remote heads on branch 'default'!
98 abort: push creates new remote heads on branch 'default'!
99 (did you forget to merge? use push -f to force)
99 (did you forget to merge? use push -f to force)
100 255
100 [255]
101
101
102 $ hg push -r 2 ../c; echo $?
102 $ hg push -r 2 ../c
103 pushing to ../c
103 pushing to ../c
104 searching for changes
104 searching for changes
105 no changes found
105 no changes found
106 0
107
106
108 $ hg push -r 3 ../c; echo $?
107 $ hg push -r 3 ../c
109 pushing to ../c
108 pushing to ../c
110 searching for changes
109 searching for changes
111 abort: push creates new remote heads on branch 'default'!
110 abort: push creates new remote heads on branch 'default'!
112 (did you forget to merge? use push -f to force)
111 (did you forget to merge? use push -f to force)
113 255
112 [255]
114
113
115 $ hg push -r 3 -r 4 ../c; echo $?
114 $ hg push -r 3 -r 4 ../c
116 pushing to ../c
115 pushing to ../c
117 searching for changes
116 searching for changes
118 abort: push creates new remote heads on branch 'default'!
117 abort: push creates new remote heads on branch 'default'!
119 (did you forget to merge? use push -f to force)
118 (did you forget to merge? use push -f to force)
120 255
119 [255]
121
120
122 $ hg push -f -r 3 -r 4 ../c; echo $?
121 $ hg push -f -r 3 -r 4 ../c
123 pushing to ../c
122 pushing to ../c
124 searching for changes
123 searching for changes
125 adding changesets
124 adding changesets
126 adding manifests
125 adding manifests
127 adding file changes
126 adding file changes
128 added 2 changesets with 2 changes to 1 files (+2 heads)
127 added 2 changesets with 2 changes to 1 files (+2 heads)
129 0
130
128
131 $ hg push -r 5 ../c; echo $?
129 $ hg push -r 5 ../c
132 pushing to ../c
130 pushing to ../c
133 searching for changes
131 searching for changes
134 adding changesets
132 adding changesets
135 adding manifests
133 adding manifests
136 adding file changes
134 adding file changes
137 added 1 changesets with 1 changes to 1 files (-1 heads)
135 added 1 changesets with 1 changes to 1 files (-1 heads)
138 0
139
136
140 $ hg in ../c
137 $ hg in ../c
141 comparing with ../c
138 comparing with ../c
@@ -147,23 +144,21 b''
147 Issue 450:
144 Issue 450:
148
145
149 $ hg init ../e
146 $ hg init ../e
150 $ hg push -r 0 ../e ; echo $?
147 $ hg push -r 0 ../e
151 pushing to ../e
148 pushing to ../e
152 searching for changes
149 searching for changes
153 adding changesets
150 adding changesets
154 adding manifests
151 adding manifests
155 adding file changes
152 adding file changes
156 added 1 changesets with 1 changes to 1 files
153 added 1 changesets with 1 changes to 1 files
157 0
158
154
159 $ hg push -r 1 ../e ; echo $?
155 $ hg push -r 1 ../e
160 pushing to ../e
156 pushing to ../e
161 searching for changes
157 searching for changes
162 adding changesets
158 adding changesets
163 adding manifests
159 adding manifests
164 adding file changes
160 adding file changes
165 added 1 changesets with 1 changes to 1 files
161 added 1 changesets with 1 changes to 1 files
166 0
167
162
168 $ cd ..
163 $ cd ..
169
164
@@ -199,19 +194,19 b' Push on existing branch and new branch:'
199 $ hg -q branch c
194 $ hg -q branch c
200 $ hg -q ci -m 5
195 $ hg -q ci -m 5
201
196
202 $ hg push ../f; echo $?
197 $ hg push ../f
203 pushing to ../f
198 pushing to ../f
204 searching for changes
199 searching for changes
205 abort: push creates new remote branches: c!
200 abort: push creates new remote branches: c!
206 (use 'hg push --new-branch' to create new remote branches)
201 (use 'hg push --new-branch' to create new remote branches)
207 255
202 [255]
208
203
209 $ hg push -r 4 -r 5 ../f; echo $?
204 $ hg push -r 4 -r 5 ../f
210 pushing to ../f
205 pushing to ../f
211 searching for changes
206 searching for changes
212 abort: push creates new remote branches: c!
207 abort: push creates new remote branches: c!
213 (use 'hg push --new-branch' to create new remote branches)
208 (use 'hg push --new-branch' to create new remote branches)
214 255
209 [255]
215
210
216
211
217 Multiple new branches:
212 Multiple new branches:
@@ -220,19 +215,19 b' Multiple new branches:'
220 $ echo 6 > foo
215 $ echo 6 > foo
221 $ hg -q ci -m 6
216 $ hg -q ci -m 6
222
217
223 $ hg push ../f; echo $?
218 $ hg push ../f
224 pushing to ../f
219 pushing to ../f
225 searching for changes
220 searching for changes
226 abort: push creates new remote branches: c, d!
221 abort: push creates new remote branches: c, d!
227 (use 'hg push --new-branch' to create new remote branches)
222 (use 'hg push --new-branch' to create new remote branches)
228 255
223 [255]
229
224
230 $ hg push -r 4 -r 6 ../f; echo $?
225 $ hg push -r 4 -r 6 ../f
231 pushing to ../f
226 pushing to ../f
232 searching for changes
227 searching for changes
233 abort: push creates new remote branches: c, d!
228 abort: push creates new remote branches: c, d!
234 (use 'hg push --new-branch' to create new remote branches)
229 (use 'hg push --new-branch' to create new remote branches)
235 255
230 [255]
236
231
237 $ cd ../g
232 $ cd ../g
238
233
@@ -243,12 +238,12 b' Fail on multiple head push:'
243 $ echo 7 > foo
238 $ echo 7 > foo
244 $ hg -q ci -m 7
239 $ hg -q ci -m 7
245
240
246 $ hg push -r 4 -r 7 ../f; echo $?
241 $ hg push -r 4 -r 7 ../f
247 pushing to ../f
242 pushing to ../f
248 searching for changes
243 searching for changes
249 abort: push creates new remote heads on branch 'a'!
244 abort: push creates new remote heads on branch 'a'!
250 (did you forget to merge? use push -f to force)
245 (did you forget to merge? use push -f to force)
251 255
246 [255]
252
247
253 Push replacement head on existing branches:
248 Push replacement head on existing branches:
254
249
@@ -256,14 +251,13 b' Push replacement head on existing branch'
256 $ echo 8 > foo
251 $ echo 8 > foo
257 $ hg -q ci -m 8
252 $ hg -q ci -m 8
258
253
259 $ hg push -r 7 -r 8 ../f; echo $?
254 $ hg push -r 7 -r 8 ../f
260 pushing to ../f
255 pushing to ../f
261 searching for changes
256 searching for changes
262 adding changesets
257 adding changesets
263 adding manifests
258 adding manifests
264 adding file changes
259 adding file changes
265 added 2 changesets with 2 changes to 1 files
260 added 2 changesets with 2 changes to 1 files
266 0
267
261
268
262
269 Merge of branch a to other branch b followed by unrelated push
263 Merge of branch a to other branch b followed by unrelated push
@@ -276,23 +270,21 b' on branch a:'
276 $ echo 10 > foo
270 $ echo 10 > foo
277 $ hg -q ci -m 10
271 $ hg -q ci -m 10
278
272
279 $ hg push -r 9 ../f; echo $?
273 $ hg push -r 9 ../f
280 pushing to ../f
274 pushing to ../f
281 searching for changes
275 searching for changes
282 adding changesets
276 adding changesets
283 adding manifests
277 adding manifests
284 adding file changes
278 adding file changes
285 added 1 changesets with 1 changes to 1 files (-1 heads)
279 added 1 changesets with 1 changes to 1 files (-1 heads)
286 0
287
280
288 $ hg push -r 10 ../f; echo $?
281 $ hg push -r 10 ../f
289 pushing to ../f
282 pushing to ../f
290 searching for changes
283 searching for changes
291 adding changesets
284 adding changesets
292 adding manifests
285 adding manifests
293 adding file changes
286 adding file changes
294 added 1 changesets with 1 changes to 1 files (+1 heads)
287 added 1 changesets with 1 changes to 1 files (+1 heads)
295 0
296
288
297
289
298 Cheating the counting algorithm:
290 Cheating the counting algorithm:
@@ -304,14 +296,13 b' Cheating the counting algorithm:'
304 $ echo 12 > foo
296 $ echo 12 > foo
305 $ hg -q ci -m 12
297 $ hg -q ci -m 12
306
298
307 $ hg push -r 11 -r 12 ../f; echo $?
299 $ hg push -r 11 -r 12 ../f
308 pushing to ../f
300 pushing to ../f
309 searching for changes
301 searching for changes
310 adding changesets
302 adding changesets
311 adding manifests
303 adding manifests
312 adding file changes
304 adding file changes
313 added 2 changesets with 2 changes to 1 files
305 added 2 changesets with 2 changes to 1 files
314 0
315
306
316
307
317 Failed push of new named branch:
308 Failed push of new named branch:
@@ -324,24 +315,23 b' Failed push of new named branch:'
324 $ hg -q branch e
315 $ hg -q branch e
325 $ hg -q ci -m 13d
316 $ hg -q ci -m 13d
326
317
327 $ hg push -r 12 -r 13 ../f; echo $?
318 $ hg push -r 12 -r 13 ../f
328 pushing to ../f
319 pushing to ../f
329 searching for changes
320 searching for changes
330 abort: push creates new remote branches: e!
321 abort: push creates new remote branches: e!
331 (use 'hg push --new-branch' to create new remote branches)
322 (use 'hg push --new-branch' to create new remote branches)
332 255
323 [255]
333
324
334
325
335 Using --new-branch to push new named branch:
326 Using --new-branch to push new named branch:
336
327
337 $ hg push --new-branch -r 12 -r 13 ../f; echo $?
328 $ hg push --new-branch -r 12 -r 13 ../f
338 pushing to ../f
329 pushing to ../f
339 searching for changes
330 searching for changes
340 adding changesets
331 adding changesets
341 adding manifests
332 adding manifests
342 adding file changes
333 adding file changes
343 added 1 changesets with 1 changes to 1 files
334 added 1 changesets with 1 changes to 1 files
344 0
345
335
346
336
347 Checking prepush logic does not allow silently pushing
337 Checking prepush logic does not allow silently pushing
@@ -1,6 +1,6 b''
1 $ remove() {
1 $ remove() {
2 > hg rm $@
2 > hg rm $@
3 > echo "exit code: $?"
3 > echo "exit code: $?" # no-check-code
4 > hg st
4 > hg st
5 > # do not use ls -R, which recurses in .hg subdirs on Mac OS X 10.5
5 > # do not use ls -R, which recurses in .hg subdirs on Mac OS X 10.5
6 > find . -name .hg -prune -o -type f -print | sort
6 > find . -name .hg -prune -o -type f -print | sort
@@ -1,5 +1,3 b''
1 $ set -e
2
3 $ mkdir test
1 $ mkdir test
4 $ cd test
2 $ cd test
5 $ echo foo>foo
3 $ echo foo>foo
@@ -214,11 +214,10 b' If result is not as expected, raise erro'
214 $ assert() {
214 $ assert() {
215 > hg status --color=always $1 > ../a
215 > hg status --color=always $1 > ../a
216 > hg status --color=always $2 > ../b
216 > hg status --color=always $2 > ../b
217 > out=`diff ../a ../b`
217 > if diff ../a ../b > /dev/null; then
218 > if [ $? -ne 0 ]; then
218 > out=0
219 > else
219 > out=1
220 > out=1
220 > else
221 > out=0
222 > fi
221 > fi
223 > if [ $3 -eq 0 ]; then
222 > if [ $3 -eq 0 ]; then
224 > df="same"
223 > df="same"
@@ -196,13 +196,12 b' Check if result is the same or different'
196 If result is not as expected, raise error
196 If result is not as expected, raise error
197
197
198 $ assert() {
198 $ assert() {
199 > hg status $1 > ../a
199 > hg status $1 > ../a
200 > hg status $2 > ../b
200 > hg status $2 > ../b
201 > out=`diff ../a ../b`
201 > if diff ../a ../b > /dev/null; then
202 > if [ $? -ne 0 ]; then
202 > out=0
203 > else
203 > out=1
204 > out=1
204 > else
205 > out=0
206 > fi
205 > fi
207 > if [ $3 -eq 0 ]; then
206 > if [ $3 -eq 0 ]; then
208 > df="same"
207 > df="same"
@@ -274,8 +274,6 b' Clone and test outgoing:'
274 searching for changes
274 searching for changes
275 no changes found
275 no changes found
276 [1]
276 [1]
277 $ echo $?
278 0
279
277
280 Make nested change:
278 Make nested change:
281
279
@@ -10,10 +10,7 b''
10 SVN wants all paths to start with a slash. Unfortunately, Windows ones
10 SVN wants all paths to start with a slash. Unfortunately, Windows ones
11 don't. Handle that.
11 don't. Handle that.
12
12
13 $ expr "$escapedwd" : "\/" > /dev/null
13 $ expr "$escapedwd" : / > /dev/null || escapedwd="/$escapedwd"
14 $ if [ $? -ne 0 ]; then
15 > escapedwd="/$escapedwd"
16 > fi
17 $ escapedwd=`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$escapedwd"`
14 $ escapedwd=`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$escapedwd"`
18 $ filterpath="s|$escapedwd|/root|"
15 $ filterpath="s|$escapedwd|/root|"
19 $ filteroutofdate='s/ in transaction.*/ is out of date/;s/Out of date: /File /'
16 $ filteroutofdate='s/ in transaction.*/ is out of date/;s/Out of date: /File /'
@@ -32,30 +32,30 b''
32
32
33
33
34 $ echo foo >> .hgtags
34 $ echo foo >> .hgtags
35 $ hg tag "bleah2" || echo "failed"
35 $ hg tag "bleah2"
36 abort: working copy of .hgtags is changed (please commit .hgtags manually)
36 abort: working copy of .hgtags is changed (please commit .hgtags manually)
37 failed
37 [255]
38
38
39 $ hg revert .hgtags
39 $ hg revert .hgtags
40 $ hg tag -r 0 x y z y y z || echo "failed"
40 $ hg tag -r 0 x y z y y z
41 abort: tag names must be unique
41 abort: tag names must be unique
42 failed
42 [255]
43 $ hg tag tap nada dot tip null . || echo "failed"
43 $ hg tag tap nada dot tip null .
44 abort: the name 'tip' is reserved
44 abort: the name 'tip' is reserved
45 failed
45 [255]
46 $ hg tag "bleah" || echo "failed"
46 $ hg tag "bleah"
47 abort: tag 'bleah' already exists (use -f to force)
47 abort: tag 'bleah' already exists (use -f to force)
48 failed
48 [255]
49 $ hg tag "blecch" "bleah" || echo "failed"
49 $ hg tag "blecch" "bleah"
50 abort: tag 'bleah' already exists (use -f to force)
50 abort: tag 'bleah' already exists (use -f to force)
51 failed
51 [255]
52
52
53 $ hg tag --remove "blecch" || echo "failed"
53 $ hg tag --remove "blecch"
54 abort: tag 'blecch' does not exist
54 abort: tag 'blecch' does not exist
55 failed
55 [255]
56 $ hg tag --remove "bleah" "blecch" "blough" || echo "failed"
56 $ hg tag --remove "bleah" "blecch" "blough"
57 abort: tag 'blecch' does not exist
57 abort: tag 'blecch' does not exist
58 failed
58 [255]
59
59
60 $ hg tag -r 0 "bleah0"
60 $ hg tag -r 0 "bleah0"
61 $ hg tag -l -r 1 "bleah1"
61 $ hg tag -l -r 1 "bleah1"
@@ -84,9 +84,9 b''
84 date: Thu Jan 01 00:00:00 1970 +0000
84 date: Thu Jan 01 00:00:00 1970 +0000
85 summary: 1
85 summary: 1
86
86
87 $ hg --debug merge || echo failed
87 $ hg --debug merge
88 abort: there is nothing to merge - use "hg update" instead
88 abort: there is nothing to merge - use "hg update" instead
89 failed
89 [255]
90 $ hg parents
90 $ hg parents
91 changeset: 0:c19d34741b0a
91 changeset: 0:c19d34741b0a
92 user: test
92 user: test
@@ -166,12 +166,12 b' create a second head'
166 date: Thu Jan 01 00:00:00 1970 +0000
166 date: Thu Jan 01 00:00:00 1970 +0000
167 summary: 2
167 summary: 2
168
168
169 $ hg --debug up || echo failed
169 $ hg --debug up
170 abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes)
170 abort: crosses branches (use 'hg merge' to merge or use 'hg update -C' to discard changes)
171 failed
171 [255]
172 $ hg --debug merge || echo failed
172 $ hg --debug merge
173 abort: outstanding uncommitted changes (use 'hg status' to list changes)
173 abort: outstanding uncommitted changes (use 'hg status' to list changes)
174 failed
174 [255]
175 $ hg --debug merge -f
175 $ hg --debug merge -f
176 searching for copies back to rev 1
176 searching for copies back to rev 1
177 resolving manifests
177 resolving manifests
General Comments 0
You need to be logged in to leave comments. Login now