annotate tests/test-transplant.t @ 44538:b8ba46c97cdd

rust-status: wrap `stat_dmap_entries` to ease profiling Differential Revision: https://phab.mercurial-scm.org/D8250
author Raphaël Gomès <rgomes@octobus.net>
date Fri, 06 Mar 2020 17:51:03 +0100
parents d50b4ad1d4a5
children 8d72e29ad1e0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
42717
0a4303c77637 continue: added support for transplant
Taapas Agrawal <taapas2897@gmail.com>
parents: 42532
diff changeset
1 #testcases commandmode continueflag
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
2 $ cat <<EOF >> $HGRCPATH
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
3 > [extensions]
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
4 > transplant=
42762
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
5 > graphlog=
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
6 > EOF
3714
198173f3957c Add transplant extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
7
42717
0a4303c77637 continue: added support for transplant
Taapas Agrawal <taapas2897@gmail.com>
parents: 42532
diff changeset
8 #if continueflag
0a4303c77637 continue: added support for transplant
Taapas Agrawal <taapas2897@gmail.com>
parents: 42532
diff changeset
9 $ cat >> $HGRCPATH <<EOF
0a4303c77637 continue: added support for transplant
Taapas Agrawal <taapas2897@gmail.com>
parents: 42532
diff changeset
10 > [alias]
0a4303c77637 continue: added support for transplant
Taapas Agrawal <taapas2897@gmail.com>
parents: 42532
diff changeset
11 > continue = transplant --continue
0a4303c77637 continue: added support for transplant
Taapas Agrawal <taapas2897@gmail.com>
parents: 42532
diff changeset
12 > EOF
0a4303c77637 continue: added support for transplant
Taapas Agrawal <taapas2897@gmail.com>
parents: 42532
diff changeset
13 #endif
0a4303c77637 continue: added support for transplant
Taapas Agrawal <taapas2897@gmail.com>
parents: 42532
diff changeset
14
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
15 $ hg init t
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
16 $ cd t
27666
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
17 $ hg transplant
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
18 abort: no source URL, branch revision, or revision list provided
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
19 [255]
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
20 $ hg transplant --continue --all
43903
d50b4ad1d4a5 transplant: use check_incompatible_arguments()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42897
diff changeset
21 abort: cannot specify both --continue and --all
27666
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
22 [255]
42762
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
23 $ hg transplant --stop --all
43903
d50b4ad1d4a5 transplant: use check_incompatible_arguments()
Martin von Zweigbergk <martinvonz@google.com>
parents: 42897
diff changeset
24 abort: cannot specify both --stop and --all
42762
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
25 [255]
27666
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
26 $ hg transplant --all tip
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
27 abort: --all requires a branch revision
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
28 [255]
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
29 $ hg transplant --all --branch default tip
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
30 abort: --all is incompatible with a revision list
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
31 [255]
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
32 $ echo r1 > r1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
33 $ hg ci -Amr1 -d'0 0'
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
34 adding r1
27666
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
35 $ hg co -q null
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
36 $ hg transplant tip
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
37 abort: no revision checked out
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
38 [255]
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
39 $ hg up -q
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
40 $ echo r2 > r2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
41 $ hg ci -Amr2 -d'1 0'
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
42 adding r2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
43 $ hg up 0
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
44 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
3714
198173f3957c Add transplant extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
45
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
46 $ echo b1 > b1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
47 $ hg ci -Amb1 -d '0 0'
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
48 adding b1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
49 created new head
27666
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
50 $ hg merge 1
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
51 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
52 (branch merge, don't forget to commit)
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
53 $ hg transplant 1
41371
608c15f76f50 transplant: use bailifchanged() instead of reimplementing it
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
54 abort: outstanding uncommitted merge
42532
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 41784
diff changeset
55 (use 'hg commit' or 'hg merge --abort')
27666
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
56 [255]
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
57 $ hg up -qC tip
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
58 $ echo b0 > b1
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
59 $ hg transplant 1
41371
608c15f76f50 transplant: use bailifchanged() instead of reimplementing it
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
60 abort: uncommitted changes
27666
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
61 [255]
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
62 $ hg up -qC tip
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
63 $ echo b2 > b2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
64 $ hg ci -Amb2 -d '1 0'
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
65 adding b2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
66 $ echo b3 > b3
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
67 $ hg ci -Amb3 -d '2 0'
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
68 adding b3
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
69
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
70 $ hg log --template '{rev} {parents} {desc}\n'
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
71 4 b3
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
72 3 b2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
73 2 0:17ab29e464c6 b1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
74 1 r2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
75 0 r1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
76
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
77 $ hg clone . ../rebase
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
78 updating to branch default
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
79 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
27666
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
80 $ hg init ../emptydest
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
81 $ cd ../emptydest
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
82 $ hg transplant --source=../t > /dev/null
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
83 $ cd ../rebase
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
84
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
85 $ hg up -C 1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
86 1 files updated, 0 files merged, 3 files removed, 0 files unresolved
3714
198173f3957c Add transplant extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
87
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
88 rebase b onto r1
21411
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
89 (this also tests that editor is not invoked if '--edit' is not specified)
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
90
21411
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
91 $ HGEDITOR=cat hg transplant -a -b tip
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
92 applying 37a1297eb21b
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
93 37a1297eb21b transplanted to e234d668f844
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
94 applying 722f4667af76
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
95 722f4667af76 transplanted to 539f377d78df
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
96 applying a53251cdf717
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
97 a53251cdf717 transplanted to ffd6818a3975
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
98 $ hg log --template '{rev} {parents} {desc}\n'
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
99 7 b3
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
100 6 b2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
101 5 1:d11e3596cc1a b1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
102 4 b3
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
103 3 b2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
104 2 0:17ab29e464c6 b1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
105 1 r2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
106 0 r1
3714
198173f3957c Add transplant extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
107
31452
52dabcc49968 templatekw: make join() escape values of extras (BC) (issue5504)
Yuya Nishihara <yuya@tcha.org>
parents: 30786
diff changeset
108 test format of transplant_source
52dabcc49968 templatekw: make join() escape values of extras (BC) (issue5504)
Yuya Nishihara <yuya@tcha.org>
parents: 30786
diff changeset
109
52dabcc49968 templatekw: make join() escape values of extras (BC) (issue5504)
Yuya Nishihara <yuya@tcha.org>
parents: 30786
diff changeset
110 $ hg log -r7 --debug | grep transplant_source
52dabcc49968 templatekw: make join() escape values of extras (BC) (issue5504)
Yuya Nishihara <yuya@tcha.org>
parents: 30786
diff changeset
111 extra: transplant_source=\xa52Q\xcd\xf7\x17g\x9d\x19\x07\xb2\x89\xf9\x91SK\xe0\\\x99z
52dabcc49968 templatekw: make join() escape values of extras (BC) (issue5504)
Yuya Nishihara <yuya@tcha.org>
parents: 30786
diff changeset
112 $ hg log -r7 -T '{extras}\n'
52dabcc49968 templatekw: make join() escape values of extras (BC) (issue5504)
Yuya Nishihara <yuya@tcha.org>
parents: 30786
diff changeset
113 branch=defaulttransplant_source=\xa52Q\xcd\xf7\x17g\x9d\x19\x07\xb2\x89\xf9\x91SK\xe0\\\x99z
52dabcc49968 templatekw: make join() escape values of extras (BC) (issue5504)
Yuya Nishihara <yuya@tcha.org>
parents: 30786
diff changeset
114 $ hg log -r7 -T '{join(extras, " ")}\n'
52dabcc49968 templatekw: make join() escape values of extras (BC) (issue5504)
Yuya Nishihara <yuya@tcha.org>
parents: 30786
diff changeset
115 branch=default transplant_source=\xa52Q\xcd\xf7\x17g\x9d\x19\x07\xb2\x89\xf9\x91SK\xe0\\\x99z
52dabcc49968 templatekw: make join() escape values of extras (BC) (issue5504)
Yuya Nishihara <yuya@tcha.org>
parents: 30786
diff changeset
116
12811
0e284735e65b test-transplant: test transplanted() revset
Patrick Mezard <pmezard@gmail.com>
parents: 12399
diff changeset
117 test transplanted revset
0e284735e65b test-transplant: test transplanted() revset
Patrick Mezard <pmezard@gmail.com>
parents: 12399
diff changeset
118
0e284735e65b test-transplant: test transplanted() revset
Patrick Mezard <pmezard@gmail.com>
parents: 12399
diff changeset
119 $ hg log -r 'transplanted()' --template '{rev} {parents} {desc}\n'
0e284735e65b test-transplant: test transplanted() revset
Patrick Mezard <pmezard@gmail.com>
parents: 12399
diff changeset
120 5 1:d11e3596cc1a b1
0e284735e65b test-transplant: test transplanted() revset
Patrick Mezard <pmezard@gmail.com>
parents: 12399
diff changeset
121 6 b2
0e284735e65b test-transplant: test transplanted() revset
Patrick Mezard <pmezard@gmail.com>
parents: 12399
diff changeset
122 7 b3
27666
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
123 $ hg log -r 'transplanted(head())' --template '{rev} {parents} {desc}\n'
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
124 7 b3
30786
e2a6f383d314 tests: use "hg help revisions.<predicate>" instead of grepping
Martin von Zweigbergk <martinvonz@google.com>
parents: 28549
diff changeset
125 $ hg help revisions.transplanted
14211
b00ab6890fe9 transplant: fix revset doc
Idan Kamara <idankk86@gmail.com>
parents: 14012
diff changeset
126 "transplanted([set])"
b00ab6890fe9 transplant: fix revset doc
Idan Kamara <idankk86@gmail.com>
parents: 14012
diff changeset
127 Transplanted changesets in set, or all transplanted changesets.
30786
e2a6f383d314 tests: use "hg help revisions.<predicate>" instead of grepping
Martin von Zweigbergk <martinvonz@google.com>
parents: 28549
diff changeset
128
12811
0e284735e65b test-transplant: test transplanted() revset
Patrick Mezard <pmezard@gmail.com>
parents: 12399
diff changeset
129
21024
7731a2281cf0 spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents: 20269
diff changeset
130 test transplanted keyword
13689
65399579da68 transplant: add "transplanted" keyword
Patrick Mezard <pmezard@gmail.com>
parents: 13579
diff changeset
131
65399579da68 transplant: add "transplanted" keyword
Patrick Mezard <pmezard@gmail.com>
parents: 13579
diff changeset
132 $ hg log --template '{rev} {transplanted}\n'
65399579da68 transplant: add "transplanted" keyword
Patrick Mezard <pmezard@gmail.com>
parents: 13579
diff changeset
133 7 a53251cdf717679d1907b289f991534be05c997a
65399579da68 transplant: add "transplanted" keyword
Patrick Mezard <pmezard@gmail.com>
parents: 13579
diff changeset
134 6 722f4667af767100cb15b6a79324bf8abbfe1ef4
65399579da68 transplant: add "transplanted" keyword
Patrick Mezard <pmezard@gmail.com>
parents: 13579
diff changeset
135 5 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21
65399579da68 transplant: add "transplanted" keyword
Patrick Mezard <pmezard@gmail.com>
parents: 13579
diff changeset
136 4
65399579da68 transplant: add "transplanted" keyword
Patrick Mezard <pmezard@gmail.com>
parents: 13579
diff changeset
137 3
65399579da68 transplant: add "transplanted" keyword
Patrick Mezard <pmezard@gmail.com>
parents: 13579
diff changeset
138 2
65399579da68 transplant: add "transplanted" keyword
Patrick Mezard <pmezard@gmail.com>
parents: 13579
diff changeset
139 1
65399579da68 transplant: add "transplanted" keyword
Patrick Mezard <pmezard@gmail.com>
parents: 13579
diff changeset
140 0
65399579da68 transplant: add "transplanted" keyword
Patrick Mezard <pmezard@gmail.com>
parents: 13579
diff changeset
141
17186
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
142 test destination() revset predicate with a transplant of a transplant; new
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
143 clone so subsequent rollback isn't affected
21411
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
144 (this also tests that editor is invoked if '--edit' is specified)
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
145
17186
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
146 $ hg clone -q . ../destination
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
147 $ cd ../destination
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
148 $ hg up -Cq 0
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
149 $ hg branch -q b4
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
150 $ hg ci -qm "b4"
21411
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
151 $ hg status --rev "7^1" --rev 7
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
152 A b3
22252
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
153 $ cat > $TESTTMP/checkeditform.sh <<EOF
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
154 > env | grep HGEDITFORM
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
155 > true
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
156 > EOF
23092
501dc6b1ca78 tests: introduce "checkeditform-n-cat.sh" script to invoke "cat" in it safely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
157 $ cat > $TESTTMP/checkeditform-n-cat.sh <<EOF
501dc6b1ca78 tests: introduce "checkeditform-n-cat.sh" script to invoke "cat" in it safely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
158 > env | grep HGEDITFORM
501dc6b1ca78 tests: introduce "checkeditform-n-cat.sh" script to invoke "cat" in it safely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
159 > cat \$*
501dc6b1ca78 tests: introduce "checkeditform-n-cat.sh" script to invoke "cat" in it safely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
160 > EOF
501dc6b1ca78 tests: introduce "checkeditform-n-cat.sh" script to invoke "cat" in it safely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22947
diff changeset
161 $ HGEDITOR="sh $TESTTMP/checkeditform-n-cat.sh" hg transplant --edit 7
17186
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
162 applying ffd6818a3975
22252
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
163 HGEDITFORM=transplant.normal
21411
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
164 b3
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
165
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
166
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
167 HG: Enter commit message. Lines beginning with 'HG:' are removed.
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
168 HG: Leave message empty to abort commit.
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
169 HG: --
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
170 HG: user: test
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
171 HG: branch 'b4'
afff78be4361 transplant: use "getcommiteditor()" instead of explicit editor choice
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
172 HG: added b3
17186
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
173 ffd6818a3975 transplanted to 502236fa76bb
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
174
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
175
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
176 $ hg log -r 'destination()'
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
177 changeset: 5:e234d668f844
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
178 parent: 1:d11e3596cc1a
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
179 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
180 date: Thu Jan 01 00:00:00 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
181 summary: b1
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
182
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
183 changeset: 6:539f377d78df
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
184 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
185 date: Thu Jan 01 00:00:01 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
186 summary: b2
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
187
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
188 changeset: 7:ffd6818a3975
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
189 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
190 date: Thu Jan 01 00:00:02 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
191 summary: b3
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
192
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
193 changeset: 9:502236fa76bb
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
194 branch: b4
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
195 tag: tip
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
196 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
197 date: Thu Jan 01 00:00:02 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
198 summary: b3
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
199
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
200 $ hg log -r 'destination(a53251cdf717)'
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
201 changeset: 7:ffd6818a3975
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
202 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
203 date: Thu Jan 01 00:00:02 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
204 summary: b3
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
205
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
206 changeset: 9:502236fa76bb
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
207 branch: b4
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
208 tag: tip
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
209 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
210 date: Thu Jan 01 00:00:02 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
211 summary: b3
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
212
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
213
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
214 test subset parameter in reverse order
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
215 $ hg log -r 'reverse(all()) and destination(a53251cdf717)'
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
216 changeset: 9:502236fa76bb
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
217 branch: b4
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
218 tag: tip
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
219 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
220 date: Thu Jan 01 00:00:02 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
221 summary: b3
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
222
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
223 changeset: 7:ffd6818a3975
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
224 user: test
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
225 date: Thu Jan 01 00:00:02 1970 +0000
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
226 summary: b3
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
227
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
228
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
229 back to the original dir
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
230 $ cd ../rebase
a3da6f298592 revset: add destination() predicate
Matt Harbison <matt_harbison@yahoo.com>
parents: 16972
diff changeset
231
15204
3ce9b1a7538b transplant: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 14223
diff changeset
232 rollback the transplant
3ce9b1a7538b transplant: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 14223
diff changeset
233 $ hg rollback
3ce9b1a7538b transplant: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 14223
diff changeset
234 repository tip rolled back to revision 4 (undo transplant)
3ce9b1a7538b transplant: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 14223
diff changeset
235 working directory now based on revision 1
3ce9b1a7538b transplant: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 14223
diff changeset
236 $ hg tip -q
3ce9b1a7538b transplant: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 14223
diff changeset
237 4:a53251cdf717
3ce9b1a7538b transplant: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 14223
diff changeset
238 $ hg parents -q
3ce9b1a7538b transplant: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 14223
diff changeset
239 1:d11e3596cc1a
3ce9b1a7538b transplant: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 14223
diff changeset
240 $ hg status
3ce9b1a7538b transplant: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 14223
diff changeset
241 ? b1
3ce9b1a7538b transplant: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 14223
diff changeset
242 ? b2
3ce9b1a7538b transplant: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 14223
diff changeset
243 ? b3
3ce9b1a7538b transplant: wrap a transaction around the whole command
Greg Ward <greg@gerg.ca>
parents: 14223
diff changeset
244
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
245 $ hg clone ../t ../prune
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
246 updating to branch default
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
247 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
248 $ cd ../prune
3714
198173f3957c Add transplant extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
249
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
250 $ hg up -C 1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
251 1 files updated, 0 files merged, 3 files removed, 0 files unresolved
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
252
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
253 rebase b onto r1, skipping b2
3714
198173f3957c Add transplant extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
254
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
255 $ hg transplant -a -b tip -p 3
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
256 applying 37a1297eb21b
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
257 37a1297eb21b transplanted to e234d668f844
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
258 applying a53251cdf717
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
259 a53251cdf717 transplanted to 7275fda4d04f
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
260 $ hg log --template '{rev} {parents} {desc}\n'
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
261 6 b3
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
262 5 1:d11e3596cc1a b1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
263 4 b3
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
264 3 b2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
265 2 0:17ab29e464c6 b1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
266 1 r2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
267 0 r1
3714
198173f3957c Add transplant extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
268
16627
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
269 test same-parent transplant with --log
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
270
16627
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
271 $ hg clone -r 1 ../t ../sameparent
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
272 adding changesets
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
273 adding manifests
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
274 adding file changes
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
275 added 2 changesets with 2 changes to 2 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34251
diff changeset
276 new changesets 17ab29e464c6:d11e3596cc1a
16627
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
277 updating to branch default
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
278 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
279 $ cd ../sameparent
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
280 $ hg transplant --log -s ../prune 5
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
281 searching for changes
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
282 applying e234d668f844
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
283 e234d668f844 transplanted to e07aea8ecf9c
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
284 $ hg log --template '{rev} {parents} {desc}\n'
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
285 2 b1
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
286 (transplanted from e234d668f844e1b1a765f01db83a32c0c7bfa170)
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
287 1 r2
38c45a99be0b transplant: manually transplant pullable changesets with --log
Levi Bard <levi@unity3d.com>
parents: 16507
diff changeset
288 0 r1
23452
86c0d8c1484f transplant: don't honor whitespace and format-changing diffopts
Siddharth Agarwal <sid0@fb.com>
parents: 23092
diff changeset
289 remote transplant, and also test that transplant doesn't break with
86c0d8c1484f transplant: don't honor whitespace and format-changing diffopts
Siddharth Agarwal <sid0@fb.com>
parents: 23092
diff changeset
290 format-breaking diffopts
3714
198173f3957c Add transplant extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
291
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
292 $ hg clone -r 1 ../t ../remote
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
293 adding changesets
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
294 adding manifests
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
295 adding file changes
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
296 added 2 changesets with 2 changes to 2 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34251
diff changeset
297 new changesets 17ab29e464c6:d11e3596cc1a
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
298 updating to branch default
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
299 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
300 $ cd ../remote
23452
86c0d8c1484f transplant: don't honor whitespace and format-changing diffopts
Siddharth Agarwal <sid0@fb.com>
parents: 23092
diff changeset
301 $ hg --config diff.noprefix=True transplant --log -s ../t 2 4
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
302 searching for changes
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
303 applying 37a1297eb21b
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
304 37a1297eb21b transplanted to c19cf0ccb069
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
305 applying a53251cdf717
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
306 a53251cdf717 transplanted to f7fe5bf98525
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
307 $ hg log --template '{rev} {parents} {desc}\n'
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
308 3 b3
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
309 (transplanted from a53251cdf717679d1907b289f991534be05c997a)
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
310 2 b1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
311 (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21)
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
312 1 r2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
313 0 r1
3714
198173f3957c Add transplant extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
314
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
315 skip previous transplants
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
316
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
317 $ hg transplant -s ../t -a -b 4
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
318 searching for changes
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
319 applying 722f4667af76
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
320 722f4667af76 transplanted to 47156cd86c0b
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
321 $ hg log --template '{rev} {parents} {desc}\n'
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
322 4 b2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
323 3 b3
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
324 (transplanted from a53251cdf717679d1907b289f991534be05c997a)
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
325 2 b1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
326 (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21)
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
327 1 r2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
328 0 r1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
329
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
330 skip local changes transplanted to the source
3714
198173f3957c Add transplant extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
331
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
332 $ echo b4 > b4
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
333 $ hg ci -Amb4 -d '3 0'
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
334 adding b4
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
335 $ hg clone ../t ../pullback
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
336 updating to branch default
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
337 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
338 $ cd ../pullback
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
339 $ hg transplant -s ../remote -a -b tip
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
340 searching for changes
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
341 applying 4333daefcb15
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
342 4333daefcb15 transplanted to 5f42c04e07cc
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
343
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
344
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
345 remote transplant with pull
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
346
28549
e01bd7385f4f tests: reorder hg serve commands
Jun Wu <quark@fb.com>
parents: 28029
diff changeset
347 $ hg serve -R ../t -p $HGPORT -d --pid-file=../t.pid
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
348 $ cat ../t.pid >> $DAEMON_PIDS
3714
198173f3957c Add transplant extension
Brendan Cully <brendan@kublai.com>
parents:
diff changeset
349
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
350 $ hg clone -r 0 ../t ../rp
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
351 adding changesets
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
352 adding manifests
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
353 adding file changes
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
354 added 1 changesets with 1 changes to 1 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34251
diff changeset
355 new changesets 17ab29e464c6
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
356 updating to branch default
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
357 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
358 $ cd ../rp
25678
0c201666fdc6 transplant: update test to use hash for remote transplant
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23781
diff changeset
359 $ hg transplant -s http://localhost:$HGPORT/ 37a1297eb21b a53251cdf717
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
360 searching for changes
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
361 searching for changes
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
362 adding changesets
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
363 adding manifests
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
364 adding file changes
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
365 applying a53251cdf717
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
366 a53251cdf717 transplanted to 8d9279348abb
42897
d7304434390f changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42762
diff changeset
367 added 1 changesets with 1 changes to 1 files
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
368 $ hg log --template '{rev} {parents} {desc}\n'
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
369 2 b3
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
370 1 b1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
371 0 r1
3724
ea523d6f5f1a transplant: fix --continue; add --continue test
Brendan Cully <brendan@kublai.com>
parents: 3714
diff changeset
372
18138
8ab0640c3090 bundlerepo: don't return the peer without bundlerepo from getremotechanges
Mads Kiilerich <madski@unity3d.com>
parents: 17539
diff changeset
373 remote transplant without pull
25679
540cd0ddac49 transplant: only pull the transplanted revision (issue4692)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25678
diff changeset
374 (It was using "2" and "4" (as the previous transplant used to) which referenced
25678
0c201666fdc6 transplant: update test to use hash for remote transplant
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23781
diff changeset
375 revision different from one run to another)
18138
8ab0640c3090 bundlerepo: don't return the peer without bundlerepo from getremotechanges
Mads Kiilerich <madski@unity3d.com>
parents: 17539
diff changeset
376
8ab0640c3090 bundlerepo: don't return the peer without bundlerepo from getremotechanges
Mads Kiilerich <madski@unity3d.com>
parents: 17539
diff changeset
377 $ hg pull -q http://localhost:$HGPORT/
25678
0c201666fdc6 transplant: update test to use hash for remote transplant
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23781
diff changeset
378 $ hg transplant -s http://localhost:$HGPORT/ 8d9279348abb 722f4667af76
18138
8ab0640c3090 bundlerepo: don't return the peer without bundlerepo from getremotechanges
Mads Kiilerich <madski@unity3d.com>
parents: 17539
diff changeset
379 skipping already applied revision 2:8d9279348abb
8ab0640c3090 bundlerepo: don't return the peer without bundlerepo from getremotechanges
Mads Kiilerich <madski@unity3d.com>
parents: 17539
diff changeset
380 applying 722f4667af76
8ab0640c3090 bundlerepo: don't return the peer without bundlerepo from getremotechanges
Mads Kiilerich <madski@unity3d.com>
parents: 17539
diff changeset
381 722f4667af76 transplanted to 76e321915884
8ab0640c3090 bundlerepo: don't return the peer without bundlerepo from getremotechanges
Mads Kiilerich <madski@unity3d.com>
parents: 17539
diff changeset
382
42762
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
383
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
384 transplant --continue and --stop behaviour
4036
ebf1a05f6479 Make test-transplant test pull case
Brendan Cully <brendan@kublai.com>
parents: 4034
diff changeset
385
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
386 $ hg init ../tc
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
387 $ cd ../tc
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
388 $ cat <<EOF > foo
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
389 > foo
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
390 > bar
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
391 > baz
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
392 > EOF
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
393 $ echo toremove > toremove
16507
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
394 $ echo baz > baz
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
395 $ hg ci -Amfoo
16507
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
396 adding baz
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
397 adding foo
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
398 adding toremove
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
399 $ cat <<EOF > foo
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
400 > foo2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
401 > bar2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
402 > baz2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
403 > EOF
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
404 $ rm toremove
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
405 $ echo added > added
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
406 $ hg ci -Amfoo2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
407 adding added
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
408 removing toremove
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
409 $ echo bar > bar
16507
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
410 $ cat > baz <<EOF
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
411 > before baz
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
412 > baz
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
413 > after baz
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
414 > EOF
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
415 $ hg ci -Ambar
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
416 adding bar
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
417 $ echo bar2 >> bar
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
418 $ hg ci -mbar2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
419 $ hg up 0
16507
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
420 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
421 $ echo foobar > foo
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
422 $ hg ci -mfoobar
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
423 created new head
42762
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
424
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
425 Repo log before transplant
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
426 $ hg glog
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
427 @ changeset: 4:e8643552fde5
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
428 | tag: tip
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
429 | parent: 0:493149fa1541
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
430 | user: test
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
431 | date: Thu Jan 01 00:00:00 1970 +0000
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
432 | summary: foobar
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
433 |
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
434 | o changeset: 3:1dab759070cf
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
435 | | user: test
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
436 | | date: Thu Jan 01 00:00:00 1970 +0000
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
437 | | summary: bar2
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
438 | |
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
439 | o changeset: 2:9d6d6b5a8275
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
440 | | user: test
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
441 | | date: Thu Jan 01 00:00:00 1970 +0000
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
442 | | summary: bar
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
443 | |
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
444 | o changeset: 1:46ae92138f3c
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
445 |/ user: test
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
446 | date: Thu Jan 01 00:00:00 1970 +0000
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
447 | summary: foo2
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
448 |
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
449 o changeset: 0:493149fa1541
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
450 user: test
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
451 date: Thu Jan 01 00:00:00 1970 +0000
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
452 summary: foo
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
453
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
454 $ hg transplant 1:3
16507
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
455 applying 46ae92138f3c
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
456 patching file foo
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
457 Hunk #1 FAILED at 0
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
458 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
459 patch failed to apply
27676
1c48f348f2d0 transplant: correct language to use working directory
timeless <timeless@mozdev.org>
parents: 27666
diff changeset
460 abort: fix up the working directory and run hg transplant --continue
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
461 [255]
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
462
42762
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
463 $ hg transplant --stop
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
464 stopped the interrupted transplant
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
465 working directory is now at e8643552fde5
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
466 Repo log after abort
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
467 $ hg glog
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
468 @ changeset: 4:e8643552fde5
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
469 | tag: tip
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
470 | parent: 0:493149fa1541
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
471 | user: test
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
472 | date: Thu Jan 01 00:00:00 1970 +0000
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
473 | summary: foobar
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
474 |
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
475 | o changeset: 3:1dab759070cf
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
476 | | user: test
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
477 | | date: Thu Jan 01 00:00:00 1970 +0000
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
478 | | summary: bar2
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
479 | |
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
480 | o changeset: 2:9d6d6b5a8275
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
481 | | user: test
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
482 | | date: Thu Jan 01 00:00:00 1970 +0000
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
483 | | summary: bar
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
484 | |
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
485 | o changeset: 1:46ae92138f3c
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
486 |/ user: test
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
487 | date: Thu Jan 01 00:00:00 1970 +0000
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
488 | summary: foo2
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
489 |
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
490 o changeset: 0:493149fa1541
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
491 user: test
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
492 date: Thu Jan 01 00:00:00 1970 +0000
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
493 summary: foo
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
494
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
495 $ hg transplant 1:3
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
496 applying 46ae92138f3c
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
497 file added already exists
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
498 1 out of 1 hunks FAILED -- saving rejects to file added.rej
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
499 patching file foo
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
500 Hunk #1 FAILED at 0
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
501 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
502 patch failed to apply
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
503 abort: fix up the working directory and run hg transplant --continue
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
504 [255]
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
505
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
506 transplant -c shouldn't use an old changeset
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
507
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
508 $ hg up -C
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
509 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32698
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 31452
diff changeset
510 updated to "e8643552fde5: foobar"
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 27678
diff changeset
511 1 other heads for branch "default"
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
512 $ rm added
42717
0a4303c77637 continue: added support for transplant
Taapas Agrawal <taapas2897@gmail.com>
parents: 42532
diff changeset
513 $ hg continue
0a4303c77637 continue: added support for transplant
Taapas Agrawal <taapas2897@gmail.com>
parents: 42532
diff changeset
514 abort: no transplant to continue (continueflag !)
0a4303c77637 continue: added support for transplant
Taapas Agrawal <taapas2897@gmail.com>
parents: 42532
diff changeset
515 abort: no operation in progress (no-continueflag !)
27677
128ef8828ed5 transplant: only use checkunfinished if not continue
timeless <timeless@mozdev.org>
parents: 27676
diff changeset
516 [255]
42762
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
517 $ hg transplant --stop
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
518 abort: no interrupted transplant found
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
519 [255]
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
520 $ hg transplant 1
16507
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
521 applying 46ae92138f3c
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
522 patching file foo
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
523 Hunk #1 FAILED at 0
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
524 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
525 patch failed to apply
27676
1c48f348f2d0 transplant: correct language to use working directory
timeless <timeless@mozdev.org>
parents: 27666
diff changeset
526 abort: fix up the working directory and run hg transplant --continue
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
527 [255]
27666
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
528 $ cp .hg/transplant/journal .hg/transplant/journal.orig
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
529 $ cat .hg/transplant/journal
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
530 # User test
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
531 # Date 0 0
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
532 # Node ID 46ae92138f3ce0249f6789650403286ead052b6d
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
533 # Parent e8643552fde58f57515e19c4b373a57c96e62af3
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
534 foo2
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
535 $ grep -v 'Date' .hg/transplant/journal.orig > .hg/transplant/journal
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
536 $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg transplant --continue -e
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
537 abort: filter corrupted changeset (no user or date)
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
538 [255]
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
539 $ cp .hg/transplant/journal.orig .hg/transplant/journal
22252
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
540 $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg transplant --continue -e
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
541 HGEDITFORM=transplant.normal
16507
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
542 46ae92138f3c transplanted as 9159dada197d
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
543 $ hg transplant 1:3
16507
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
544 skipping already applied revision 1:46ae92138f3c
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
545 applying 9d6d6b5a8275
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
546 9d6d6b5a8275 transplanted to 2d17a10c922f
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
547 applying 1dab759070cf
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
548 1dab759070cf transplanted to e06a69927eb0
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
549 $ hg locate
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
550 added
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
551 bar
16507
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
552 baz
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
553 foo
16507
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
554
42532
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 41784
diff changeset
555 test multiple revisions, --continue and hg status --verbose
16507
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
556
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
557 $ hg up -qC 0
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
558 $ echo bazbaz > baz
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
559 $ hg ci -Am anotherbaz baz
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
560 created new head
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
561 $ hg transplant 1:3
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
562 applying 46ae92138f3c
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
563 46ae92138f3c transplanted to 1024233ea0ba
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
564 applying 9d6d6b5a8275
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
565 patching file baz
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
566 Hunk #1 FAILED at 0
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
567 1 out of 1 hunks FAILED -- saving rejects to file baz.rej
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
568 patch failed to apply
27676
1c48f348f2d0 transplant: correct language to use working directory
timeless <timeless@mozdev.org>
parents: 27666
diff changeset
569 abort: fix up the working directory and run hg transplant --continue
16507
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
570 [255]
27678
b97004648028 transplant: specify the right file and path for unfinishedstates
timeless <timeless@mozdev.org>
parents: 27677
diff changeset
571 $ hg transplant 1:3
b97004648028 transplant: specify the right file and path for unfinishedstates
timeless <timeless@mozdev.org>
parents: 27677
diff changeset
572 abort: transplant in progress
42762
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
573 (use 'hg transplant --continue' or 'hg transplant --stop')
27678
b97004648028 transplant: specify the right file and path for unfinishedstates
timeless <timeless@mozdev.org>
parents: 27677
diff changeset
574 [255]
42532
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 41784
diff changeset
575 $ hg status -v
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 41784
diff changeset
576 A bar
42762
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
577 ? added.rej
42532
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 41784
diff changeset
578 ? baz.rej
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 41784
diff changeset
579 ? foo.rej
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 41784
diff changeset
580 # The repository is in an unfinished *transplant* state.
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 41784
diff changeset
581
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 41784
diff changeset
582 # To continue: hg transplant --continue
42762
ac6121a24f27 transplant: added support for --stop flag
Taapas Agrawal <taapas2897@gmail.com>
parents: 42717
diff changeset
583 # To stop: hg transplant --stop
42532
12243f15d53e statecheck: added support for STATES
Taapas Agrawal <taapas2897@gmail.com>
parents: 41784
diff changeset
584
16507
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
585 $ echo fixed > baz
42717
0a4303c77637 continue: added support for transplant
Taapas Agrawal <taapas2897@gmail.com>
parents: 42532
diff changeset
586 $ hg continue
16507
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
587 9d6d6b5a8275 transplanted as d80c49962290
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
588 applying 1dab759070cf
1f020021adfa transplant: do not rollback on patching error (issue3379)
Patrick Mezard <patrick@mezard.eu>
parents: 16400
diff changeset
589 1dab759070cf transplanted to aa0ffe6bd5ae
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
590 $ cd ..
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
591
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
592 Issue1111: Test transplant --merge
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
593
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
594 $ hg init t1111
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
595 $ cd t1111
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
596 $ echo a > a
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
597 $ hg ci -Am adda
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
598 adding a
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
599 $ echo b >> a
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
600 $ hg ci -m appendb
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
601 $ echo c >> a
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
602 $ hg ci -m appendc
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
603 $ hg up -C 0
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
604 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
605 $ echo d >> a
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
606 $ hg ci -m appendd
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
607 created new head
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
608
21024
7731a2281cf0 spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents: 20269
diff changeset
609 transplant
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
610
22252
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
611 $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg transplant -m 1 -e
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
612 applying 42dc4432fd35
22252
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
613 HGEDITFORM=transplant.merge
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
614 1:42dc4432fd35 merged at a9f4acbac129
22252
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
615 $ hg update -q -C 2
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
616 $ cat > a <<EOF
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
617 > x
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
618 > y
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
619 > z
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
620 > EOF
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
621 $ hg commit -m replace
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
622 $ hg update -q -C 4
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
623 $ hg transplant -m 5
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
624 applying 600a3cdcb41d
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
625 patching file a
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
626 Hunk #1 FAILED at 0
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
627 1 out of 1 hunks FAILED -- saving rejects to file a.rej
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
628 patch failed to apply
27676
1c48f348f2d0 transplant: correct language to use working directory
timeless <timeless@mozdev.org>
parents: 27666
diff changeset
629 abort: fix up the working directory and run hg transplant --continue
22252
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
630 [255]
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
631 $ HGEDITOR="sh $TESTTMP/checkeditform.sh" hg transplant --continue -e
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
632 HGEDITFORM=transplant.merge
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
633 600a3cdcb41d transplanted as a3f88be652e0
de783f2403c4 transplant: change "editform" to distinguish merge commits from others
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22046
diff changeset
634
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
635 $ cd ..
6639
6334569c8caa localrepo: fix partial merge test (issue 1111)
Patrick Mezard <pmezard@gmail.com>
parents: 5384
diff changeset
636
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
637 test transplant into empty repository
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
638
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
639 $ hg init empty
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
640 $ cd empty
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
641 $ hg transplant -s ../t -b tip -a
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
642 adding changesets
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
643 adding manifests
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
644 adding file changes
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
645 added 4 changesets with 4 changes to 4 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34251
diff changeset
646 new changesets 17ab29e464c6:a53251cdf717
20020
6fb59247c7d5 transplant: use peer of source repository as "remote" for "repo.pull()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18138
diff changeset
647
6fb59247c7d5 transplant: use peer of source repository as "remote" for "repo.pull()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18138
diff changeset
648 test "--merge" causing pull from source repository on local host
6fb59247c7d5 transplant: use peer of source repository as "remote" for "repo.pull()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18138
diff changeset
649
6fb59247c7d5 transplant: use peer of source repository as "remote" for "repo.pull()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18138
diff changeset
650 $ hg --config extensions.mq= -q strip 2
6fb59247c7d5 transplant: use peer of source repository as "remote" for "repo.pull()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18138
diff changeset
651 $ hg transplant -s ../t --merge tip
6fb59247c7d5 transplant: use peer of source repository as "remote" for "repo.pull()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18138
diff changeset
652 searching for changes
6fb59247c7d5 transplant: use peer of source repository as "remote" for "repo.pull()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18138
diff changeset
653 searching for changes
6fb59247c7d5 transplant: use peer of source repository as "remote" for "repo.pull()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18138
diff changeset
654 adding changesets
6fb59247c7d5 transplant: use peer of source repository as "remote" for "repo.pull()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18138
diff changeset
655 adding manifests
6fb59247c7d5 transplant: use peer of source repository as "remote" for "repo.pull()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18138
diff changeset
656 adding file changes
6fb59247c7d5 transplant: use peer of source repository as "remote" for "repo.pull()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18138
diff changeset
657 applying a53251cdf717
6fb59247c7d5 transplant: use peer of source repository as "remote" for "repo.pull()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18138
diff changeset
658 4:a53251cdf717 merged at 4831f4dc831a
42897
d7304434390f changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 42762
diff changeset
659 added 2 changesets with 2 changes to 2 files
20020
6fb59247c7d5 transplant: use peer of source repository as "remote" for "repo.pull()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 18138
diff changeset
660
20267
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
661 test interactive transplant
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
662
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
663 $ hg --config extensions.strip= -q strip 0
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
664 $ hg -R ../t log -G --template "{rev}:{node|short}"
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
665 @ 4:a53251cdf717
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
666 |
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
667 o 3:722f4667af76
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
668 |
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
669 o 2:37a1297eb21b
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
670 |
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
671 | o 1:d11e3596cc1a
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
672 |/
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
673 o 0:17ab29e464c6
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
674
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
675 $ hg transplant -q --config ui.interactive=true -s ../t <<EOF
27666
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
676 > ?
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
677 > x
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
678 > q
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
679 > EOF
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
680 0:17ab29e464c6
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
681 apply changeset? [ynmpcq?]: ?
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
682 y: yes, transplant this changeset
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
683 n: no, skip this changeset
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
684 m: merge at this changeset
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
685 p: show patch
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
686 c: commit selected changesets
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
687 q: quit and cancel transplant
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
688 ?: ? (show this help)
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
689 apply changeset? [ynmpcq?]: x
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
690 unrecognized response
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
691 apply changeset? [ynmpcq?]: q
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
692 $ hg transplant -q --config ui.interactive=true -s ../t <<EOF
20267
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
693 > p
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
694 > y
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
695 > n
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
696 > n
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
697 > m
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
698 > c
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
699 > EOF
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
700 0:17ab29e464c6
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
701 apply changeset? [ynmpcq?]: p
41784
251332dbf33d diff: make sure we output stat even when --git is not passed (issue4037) (BC)
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41371
diff changeset
702 diff -r 000000000000 -r 17ab29e464c6 r1
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
703 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
20267
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
704 +++ b/r1 Thu Jan 01 00:00:00 1970 +0000
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
705 @@ -0,0 +1,1 @@
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
706 +r1
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
707 apply changeset? [ynmpcq?]: y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
708 1:d11e3596cc1a
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
709 apply changeset? [ynmpcq?]: n
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
710 2:37a1297eb21b
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
711 apply changeset? [ynmpcq?]: n
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
712 3:722f4667af76
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
713 apply changeset? [ynmpcq?]: m
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
714 4:a53251cdf717
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
715 apply changeset? [ynmpcq?]: c
20267
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
716 $ hg log -G --template "{node|short}"
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
717 @ 88be5dde5260
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
718 |\
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
719 | o 722f4667af76
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
720 | |
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
721 | o 37a1297eb21b
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
722 |/
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
723 o 17ab29e464c6
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
724
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
725 $ hg transplant -q --config ui.interactive=true -s ../t <<EOF
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
726 > x
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
727 > ?
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
728 > y
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
729 > q
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
730 > EOF
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
731 1:d11e3596cc1a
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
732 apply changeset? [ynmpcq?]: x
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
733 unrecognized response
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
734 apply changeset? [ynmpcq?]: ?
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
735 y: yes, transplant this changeset
20269
acb6cceaffd5 transplant: use "ui.extractchoices()" to show the list of available responses
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20268
diff changeset
736 n: no, skip this changeset
20267
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
737 m: merge at this changeset
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
738 p: show patch
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
739 c: commit selected changesets
20269
acb6cceaffd5 transplant: use "ui.extractchoices()" to show the list of available responses
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20268
diff changeset
740 q: quit and cancel transplant
acb6cceaffd5 transplant: use "ui.extractchoices()" to show the list of available responses
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20268
diff changeset
741 ?: ? (show this help)
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
742 apply changeset? [ynmpcq?]: y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
743 4:a53251cdf717
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22252
diff changeset
744 apply changeset? [ynmpcq?]: q
20267
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
745 $ hg heads --template "{node|short}\n"
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
746 88be5dde5260
5a7aeb1e68b3 transplant: add test for interactive transplant
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20020
diff changeset
747
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
748 $ cd ..
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
749
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
750
16972
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16912
diff changeset
751 #if unix-permissions system-sh
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16912
diff changeset
752
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
753 test filter
8173
d3fb413667e5 transplant: remove the restriction that the destination be nonempty.
Jacob Lee <artdent@gmail.com>
parents: 8167
diff changeset
754
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
755 $ hg init filter
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
756 $ cd filter
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
757 $ cat <<'EOF' >test-filter
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
758 > #!/bin/sh
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
759 > sed 's/r1/r2/' $1 > $1.new
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
760 > mv $1.new $1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
761 > EOF
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
762 $ chmod +x test-filter
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
763 $ hg transplant -s ../t -b tip -a --filter ./test-filter
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
764 filtering * (glob)
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
765 applying 17ab29e464c6
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
766 17ab29e464c6 transplanted to e9ffc54ea104
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
767 filtering * (glob)
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
768 applying 37a1297eb21b
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
769 37a1297eb21b transplanted to 348b36d0b6a5
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
770 filtering * (glob)
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
771 applying 722f4667af76
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
772 722f4667af76 transplanted to 0aa6979afb95
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
773 filtering * (glob)
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
774 applying a53251cdf717
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
775 a53251cdf717 transplanted to 14f8512272b5
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
776 $ hg log --template '{rev} {parents} {desc}\n'
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
777 3 b3
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
778 2 b2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
779 1 b1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
780 0 r2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
781 $ cd ..
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
782
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
783
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
784 test filter with failed patch
8173
d3fb413667e5 transplant: remove the restriction that the destination be nonempty.
Jacob Lee <artdent@gmail.com>
parents: 8167
diff changeset
785
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
786 $ cd filter
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
787 $ hg up 0
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
788 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
789 $ echo foo > b1
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12070
diff changeset
790 $ hg ci -Am foo
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
791 adding b1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
792 adding test-filter
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
793 created new head
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
794 $ hg transplant 1 --filter ./test-filter
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
795 filtering * (glob)
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
796 applying 348b36d0b6a5
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
797 file b1 already exists
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
798 1 out of 1 hunks FAILED -- saving rejects to file b1.rej
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
799 patch failed to apply
27676
1c48f348f2d0 transplant: correct language to use working directory
timeless <timeless@mozdev.org>
parents: 27666
diff changeset
800 abort: fix up the working directory and run hg transplant --continue
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
801 [255]
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
802 $ cd ..
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
803
13579
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
804 test environment passed to filter
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
805
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
806 $ hg init filter-environment
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
807 $ cd filter-environment
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
808 $ cat <<'EOF' >test-filter-environment
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
809 > #!/bin/sh
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
810 > echo "Transplant by $HGUSER" >> $1
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
811 > echo "Transplant from rev $HGREVISION" >> $1
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
812 > EOF
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
813 $ chmod +x test-filter-environment
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
814 $ hg transplant -s ../t --filter ./test-filter-environment 0
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
815 filtering * (glob)
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
816 applying 17ab29e464c6
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
817 17ab29e464c6 transplanted to 5190e68026a0
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
818
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
819 $ hg log --template '{rev} {parents} {desc}\n'
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
820 0 r1
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
821 Transplant by test
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
822 Transplant from rev 17ab29e464c6ca53e329470efe2a9918ac617a6f
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
823 $ cd ..
3cbb3c57a50e transplant: added 'HGREVISION' variable to the environment passed to the 'filter' command
Luke Plant <L.Plant.98@cantab.net>
parents: 12943
diff changeset
824
13789
7e5031180c0f transplant: fix crash if filter script munges log file
Luke Plant <L.Plant.98@cantab.net>
parents: 13689
diff changeset
825 test transplant with filter handles invalid changelog
7e5031180c0f transplant: fix crash if filter script munges log file
Luke Plant <L.Plant.98@cantab.net>
parents: 13689
diff changeset
826
7e5031180c0f transplant: fix crash if filter script munges log file
Luke Plant <L.Plant.98@cantab.net>
parents: 13689
diff changeset
827 $ hg init filter-invalid-log
7e5031180c0f transplant: fix crash if filter script munges log file
Luke Plant <L.Plant.98@cantab.net>
parents: 13689
diff changeset
828 $ cd filter-invalid-log
7e5031180c0f transplant: fix crash if filter script munges log file
Luke Plant <L.Plant.98@cantab.net>
parents: 13689
diff changeset
829 $ cat <<'EOF' >test-filter-invalid-log
7e5031180c0f transplant: fix crash if filter script munges log file
Luke Plant <L.Plant.98@cantab.net>
parents: 13689
diff changeset
830 > #!/bin/sh
7e5031180c0f transplant: fix crash if filter script munges log file
Luke Plant <L.Plant.98@cantab.net>
parents: 13689
diff changeset
831 > echo "" > $1
7e5031180c0f transplant: fix crash if filter script munges log file
Luke Plant <L.Plant.98@cantab.net>
parents: 13689
diff changeset
832 > EOF
7e5031180c0f transplant: fix crash if filter script munges log file
Luke Plant <L.Plant.98@cantab.net>
parents: 13689
diff changeset
833 $ chmod +x test-filter-invalid-log
7e5031180c0f transplant: fix crash if filter script munges log file
Luke Plant <L.Plant.98@cantab.net>
parents: 13689
diff changeset
834 $ hg transplant -s ../t --filter ./test-filter-invalid-log 0
7e5031180c0f transplant: fix crash if filter script munges log file
Luke Plant <L.Plant.98@cantab.net>
parents: 13689
diff changeset
835 filtering * (glob)
13790
c0ed76b5056d Fix transplant error message to correspond with test
Brendan Cully <brendan@kublai.com>
parents: 13789
diff changeset
836 abort: filter corrupted changeset (no user or date)
13789
7e5031180c0f transplant: fix crash if filter script munges log file
Luke Plant <L.Plant.98@cantab.net>
parents: 13689
diff changeset
837 [255]
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16627
diff changeset
838 $ cd ..
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
839
16972
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16912
diff changeset
840 #endif
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16912
diff changeset
841
5efe9c6a34fe tests: add some missing #if's / hghave requirements
Mads Kiilerich <mads@kiilerich.com>
parents: 16912
diff changeset
842
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
843 test with a win32ext like setup (differing EOLs)
8811
8b35b08724eb Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents: 8518
diff changeset
844
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
845 $ hg init twin1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
846 $ cd twin1
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
847 $ echo a > a
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
848 $ echo b > b
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
849 $ echo b >> b
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
850 $ hg ci -Am t
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
851 adding a
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
852 adding b
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
853 $ echo a > b
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
854 $ echo b >> b
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
855 $ hg ci -m changeb
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
856 $ cd ..
9995
eba6c8687fd2 transplant: fix small bug when a patch fails while using --filter
Sune Foldager <cryo@cyanite.org>
parents: 8811
diff changeset
857
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
858 $ hg init twin2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
859 $ cd twin2
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
860 $ echo '[patch]' >> .hg/hgrc
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
861 $ echo 'eol = crlf' >> .hg/hgrc
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 38371
diff changeset
862 $ "$PYTHON" -c "open('b', 'wb').write(b'b\r\nb\r\n')"
14012
b247123d71f6 test-transplant: fix missing file addition
Patrick Mezard <pmezard@gmail.com>
parents: 12943
diff changeset
863 $ hg ci -Am addb
b247123d71f6 test-transplant: fix missing file addition
Patrick Mezard <pmezard@gmail.com>
parents: 12943
diff changeset
864 adding b
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
865 $ hg transplant -s ../twin1 tip
14012
b247123d71f6 test-transplant: fix missing file addition
Patrick Mezard <pmezard@gmail.com>
parents: 12943
diff changeset
866 searching for changes
b247123d71f6 test-transplant: fix missing file addition
Patrick Mezard <pmezard@gmail.com>
parents: 12943
diff changeset
867 warning: repository is unrelated
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
868 applying 2e849d776c17
14012
b247123d71f6 test-transplant: fix missing file addition
Patrick Mezard <pmezard@gmail.com>
parents: 12943
diff changeset
869 2e849d776c17 transplanted to 8e65bebc063e
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
870 $ cat b
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
871 a\r (esc)
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12847
diff changeset
872 b\r (esc)
11800
88c3ff051270 tests: unify test-transplant
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 9995
diff changeset
873 $ cd ..
16400
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
874
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
875 test transplant with merge changeset is skipped
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
876
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
877 $ hg init merge1a
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
878 $ cd merge1a
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
879 $ echo a > a
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
880 $ hg ci -Am a
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
881 adding a
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
882 $ hg branch b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
883 marked working directory as branch b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
884 (branches are permanent and global, did you want a bookmark?)
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
885 $ hg ci -m branchb
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
886 $ echo b > b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
887 $ hg ci -Am b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
888 adding b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
889 $ hg update default
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
890 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
891 $ hg merge b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
892 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
893 (branch merge, don't forget to commit)
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
894 $ hg ci -m mergeb
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
895 $ cd ..
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
896
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
897 $ hg init merge1b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
898 $ cd merge1b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
899 $ hg transplant -s ../merge1a tip
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16627
diff changeset
900 $ cd ..
16400
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
901
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
902 test transplant with merge changeset accepts --parent
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
903
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
904 $ hg init merge2a
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
905 $ cd merge2a
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
906 $ echo a > a
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
907 $ hg ci -Am a
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
908 adding a
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
909 $ hg branch b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
910 marked working directory as branch b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
911 (branches are permanent and global, did you want a bookmark?)
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
912 $ hg ci -m branchb
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
913 $ echo b > b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
914 $ hg ci -Am b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
915 adding b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
916 $ hg update default
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
917 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
918 $ hg merge b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
919 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
920 (branch merge, don't forget to commit)
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
921 $ hg ci -m mergeb
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
922 $ cd ..
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
923
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
924 $ hg init merge2b
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
925 $ cd merge2b
27666
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
926 $ hg transplant -s ../merge2a --parent tip tip
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
927 abort: be9f9b39483f is not a parent of be9f9b39483f
cd2f691f20b8 test-transplant.t: improve test coverage
timeless <timeless@mozdev.org>
parents: 27639
diff changeset
928 [255]
16400
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
929 $ hg transplant -s ../merge2a --parent 0 tip
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
930 applying be9f9b39483f
f2ba409dbb0f transplant: permit merge changesets via --parent
Steven Stallion <sstallion@gmail.com>
parents: 15446
diff changeset
931 be9f9b39483f transplanted to 9959e51f94d1
16912
6ef3107c661e tests: cleanup of tests that got lost in their own nested directories
Mads Kiilerich <mads@kiilerich.com>
parents: 16627
diff changeset
932 $ cd ..
17319
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
933
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
934 test transplanting a patch turning into a no-op
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
935
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
936 $ hg init binarysource
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
937 $ cd binarysource
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
938 $ echo a > a
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
939 $ hg ci -Am adda a
38371
fb4813304c5f py3: add `and None` to suppress return values of .write() calls
Pulkit Goyal <7895pulkit@gmail.com>
parents: 37845
diff changeset
940 >>> open('b', 'wb').write(b'\0b1') and None
17319
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
941 $ hg ci -Am addb b
38371
fb4813304c5f py3: add `and None` to suppress return values of .write() calls
Pulkit Goyal <7895pulkit@gmail.com>
parents: 37845
diff changeset
942 >>> open('b', 'wb').write(b'\0b2') and None
17319
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
943 $ hg ci -m changeb b
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
944 $ cd ..
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
945
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
946 $ hg clone -r0 binarysource binarydest
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
947 adding changesets
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
948 adding manifests
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
949 adding file changes
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
950 added 1 changesets with 1 changes to 1 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34251
diff changeset
951 new changesets 07f494440405
17319
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
952 updating to branch default
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
953 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
954 $ cd binarydest
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
955 $ cp ../binarysource/b b
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
956 $ hg ci -Am addb2 b
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
957 $ hg transplant -s ../binarysource 2
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
958 searching for changes
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
959 applying 7a7d57e15850
17320
0c3c65c0d3fc transplant: fix emptied changeset message
Patrick Mezard <patrick@mezard.eu>
parents: 17319
diff changeset
960 skipping emptied changeset 7a7d57e15850
23781
49caef455912 transplant: properly skip empty changeset (issue4423)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23452
diff changeset
961
49caef455912 transplant: properly skip empty changeset (issue4423)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23452
diff changeset
962 Test empty result in --continue
49caef455912 transplant: properly skip empty changeset (issue4423)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23452
diff changeset
963
49caef455912 transplant: properly skip empty changeset (issue4423)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23452
diff changeset
964 $ hg transplant -s ../binarysource 1
49caef455912 transplant: properly skip empty changeset (issue4423)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23452
diff changeset
965 searching for changes
49caef455912 transplant: properly skip empty changeset (issue4423)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23452
diff changeset
966 applying 645035761929
49caef455912 transplant: properly skip empty changeset (issue4423)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23452
diff changeset
967 file b already exists
49caef455912 transplant: properly skip empty changeset (issue4423)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23452
diff changeset
968 1 out of 1 hunks FAILED -- saving rejects to file b.rej
49caef455912 transplant: properly skip empty changeset (issue4423)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23452
diff changeset
969 patch failed to apply
27676
1c48f348f2d0 transplant: correct language to use working directory
timeless <timeless@mozdev.org>
parents: 27666
diff changeset
970 abort: fix up the working directory and run hg transplant --continue
23781
49caef455912 transplant: properly skip empty changeset (issue4423)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23452
diff changeset
971 [255]
49caef455912 transplant: properly skip empty changeset (issue4423)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23452
diff changeset
972 $ hg status
49caef455912 transplant: properly skip empty changeset (issue4423)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23452
diff changeset
973 ? b.rej
42717
0a4303c77637 continue: added support for transplant
Taapas Agrawal <taapas2897@gmail.com>
parents: 42532
diff changeset
974 $ hg continue
23781
49caef455912 transplant: properly skip empty changeset (issue4423)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23452
diff changeset
975 645035761929 skipped due to empty diff
49caef455912 transplant: properly skip empty changeset (issue4423)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23452
diff changeset
976
17319
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
977 $ cd ..
a189d4470a34 transplant: handle non-empty patches doing nothing (issue2806)
Patrick Mezard <patrick@mezard.eu>
parents: 17186
diff changeset
978
17539
bc7377160fa7 tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17320
diff changeset
979 Explicitly kill daemons to let the test exit on Windows
bc7377160fa7 tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17320
diff changeset
980
25474
8c14f87bd0ae tests: drop DAEMON_PIDS from killdaemons calls
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
981 $ killdaemons.py
17539
bc7377160fa7 tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17320
diff changeset
982
25757
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
983 Test that patch-ed files are treated as "modified", when transplant is
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
984 aborted by failure of patching, even if none of mode, size and
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
985 timestamp of them isn't changed on the filesystem (see also issue4583)
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
986
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
987 $ cd t
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
988
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
989 $ cat > $TESTTMP/abort.py <<EOF
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
990 > # emulate that patch.patch() is aborted at patching on "abort" file
34251
61714510220d error: move patch.PatchError so it can easily implement __bytes__ (API)
Yuya Nishihara <yuya@tcha.org>
parents: 32698
diff changeset
991 > from mercurial import error, extensions, patch as patchmod
25757
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
992 > def patch(orig, ui, repo, patchname,
36326
a2cbff474821 py3: add b'' prefixes in test-transplant.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 36016
diff changeset
993 > strip=1, prefix=b'', files=None,
a2cbff474821 py3: add b'' prefixes in test-transplant.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 36016
diff changeset
994 > eolmode=b'strict', similarity=0):
25757
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
995 > if files is None:
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
996 > files = set()
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
997 > r = orig(ui, repo, patchname,
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
998 > strip=strip, prefix=prefix, files=files,
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
999 > eolmode=eolmode, similarity=similarity)
36326
a2cbff474821 py3: add b'' prefixes in test-transplant.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 36016
diff changeset
1000 > if b'abort' in files:
34251
61714510220d error: move patch.PatchError so it can easily implement __bytes__ (API)
Yuya Nishihara <yuya@tcha.org>
parents: 32698
diff changeset
1001 > raise error.PatchError('intentional error while patching')
25757
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1002 > return r
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1003 > def extsetup(ui):
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1004 > extensions.wrapfunction(patchmod, 'patch', patch)
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1005 > EOF
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1006
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1007 $ echo X1 > r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1008 $ hg diff --nodates r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1009 diff -r a53251cdf717 r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1010 --- a/r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1011 +++ b/r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1012 @@ -1,1 +1,1 @@
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1013 -r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1014 +X1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1015 $ hg commit -m "X1 as r1"
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1016
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1017 $ echo 'marking to abort patching' > abort
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1018 $ hg add abort
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1019 $ echo Y1 > r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1020 $ hg diff --nodates r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1021 diff -r 22c515968f13 r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1022 --- a/r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1023 +++ b/r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1024 @@ -1,1 +1,1 @@
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1025 -X1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1026 +Y1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1027 $ hg commit -m "Y1 as r1"
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1028
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1029 $ hg update -q -C d11e3596cc1a
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1030 $ cat r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1031 r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1032
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1033 $ cat >> .hg/hgrc <<EOF
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1034 > [fakedirstatewritetime]
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1035 > # emulate invoking dirstate.write() via repo.status() or markcommitted()
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1036 > # at 2000-01-01 00:00
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1037 > fakenow = 200001010000
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1038 >
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1039 > # emulate invoking patch.internalpatch() at 2000-01-01 00:00
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1040 > [fakepatchtime]
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1041 > fakenow = 200001010000
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1042 >
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1043 > [extensions]
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1044 > fakedirstatewritetime = $TESTDIR/fakedirstatewritetime.py
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1045 > fakepatchtime = $TESTDIR/fakepatchtime.py
27639
dbd47b21fd28 cleanup: remove superfluous space after space after equals (tests)
timeless <timeless@mozdev.org>
parents: 25879
diff changeset
1046 > abort = $TESTTMP/abort.py
25757
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1047 > EOF
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1048 $ hg transplant "22c515968f13::"
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1049 applying 22c515968f13
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1050 22c515968f13 transplanted to * (glob)
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1051 applying e38700ba9dd3
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1052 intentional error while patching
27676
1c48f348f2d0 transplant: correct language to use working directory
timeless <timeless@mozdev.org>
parents: 27666
diff changeset
1053 abort: fix up the working directory and run hg transplant --continue
25757
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1054 [255]
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1055 $ cat >> .hg/hgrc <<EOF
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1056 > [hooks]
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1057 > fakedirstatewritetime = !
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1058 > fakepatchtime = !
25879
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1059 > [extensions]
25757
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1060 > abort = !
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1061 > EOF
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1062
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1063 $ cat r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1064 Y1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1065 $ hg debugstate | grep ' r1$'
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1066 n 644 3 unset r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1067 $ hg status -A r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1068 M r1
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1069
25879
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1070 Test that rollback by unexpected failure after transplanting the first
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1071 revision restores dirstate correctly.
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1072
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1073 $ hg rollback -q
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1074 $ rm -f abort
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1075 $ hg update -q -C d11e3596cc1a
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1076 $ hg parents -T "{node|short}\n"
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1077 d11e3596cc1a
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1078 $ hg status -A
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1079 C r1
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1080 C r2
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1081
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1082 $ cat >> .hg/hgrc <<EOF
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1083 > [hooks]
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1084 > # emulate failure at transplanting the 2nd revision
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1085 > pretxncommit.abort = test ! -f abort
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1086 > EOF
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1087 $ hg transplant "22c515968f13::"
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1088 applying 22c515968f13
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1089 22c515968f13 transplanted to * (glob)
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1090 applying e38700ba9dd3
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1091 transaction abort!
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1092 rollback completed
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1093 abort: pretxncommit.abort hook exited with status 1
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1094 [255]
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1095 $ cat >> .hg/hgrc <<EOF
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1096 > [hooks]
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1097 > pretxncommit.abort = !
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1098 > EOF
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1099
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1100 $ hg parents -T "{node|short}\n"
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1101 d11e3596cc1a
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1102 $ hg status -A
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1103 M r1
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1104 ? abort
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1105 C r2
99e88320d665 transplant: restore dirstate correctly at unexpected failure
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25757
diff changeset
1106
25757
4d1382fd96ff context: write dirstate out explicitly at the end of markcommitted
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25695
diff changeset
1107 $ cd ..