Show More
@@ -3,7 +3,7 b'' | |||||
3 | $ hg init basic |
|
3 | $ hg init basic | |
4 | $ cd basic |
|
4 | $ cd basic | |
5 |
|
5 | |||
6 |
|
|
6 | should complain | |
7 |
|
|
7 | ||
8 | $ hg backout |
|
8 | $ hg backout | |
9 | abort: please specify a revision to backout |
|
9 | abort: please specify a revision to backout | |
@@ -12,7 +12,7 b'' | |||||
12 | abort: please specify just one revision |
|
12 | abort: please specify just one revision | |
13 | [255] |
|
13 | [255] | |
14 |
|
14 | |||
15 |
|
|
15 | basic operation | |
16 |
|
|
16 | ||
17 | $ echo a > a |
|
17 | $ echo a > a | |
18 | $ hg commit -d '0 0' -A -m a |
|
18 | $ hg commit -d '0 0' -A -m a | |
@@ -26,7 +26,7 b'' | |||||
26 | $ cat a |
|
26 | $ cat a | |
27 | a |
|
27 | a | |
28 |
|
28 | |||
29 |
|
|
29 | file that was removed is recreated | |
30 |
|
|
30 | ||
31 | $ cd .. |
|
31 | $ cd .. | |
32 | $ hg init remove |
|
32 | $ hg init remove | |
@@ -45,7 +45,7 b'' | |||||
45 | $ cat a |
|
45 | $ cat a | |
46 | content |
|
46 | content | |
47 |
|
47 | |||
48 |
|
|
48 | backout of backout is as if nothing happened | |
49 |
|
|
49 | ||
50 | $ hg backout -d '3 0' --merge tip |
|
50 | $ hg backout -d '3 0' --merge tip | |
51 | removing a |
|
51 | removing a | |
@@ -53,7 +53,7 b'' | |||||
53 | $ cat a 2>/dev/null || echo cat: a: No such file or directory |
|
53 | $ cat a 2>/dev/null || echo cat: a: No such file or directory | |
54 | cat: a: No such file or directory |
|
54 | cat: a: No such file or directory | |
55 |
|
55 | |||
56 |
|
|
56 | across branch | |
57 |
|
|
57 | ||
58 | $ cd .. |
|
58 | $ cd .. | |
59 | $ hg init branch |
|
59 | $ hg init branch | |
@@ -83,7 +83,7 b' should fail' | |||||
83 | abort: cannot backout change on a different branch |
|
83 | abort: cannot backout change on a different branch | |
84 | [255] |
|
84 | [255] | |
85 |
|
85 | |||
86 |
|
|
86 | backout with merge | |
87 |
|
|
87 | ||
88 | $ cd .. |
|
88 | $ cd .. | |
89 | $ hg init merge |
|
89 | $ hg init merge | |
@@ -119,7 +119,7 b' check line 1 is back' | |||||
119 | line 2 |
|
119 | line 2 | |
120 | line 3 |
|
120 | line 3 | |
121 |
|
121 | |||
122 |
|
|
122 | backout should not back out subsequent changesets | |
123 |
|
123 | |||
124 | $ hg init onecs |
|
124 | $ hg init onecs | |
125 | $ cd onecs |
|
125 | $ cd onecs | |
@@ -167,25 +167,25 b' check line 1 is back' | |||||
167 | (branch merge, don't forget to commit) |
|
167 | (branch merge, don't forget to commit) | |
168 | $ hg commit -d '4 0' -A -m d |
|
168 | $ hg commit -d '4 0' -A -m d | |
169 |
|
169 | |||
170 |
|
|
170 | backout of merge should fail | |
171 |
|
|
171 | ||
172 | $ hg backout 4 |
|
172 | $ hg backout 4 | |
173 | abort: cannot backout a merge changeset without --parent |
|
173 | abort: cannot backout a merge changeset without --parent | |
174 | [255] |
|
174 | [255] | |
175 |
|
175 | |||
176 |
|
|
176 | backout of merge with bad parent should fail | |
177 |
|
|
177 | ||
178 | $ hg backout --parent 0 4 |
|
178 | $ hg backout --parent 0 4 | |
179 | abort: cb9a9f314b8b is not a parent of b2f3bb92043e |
|
179 | abort: cb9a9f314b8b is not a parent of b2f3bb92043e | |
180 | [255] |
|
180 | [255] | |
181 |
|
181 | |||
182 |
|
|
182 | backout of non-merge with parent should fail | |
183 |
|
|
183 | ||
184 | $ hg backout --parent 0 3 |
|
184 | $ hg backout --parent 0 3 | |
185 | abort: cannot use --parent on non-merge changeset |
|
185 | abort: cannot use --parent on non-merge changeset | |
186 | [255] |
|
186 | [255] | |
187 |
|
187 | |||
188 |
|
|
188 | backout with valid parent should be ok | |
189 |
|
|
189 | ||
190 | $ hg backout -d '5 0' --parent 2 4 |
|
190 | $ hg backout -d '5 0' --parent 2 4 | |
191 | removing d |
|
191 | removing d | |
@@ -202,7 +202,7 b' check line 1 is back' | |||||
202 |
|
202 | |||
203 | $ cd .. |
|
203 | $ cd .. | |
204 |
|
204 | |||
205 |
|
|
205 | named branches | |
206 |
|
|
206 | ||
207 | $ hg init named_branches |
|
207 | $ hg init named_branches | |
208 | $ cd named_branches |
|
208 | $ cd named_branches |
@@ -1,4 +1,3 b'' | |||||
1 | # |
|
|||
2 |
|
|
1 | # A B | |
3 | # |
|
2 | # | |
4 | # 3 4 3 |
|
3 | # 3 4 3 | |
@@ -15,7 +14,6 b'' | |||||
15 | # |
|
14 | # | |
16 | # (plus we test a failure where outgoing |
|
15 | # (plus we test a failure where outgoing | |
17 | # wrongly reported the number of csets) |
|
16 | # wrongly reported the number of csets) | |
18 | # |
|
|||
19 |
|
17 | |||
20 | $ hg init a |
|
18 | $ hg init a | |
21 | $ cd a |
|
19 | $ cd a | |
@@ -40,9 +38,6 b'' | |||||
40 | (branch merge, don't forget to commit) |
|
38 | (branch merge, don't forget to commit) | |
41 | $ hg ci -A -m m1 |
|
39 | $ hg ci -A -m m1 | |
42 |
|
40 | |||
43 | #hg log |
|
|||
44 | #hg debugindex .hg/store/00manifest.i |
|
|||
45 |
|
||||
46 | $ hg update -C 1 |
|
41 | $ hg update -C 1 | |
47 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
42 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
48 | $ hg merge 2 |
|
43 | $ hg merge 2 | |
@@ -51,9 +46,6 b'' | |||||
51 | $ hg ci -A -m m2 |
|
46 | $ hg ci -A -m m2 | |
52 | created new head |
|
47 | created new head | |
53 |
|
48 | |||
54 | #hg log |
|
|||
55 | #hg debugindex .hg/store/00manifest.i |
|
|||
56 |
|
||||
57 | $ cd .. |
|
49 | $ cd .. | |
58 |
|
50 | |||
59 | $ hg clone -r 3 a b |
|
51 | $ hg clone -r 3 a b | |
@@ -135,4 +127,3 b'' | |||||
135 | adding file changes |
|
127 | adding file changes | |
136 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
128 | added 1 changesets with 0 changes to 0 files (+1 heads) | |
137 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
129 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
138 |
|
@@ -135,8 +135,9 b' Prepare custom diff/edit tool:' | |||||
135 |
|
135 | |||
136 | $ chmod +x 'diff tool.py' |
|
136 | $ chmod +x 'diff tool.py' | |
137 |
|
137 | |||
138 |
|
|
138 | will change to /tmp/extdiff.TMP and populate directories a.TMP and a | |
139 |
|
|
139 | and start tool | |
|
140 | ||||
140 | $ hg extdiff -p "`pwd`/diff tool.py" |
|
141 | $ hg extdiff -p "`pwd`/diff tool.py" | |
141 | [1] |
|
142 | [1] | |
142 |
|
143 |
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | test for issue351 | |
2 |
|
|
2 | ||
3 |
$ |
|
3 | $ echo "[extensions]" >> $HGRCPATH | |
4 |
$ |
|
4 | $ echo "mq=" >> $HGRCPATH |
@@ -1,5 +1,5 b'' | |||||
|
1 | some implementations of cp can't create hardlinks | |||
1 |
|
2 | |||
2 | # some implementations of cp can't create hardlinks |
|
|||
3 | $ cat > cp.py <<EOF |
|
3 | $ cat > cp.py <<EOF | |
4 | > from mercurial import util |
|
4 | > from mercurial import util | |
5 | > import sys |
|
5 | > import sys |
@@ -1,4 +1,4 b'' | |||||
1 | #!/bin/sh |
|
1 | Short help: | |
2 |
|
|
2 | ||
3 | $ hg |
|
3 | $ hg | |
4 | Mercurial Distributed SCM |
|
4 | Mercurial Distributed SCM |
@@ -1,6 +1,6 b'' | |||||
1 | $ cp "$TESTDIR"/printenv.py . |
|
1 | $ cp "$TESTDIR"/printenv.py . | |
2 |
|
2 | |||
3 |
|
|
3 | commit hooks can see env vars | |
4 |
|
|
4 | ||
5 |
$ |
|
5 | $ hg init a | |
6 | $ cd a |
|
6 | $ cd a | |
@@ -27,14 +27,14 b'' | |||||
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
28 | $ cd ../b |
|
28 | $ cd ../b | |
29 |
|
29 | |||
30 |
|
|
30 | changegroup hooks can see env vars | |
31 |
|
|
31 | ||
32 | $ echo '[hooks]' > .hg/hgrc |
|
32 | $ echo '[hooks]' > .hg/hgrc | |
33 | $ echo 'prechangegroup = python ../printenv.py prechangegroup' >> .hg/hgrc |
|
33 | $ echo 'prechangegroup = python ../printenv.py prechangegroup' >> .hg/hgrc | |
34 | $ echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc |
|
34 | $ echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc | |
35 | $ echo 'incoming = python ../printenv.py incoming' >> .hg/hgrc |
|
35 | $ echo 'incoming = python ../printenv.py incoming' >> .hg/hgrc | |
36 |
|
36 | |||
37 |
|
|
37 | pretxncommit and commit hooks can see both parents of merge | |
38 |
|
|
38 | ||
39 | $ cd ../a |
|
39 | $ cd ../a | |
40 | $ echo b >> a |
|
40 | $ echo b >> a | |
@@ -65,7 +65,7 b'' | |||||
65 | commit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd |
|
65 | commit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd | |
66 | commit.b hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd |
|
66 | commit.b hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd | |
67 |
|
67 | |||
68 |
|
|
68 | test generic hooks | |
69 |
|
69 | |||
70 | $ hg id |
|
70 | $ hg id | |
71 | pre-identify hook: HG_ARGS=id HG_OPTS={'tags': None, 'rev': '', 'num': None, 'branch': None, 'id': None} HG_PATS=[] |
|
71 | pre-identify hook: HG_ARGS=id HG_OPTS={'tags': None, 'rev': '', 'num': None, 'branch': None, 'id': None} HG_PATS=[] | |
@@ -91,7 +91,7 b'' | |||||
91 | added 3 changesets with 2 changes to 2 files |
|
91 | added 3 changesets with 2 changes to 2 files | |
92 | (run 'hg update' to get a working copy) |
|
92 | (run 'hg update' to get a working copy) | |
93 |
|
93 | |||
94 |
|
|
94 | tag hooks can see env vars | |
95 |
|
95 | |||
96 | $ cd ../a |
|
96 | $ cd ../a | |
97 | $ echo 'pretag = python ../printenv.py pretag' >> .hg/hgrc |
|
97 | $ echo 'pretag = python ../printenv.py pretag' >> .hg/hgrc | |
@@ -108,7 +108,7 b'' | |||||
108 | pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la |
|
108 | pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la | |
109 | tag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la |
|
109 | tag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la | |
110 |
|
110 | |||
111 |
|
|
111 | pretag hook can forbid tagging | |
112 |
|
112 | |||
113 | $ echo 'pretag.forbid = python ../printenv.py pretag.forbid 1' >> .hg/hgrc |
|
113 | $ echo 'pretag.forbid = python ../printenv.py pretag.forbid 1' >> .hg/hgrc | |
114 | $ hg tag -d '4 0' fa |
|
114 | $ hg tag -d '4 0' fa | |
@@ -122,8 +122,8 b'' | |||||
122 | abort: pretag.forbid hook exited with status 1 |
|
122 | abort: pretag.forbid hook exited with status 1 | |
123 | [255] |
|
123 | [255] | |
124 |
|
124 | |||
125 |
|
|
125 | pretxncommit hook can see changeset, can roll back txn, changeset no | |
126 |
|
|
126 | more there after | |
127 |
|
127 | |||
128 | $ echo 'pretxncommit.forbid0 = hg tip -q' >> .hg/hgrc |
|
128 | $ echo 'pretxncommit.forbid0 = hg tip -q' >> .hg/hgrc | |
129 | $ echo 'pretxncommit.forbid1 = python ../printenv.py pretxncommit.forbid 1' >> .hg/hgrc |
|
129 | $ echo 'pretxncommit.forbid1 = python ../printenv.py pretxncommit.forbid 1' >> .hg/hgrc | |
@@ -144,7 +144,7 b'' | |||||
144 | $ hg -q tip |
|
144 | $ hg -q tip | |
145 | 4:539e4b31b6dc |
|
145 | 4:539e4b31b6dc | |
146 |
|
146 | |||
147 |
|
|
147 | precommit hook can prevent commit | |
148 |
|
148 | |||
149 | $ echo 'precommit.forbid = python ../printenv.py precommit.forbid 1' >> .hg/hgrc |
|
149 | $ echo 'precommit.forbid = python ../printenv.py precommit.forbid 1' >> .hg/hgrc | |
150 | $ hg commit -m 'fail' -d '4 0' |
|
150 | $ hg commit -m 'fail' -d '4 0' | |
@@ -155,14 +155,14 b'' | |||||
155 | $ hg -q tip |
|
155 | $ hg -q tip | |
156 | 4:539e4b31b6dc |
|
156 | 4:539e4b31b6dc | |
157 |
|
157 | |||
158 |
|
|
158 | preupdate hook can prevent update | |
159 |
|
159 | |||
160 | $ echo 'preupdate = python ../printenv.py preupdate' >> .hg/hgrc |
|
160 | $ echo 'preupdate = python ../printenv.py preupdate' >> .hg/hgrc | |
161 | $ hg update 1 |
|
161 | $ hg update 1 | |
162 | preupdate hook: HG_PARENT1=ab228980c14d |
|
162 | preupdate hook: HG_PARENT1=ab228980c14d | |
163 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
163 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
164 |
|
164 | |||
165 |
|
|
165 | update hook | |
166 |
|
166 | |||
167 | $ echo 'update = python ../printenv.py update' >> .hg/hgrc |
|
167 | $ echo 'update = python ../printenv.py update' >> .hg/hgrc | |
168 | $ hg update |
|
168 | $ hg update | |
@@ -170,7 +170,7 b'' | |||||
170 | update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc |
|
170 | update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc | |
171 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
171 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
172 |
|
172 | |||
173 |
|
|
173 | prechangegroup hook can prevent incoming changes | |
174 |
|
174 | |||
175 | $ cd ../b |
|
175 | $ cd ../b | |
176 | $ hg -q tip |
|
176 | $ hg -q tip | |
@@ -184,8 +184,8 b'' | |||||
184 | abort: prechangegroup.forbid hook exited with status 1 |
|
184 | abort: prechangegroup.forbid hook exited with status 1 | |
185 | [255] |
|
185 | [255] | |
186 |
|
186 | |||
187 |
|
|
187 | pretxnchangegroup hook can see incoming changes, can roll back txn, | |
188 |
|
|
188 | incoming changes no longer there after | |
189 |
|
189 | |||
190 | $ echo '[hooks]' > .hg/hgrc |
|
190 | $ echo '[hooks]' > .hg/hgrc | |
191 | $ echo 'pretxnchangegroup.forbid0 = hg tip -q' >> .hg/hgrc |
|
191 | $ echo 'pretxnchangegroup.forbid0 = hg tip -q' >> .hg/hgrc | |
@@ -206,7 +206,7 b'' | |||||
206 | $ hg -q tip |
|
206 | $ hg -q tip | |
207 | 3:07f3376c1e65 |
|
207 | 3:07f3376c1e65 | |
208 |
|
208 | |||
209 |
|
|
209 | outgoing hooks can see env vars | |
210 |
|
210 | |||
211 | $ rm .hg/hgrc |
|
211 | $ rm .hg/hgrc | |
212 | $ echo '[hooks]' > ../a/.hg/hgrc |
|
212 | $ echo '[hooks]' > ../a/.hg/hgrc | |
@@ -225,7 +225,7 b'' | |||||
225 | $ hg rollback |
|
225 | $ hg rollback | |
226 | rolling back to revision 3 (undo pull) |
|
226 | rolling back to revision 3 (undo pull) | |
227 |
|
227 | |||
228 |
|
|
228 | preoutgoing hook can prevent outgoing changes | |
229 |
|
229 | |||
230 | $ echo 'preoutgoing.forbid = python ../printenv.py preoutgoing.forbid 1' >> ../a/.hg/hgrc |
|
230 | $ echo 'preoutgoing.forbid = python ../printenv.py preoutgoing.forbid 1' >> ../a/.hg/hgrc | |
231 | $ hg pull ../a |
|
231 | $ hg pull ../a | |
@@ -236,7 +236,7 b'' | |||||
236 | abort: preoutgoing.forbid hook exited with status 1 |
|
236 | abort: preoutgoing.forbid hook exited with status 1 | |
237 | [255] |
|
237 | [255] | |
238 |
|
238 | |||
239 |
|
|
239 | outgoing hooks work for local clones | |
240 |
|
240 | |||
241 | $ cd .. |
|
241 | $ cd .. | |
242 | $ echo '[hooks]' > a/.hg/hgrc |
|
242 | $ echo '[hooks]' > a/.hg/hgrc | |
@@ -249,7 +249,7 b'' | |||||
249 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
249 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
250 | $ rm -rf c |
|
250 | $ rm -rf c | |
251 |
|
251 | |||
252 |
|
|
252 | preoutgoing hook can prevent outgoing changes for local clones | |
253 |
|
253 | |||
254 | $ echo 'preoutgoing.forbid = python ../printenv.py preoutgoing.forbid 1' >> a/.hg/hgrc |
|
254 | $ echo 'preoutgoing.forbid = python ../printenv.py preoutgoing.forbid 1' >> a/.hg/hgrc | |
255 | $ hg clone a zzz |
|
255 | $ hg clone a zzz | |
@@ -296,7 +296,7 b'' | |||||
296 | > unreachable = 1 |
|
296 | > unreachable = 1 | |
297 | > EOF |
|
297 | > EOF | |
298 |
|
298 | |||
299 |
|
|
299 | test python hooks | |
300 |
|
|
300 | ||
301 | $ PYTHONPATH="`pwd`:$PYTHONPATH" |
|
301 | $ PYTHONPATH="`pwd`:$PYTHONPATH" | |
302 | $ export PYTHONPATH |
|
302 | $ export PYTHONPATH | |
@@ -385,7 +385,7 b'' | |||||
385 | added 1 changesets with 1 changes to 1 files |
|
385 | added 1 changesets with 1 changes to 1 files | |
386 | (run 'hg update' to get a working copy) |
|
386 | (run 'hg update' to get a working copy) | |
387 |
|
387 | |||
388 |
|
|
388 | make sure --traceback works | |
389 |
|
389 | |||
390 | $ echo '[hooks]' > .hg/hgrc |
|
390 | $ echo '[hooks]' > .hg/hgrc | |
391 | $ echo 'commit.abort = python:hooktests.aborthook' >> .hg/hgrc |
|
391 | $ echo 'commit.abort = python:hooktests.aborthook' >> .hg/hgrc | |
@@ -422,7 +422,7 b'' | |||||
422 | $ hg showconfig hooks |
|
422 | $ hg showconfig hooks | |
423 | hooks.commit.auto=<function autohook at .*> |
|
423 | hooks.commit.auto=<function autohook at .*> | |
424 |
|
424 | |||
425 |
|
|
425 | test python hook configured with python:[file]:[hook] syntax | |
426 |
|
426 | |||
427 | $ cd .. |
|
427 | $ cd .. | |
428 | $ mkdir d |
|
428 | $ mkdir d | |
@@ -446,7 +446,7 b'' | |||||
446 |
|
446 | |||
447 | $ cd ../../b |
|
447 | $ cd ../../b | |
448 |
|
448 | |||
449 |
|
|
449 | make sure --traceback works on hook import failure | |
450 |
|
450 | |||
451 | $ cat > importfail.py <<EOF |
|
451 | $ cat > importfail.py <<EOF | |
452 | > import somebogusmodule |
|
452 | > import somebogusmodule | |
@@ -467,7 +467,7 b'' | |||||
467 | ImportError: No module named hgext_importfail |
|
467 | ImportError: No module named hgext_importfail | |
468 | Traceback (most recent call last): |
|
468 | Traceback (most recent call last): | |
469 |
|
469 | |||
470 |
|
|
470 | commit and update hooks should run after command completion (issue 1827) | |
471 |
|
471 | |||
472 | $ echo '[hooks]' > .hg/hgrc |
|
472 | $ echo '[hooks]' > .hg/hgrc | |
473 | $ echo 'commit = hg id' >> .hg/hgrc |
|
473 | $ echo 'commit = hg id' >> .hg/hgrc |
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | This test tries to exercise the ssh functionality with a dummy script | |
2 |
|
|
2 | ||
3 |
$ |
|
3 | $ cat <<EOF > dummyssh | |
4 | > import sys |
|
4 | > import sys |
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | http://mercurial.selenic.com/bts/issue1089 | |
2 |
|
|
2 | ||
3 | $ hg init |
|
3 | $ hg init | |
4 | $ mkdir a |
|
4 | $ mkdir a |
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | http://mercurial.selenic.com/bts/issue1175 | |
2 |
|
|
2 | ||
3 | $ hg init |
|
3 | $ hg init | |
4 | $ touch a |
|
4 | $ touch a |
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | http://mercurial.selenic.com/bts/issue1306 | |
2 |
|
|
2 | ||
3 |
|
|
3 | Initialize remote repo with branches: | |
4 |
|
4 |
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | http://mercurial.selenic.com/bts/issue1438 | |
2 |
|
|
2 | ||
3 | $ "$TESTDIR/hghave" symlink || exit 80 |
|
3 | $ "$TESTDIR/hghave" symlink || exit 80 | |
4 |
|
4 |
@@ -1,12 +1,12 b'' | |||||
1 |
|
|
1 | http://mercurial.selenic.com/bts/issue2137 | |
2 |
|
|
2 | ||
3 |
|
|
3 | Setup: | |
4 |
|
4 | |||
5 |
|
|
5 | create a little extension that has 3 side-effects: | |
6 |
|
|
6 | 1) ensure changelog data is not inlined | |
7 |
|
|
7 | 2) make revlog to use lazyparser | |
8 |
|
|
8 | 3) test that repo.lookup() works | |
9 |
|
|
9 | 1 and 2 are preconditions for the bug; 3 is the bug. | |
10 |
|
|
10 | ||
11 |
$ |
|
11 | $ cat > commitwrapper.py <<EOF | |
12 | > from mercurial import extensions, node, revlog |
|
12 | > from mercurial import extensions, node, revlog | |
@@ -39,7 +39,6 b' Setup:' | |||||
39 | adding a |
|
39 | adding a | |
40 | new tip: 553596fad57b |
|
40 | new tip: 553596fad57b | |
41 |
|
41 | |||
42 |
|
||||
43 | Test that new changesets are visible to repo.lookup(): |
|
42 | Test that new changesets are visible to repo.lookup(): | |
44 |
|
43 | |||
45 | $ echo a >> a |
|
44 | $ echo a >> a | |
@@ -53,4 +52,3 b' Test that new changesets are visible to ' | |||||
53 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
52 | date: Thu Jan 01 00:00:00 1970 +0000 | |
54 | summary: one more commit to demonstrate the bug |
|
53 | summary: one more commit to demonstrate the bug | |
55 |
|
54 | |||
56 |
|
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | http://mercurial.selenic.com/bts/issue322 | |
2 |
|
|
2 | ||
3 |
|
|
3 | File replaced with directory: | |
4 |
|
4 |
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | http://mercurial.selenic.com/bts/issue433 | |
2 |
|
|
2 | ||
3 | $ hg init |
|
3 | $ hg init | |
4 | $ echo a > a |
|
4 | $ echo a > a |
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | http://mercurial.selenic.com/bts/issue436 | |
2 |
|
|
2 | ||
3 | $ hg init |
|
3 | $ hg init | |
4 | $ hg -v log -v |
|
4 | $ hg -v log -v |
@@ -1,10 +1,10 b'' | |||||
1 |
|
|
1 | http://mercurial.selenic.com/bts/issue522 | |
2 |
|
|
2 | ||
3 |
|
|
3 | In the merge below, the file "foo" has the same contents in both | |
4 |
|
|
4 | parents, but if we look at the file-level history, we'll notice that | |
5 |
|
|
5 | the version in p1 is an ancestor of the version in p2. This test makes | |
6 |
|
|
6 | sure that we'll use the version from p2 in the manifest of the merge | |
7 |
|
|
7 | revision. | |
8 |
|
|
8 | ||
9 |
$ |
|
9 | $ hg init | |
10 |
|
10 |
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | http://mercurial.selenic.com/bts/issue612 | |
2 |
|
|
2 | ||
3 | $ hg init |
|
3 | $ hg init | |
4 | $ mkdir src |
|
4 | $ mkdir src |
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | http://mercurial.selenic.com/bts/issue619 | |
2 |
|
|
2 | ||
3 | $ hg init |
|
3 | $ hg init | |
4 | $ echo a > a |
|
4 | $ echo a > a |
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | http://mercurial.selenic.com/bts/issue660 | |
2 |
|
|
2 | ||
3 | $ hg init |
|
3 | $ hg init | |
4 | $ echo a > a |
|
4 | $ echo a > a |
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | http://mercurial.selenic.com/bts/issue672 | |
2 |
|
|
2 | ||
3 | # 0-2-4 |
|
3 | # 0-2-4 | |
4 | # \ \ \ |
|
4 | # \ \ \ |
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | http://mercurial.selenic.com/bts/issue842 | |
2 |
|
|
2 | ||
3 | $ hg init |
|
3 | $ hg init | |
4 | $ echo foo > a |
|
4 | $ echo foo > a |
@@ -862,7 +862,6 b' log -p -R repo' | |||||
862 | # \ / |
|
862 | # \ / | |
863 | # o |
|
863 | # o | |
864 | # |
|
864 | # | |
865 |
|
||||
866 | # Where "o" is a revision containing "foo" and |
|
865 | # Where "o" is a revision containing "foo" and | |
867 | # "x" is a revision without "foo" |
|
866 | # "x" is a revision without "foo" | |
868 |
|
867 |
@@ -1,5 +1,5 b'' | |||||
1 |
|
|
1 | Source bundle was generated with the following script: | |
2 | # |
|
2 | ||
3 | # hg init |
|
3 | # hg init | |
4 | # echo a > a |
|
4 | # echo a > a | |
5 | # ln -s a l |
|
5 | # ln -s a l | |
@@ -12,12 +12,10 b'' | |||||
12 | $ hg init |
|
12 | $ hg init | |
13 | $ hg -q pull "$TESTDIR/test-manifest.hg" |
|
13 | $ hg -q pull "$TESTDIR/test-manifest.hg" | |
14 |
|
14 | |||
15 |
|
||||
16 | The next call is expected to return nothing: |
|
15 | The next call is expected to return nothing: | |
17 |
|
16 | |||
18 | $ hg manifest |
|
17 | $ hg manifest | |
19 |
|
18 | |||
20 |
|
||||
21 | $ hg co |
|
19 | $ hg co | |
22 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
20 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
23 |
|
21 |
@@ -1,4 +1,4 b'' | |||||
1 |
|
|
1 | Check that renames are correctly saved by a commit after a merge | |
2 |
|
|
2 | ||
3 |
|
|
3 | Test with the merge on 3 having the rename on the local parent | |
4 |
|
4 |
@@ -1,5 +1,5 b'' | |||||
1 |
|
|
1 | Make sure that the internal merge tools (internal:fail, internal:local, and | |
2 |
|
|
2 | internal:other) are used when matched by a merge-pattern in hgrc | |
3 |
|
|
3 | ||
4 |
|
|
4 | Make sure HGMERGE doesn't interfere with the test: | |
5 |
|
5 |
@@ -1,10 +1,9 b'' | |||||
1 |
|
|
1 | Test for | |
2 | # |
|
2 | b5605d88dc27: Make ui.prompt repeat on "unrecognized response" again | |
3 | # b5605d88dc27: Make ui.prompt repeat on "unrecognized response" again |
|
3 | (issue897) | |
4 | # (issue897) |
|
4 | ||
5 | # |
|
5 | 840e2b315c1f: Fix misleading error and prompts during update/merge | |
6 | # 840e2b315c1f: Fix misleading error and prompts during update/merge |
|
6 | (issue556) | |
7 | # (issue556) |
|
|||
8 |
|
|
7 | ||
9 | $ status() { |
|
8 | $ status() { | |
10 | > [ $? -ne 0 ] && echo "failed." |
|
9 | > [ $? -ne 0 ] && echo "failed." |
@@ -73,8 +73,8 b" Test 'file:' uri handling:" | |||||
73 |
|
73 | |||
74 | $ hg pull -q file:../test |
|
74 | $ hg pull -q file:../test | |
75 |
|
75 | |||
76 |
|
|
76 | It's tricky to make file:// URLs working on every platform with | |
77 |
|
|
77 | regular shell commands. | |
78 |
|
|
78 | ||
79 |
|
|
79 | $ URL=`python -c "import os; print 'file://foobar' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"` | |
80 | $ hg pull -q "$URL" |
|
80 | $ hg pull -q "$URL" |
@@ -466,8 +466,8 b' Check prepush with new branch head on fo' | |||||
466 | $ hg ci -Amb |
|
466 | $ hg ci -Amb | |
467 | adding b |
|
467 | adding b | |
468 |
|
468 | |||
469 |
|
|
469 | b is now branch head of B, and a topological head | |
470 |
|
|
470 | a is now branch head of A, but not a topological head | |
471 |
|
471 | |||
472 | $ hg clone . inner |
|
472 | $ hg clone . inner | |
473 | updating to branch B |
|
473 | updating to branch B | |
@@ -479,7 +479,7 b' Check prepush with new branch head on fo' | |||||
479 | $ hg ci -Amb1 |
|
479 | $ hg ci -Amb1 | |
480 | adding b1 |
|
480 | adding b1 | |
481 |
|
481 | |||
482 |
|
|
482 | in the clone b1 is now the head of B | |
483 |
|
483 | |||
484 | $ cd .. |
|
484 | $ cd .. | |
485 | $ hg up 0 |
|
485 | $ hg up 0 | |
@@ -488,8 +488,9 b' Check prepush with new branch head on fo' | |||||
488 | $ hg ci -Ama2 |
|
488 | $ hg ci -Ama2 | |
489 | adding a2 |
|
489 | adding a2 | |
490 |
|
490 | |||
491 |
|
|
491 | a2 is now the new branch head of A, and a new topological head | |
492 |
|
|
492 | it replaces a former inner branch head, so it should at most warn about | |
|
493 | A, not B | |||
493 |
|
494 | |||
494 | glog of local: |
|
495 | glog of local: | |
495 |
|
496 | |||
@@ -542,7 +543,7 b' Check prepush with new branch head on fo' | |||||
542 | $ hg ci -Amb |
|
543 | $ hg ci -Amb | |
543 | adding b |
|
544 | adding b | |
544 |
|
545 | |||
545 |
|
|
546 | b is now branch head of B, and a topological head | |
546 |
|
547 | |||
547 | $ hg up 0 |
|
548 | $ hg up 0 | |
548 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
549 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
@@ -550,7 +551,7 b' Check prepush with new branch head on fo' | |||||
550 | $ hg ci -Ama1 |
|
551 | $ hg ci -Ama1 | |
551 | adding a1 |
|
552 | adding a1 | |
552 |
|
553 | |||
553 |
|
|
554 | a1 is now branch head of A, and a topological head | |
554 |
|
555 | |||
555 | $ hg clone . inner |
|
556 | $ hg clone . inner | |
556 | updating to branch A |
|
557 | updating to branch A | |
@@ -562,15 +563,15 b' Check prepush with new branch head on fo' | |||||
562 | $ hg ci -Amb1 |
|
563 | $ hg ci -Amb1 | |
563 | adding b1 |
|
564 | adding b1 | |
564 |
|
565 | |||
565 |
|
|
566 | in the clone b1 is now the head of B | |
566 |
|
567 | |||
567 | $ cd .. |
|
568 | $ cd .. | |
568 | $ echo a2 >a2 |
|
569 | $ echo a2 >a2 | |
569 | $ hg ci -Ama2 |
|
570 | $ hg ci -Ama2 | |
570 | adding a2 |
|
571 | adding a2 | |
571 |
|
572 | |||
572 |
|
|
573 | a2 is now the new branch head of A, and a topological head | |
573 |
|
|
574 | it replaces a former topological and branch head, so this should not warn | |
574 |
|
575 | |||
575 | glog of local: |
|
576 | glog of local: | |
576 |
|
577 | |||
@@ -706,6 +707,3 b' outgoing:' | |||||
706 | searching for changes |
|
707 | searching for changes | |
707 | no changes found |
|
708 | no changes found | |
708 | [1] |
|
709 | [1] | |
709 |
|
||||
710 | $ cd .. |
|
|||
711 |
|
@@ -1,57 +1,10 b'' | |||||
1 | #!/bin/sh |
|
1 | Set up a repo | |
2 |
|
|
2 | ||
3 |
$ |
|
3 | $ echo "[ui]" >> $HGRCPATH | |
4 |
$ |
|
4 | $ echo "interactive=true" >> $HGRCPATH | |
5 |
$ |
|
5 | $ echo "[extensions]" >> $HGRCPATH | |
6 |
$ |
|
6 | $ echo "record=" >> $HGRCPATH | |
7 |
|
7 | |||
8 | Help |
|
|||
9 |
|
||||
10 | $ hg help record |
|
|||
11 | hg record [OPTION]... [FILE]... |
|
|||
12 |
|
||||
13 | interactively select changes to commit |
|
|||
14 |
|
||||
15 | If a list of files is omitted, all changes reported by "hg status" will be |
|
|||
16 | candidates for recording. |
|
|||
17 |
|
||||
18 | See "hg help dates" for a list of formats valid for -d/--date. |
|
|||
19 |
|
||||
20 | You will be prompted for whether to record changes to each modified file, |
|
|||
21 | and for files with multiple changes, for each change to use. For each |
|
|||
22 | query, the following responses are possible: |
|
|||
23 |
|
||||
24 | y - record this change |
|
|||
25 | n - skip this change |
|
|||
26 |
|
||||
27 | s - skip remaining changes to this file |
|
|||
28 | f - record remaining changes to this file |
|
|||
29 |
|
||||
30 | d - done, skip remaining changes and files |
|
|||
31 | a - record all changes to all remaining files |
|
|||
32 | q - quit, recording no changes |
|
|||
33 |
|
||||
34 | ? - display help |
|
|||
35 |
|
||||
36 | This command is not available when committing a merge. |
|
|||
37 |
|
||||
38 | options: |
|
|||
39 |
|
||||
40 | -A --addremove mark new/missing files as added/removed before |
|
|||
41 | committing |
|
|||
42 | --close-branch mark a branch as closed, hiding it from the branch |
|
|||
43 | list |
|
|||
44 | -I --include PATTERN [+] include names matching the given patterns |
|
|||
45 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
|||
46 | -m --message TEXT use text as commit message |
|
|||
47 | -l --logfile FILE read commit message from file |
|
|||
48 | -d --date DATE record datecode as commit date |
|
|||
49 | -u --user USER record the specified user as committer |
|
|||
50 |
|
||||
51 | [+] marked option can be specified multiple times |
|
|||
52 |
|
||||
53 | use "hg -v help record" to show global options |
|
|||
54 |
|
||||
55 | $ hg init a |
|
8 | $ hg init a | |
56 | $ cd a |
|
9 | $ cd a | |
57 |
|
10 |
@@ -1,5 +1,5 b'' | |||||
1 |
|
|
1 | Test issue 746: renaming files brought by the second parent of a merge | |
2 | # second parent of a merge was broken. |
|
2 | was broken. | |
3 |
|
|
3 | ||
4 |
|
|
4 | Create source repository: | |
5 |
|
5 | |||
@@ -59,9 +59,8 b' Rename back c as b:' | |||||
59 |
|
59 | |||
60 | $ cd .. |
|
60 | $ cd .. | |
61 |
|
61 | |||
62 |
|
|
62 | Test issue 1476: renaming a first parent file into another first | |
63 |
|
|
63 | parent file while none of them belong to the second parent was broken | |
64 | # the second parent was broken |
|
|||
65 |
|
64 | |||
66 | $ hg init repo1476 |
|
65 | $ hg init repo1476 | |
67 | $ cd repo1476 |
|
66 | $ cd repo1476 |
@@ -1,4 +1,5 b'' | |||||
1 |
|
|
1 | issue 1678 | |
|
2 | ||||
2 |
|
|
3 | setting up base repo | |
3 | $ hg init a |
|
4 | $ hg init a | |
4 | $ cd a |
|
5 | $ cd a |
@@ -178,7 +178,7 b' hg status -i ignoreddir/file:' | |||||
178 | [0;30;1mI ignoreddir/file[0m |
|
178 | [0;30;1mI ignoreddir/file[0m | |
179 | $ cd .. |
|
179 | $ cd .. | |
180 |
|
180 | |||
181 |
|
|
181 | check 'status -q' and some combinations | |
182 |
|
|
182 | ||
183 | $ hg init repo3 |
|
183 | $ hg init repo3 | |
184 | $ cd repo3 |
|
184 | $ cd repo3 | |
@@ -207,9 +207,10 b' test unknown color' | |||||
207 | [0;36;1;4m! deleted[0m |
|
207 | [0;36;1;4m! deleted[0m | |
208 | [0;35;1;4m? unknown[0m |
|
208 | [0;35;1;4m? unknown[0m | |
209 |
|
209 | |||
210 |
|
|
210 | Run status with 2 different flags. | |
211 |
|
|
211 | Check if result is the same or different. | |
212 |
|
|
212 | If result is not as expected, raise error | |
|
213 | ||||
213 | $ assert() { |
|
214 | $ assert() { | |
214 | > hg status --color=always $1 > ../a |
|
215 | > hg status --color=always $1 > ../a | |
215 | > hg status --color=always $2 > ../b |
|
216 | > hg status --color=always $2 > ../b | |
@@ -229,7 +230,7 b' test unknown color' | |||||
229 | > fi |
|
230 | > fi | |
230 | > } |
|
231 | > } | |
231 |
|
232 | |||
232 |
|
|
233 | assert flag1 flag2 [0-same | 1-different] | |
233 |
|
|
234 | ||
234 |
$ |
|
235 | $ assert "-q" "-mard" 0 | |
235 | $ assert "-A" "-marduicC" 0 |
|
236 | $ assert "-A" "-marduicC" 0 | |
@@ -243,7 +244,8 b' test unknown color' | |||||
243 | $ assert "-r" "-d" 1 |
|
244 | $ assert "-r" "-d" 1 | |
244 | $ cd .. |
|
245 | $ cd .. | |
245 |
|
246 | |||
246 |
|
|
247 | test 'resolve -l' | |
|
248 | ||||
247 | $ hg init repo4 |
|
249 | $ hg init repo4 | |
248 | $ cd repo4 |
|
250 | $ cd repo4 | |
249 | $ echo "file a" > a |
|
251 | $ echo "file a" > a |
@@ -173,7 +173,7 b' hg status -i ignoreddir/file:' | |||||
173 | I ignoreddir/file |
|
173 | I ignoreddir/file | |
174 | $ cd .. |
|
174 | $ cd .. | |
175 |
|
175 | |||
176 |
|
|
176 | Check 'status -q' and some combinations | |
177 |
|
|
177 | ||
178 | $ hg init repo3 |
|
178 | $ hg init repo3 | |
179 | $ cd repo3 |
|
179 | $ cd repo3 | |
@@ -191,9 +191,9 b' hg status -i ignoreddir/file:' | |||||
191 | $ rm deleted |
|
191 | $ rm deleted | |
192 | $ hg copy modified copied |
|
192 | $ hg copy modified copied | |
193 |
|
193 | |||
194 |
|
|
194 | Run status with 2 different flags. | |
195 |
|
|
195 | Check if result is the same or different. | |
196 |
|
|
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 | |
@@ -214,7 +214,7 b' hg status -i ignoreddir/file:' | |||||
214 | > fi |
|
214 | > fi | |
215 | > } |
|
215 | > } | |
216 |
|
216 | |||
217 |
|
|
217 | Assert flag1 flag2 [0-same | 1-different] | |
218 |
|
|
218 | ||
219 |
$ |
|
219 | $ assert "-q" "-mard" 0 | |
220 | $ assert "-A" "-marduicC" 0 |
|
220 | $ assert "-A" "-marduicC" 0 |
@@ -69,8 +69,8 b' Test helper functions:' | |||||
69 | > hg stat |
|
69 | > hg stat | |
70 | > } |
|
70 | > } | |
71 |
|
71 | |||
72 |
|
|
72 | Test cases are documented in a table in the update function of merge.py. | |
73 |
|
|
73 | Cases are run as shown in that table, row by row. | |
74 |
|
|
74 | ||
75 | $ norevtest 'none clean linear' clean 4 |
|
75 | $ norevtest 'none clean linear' clean 4 | |
76 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
76 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
General Comments 0
You need to be logged in to leave comments.
Login now