Show More
@@ -1,924 +1,917 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extdiff] |
|
2 | > [extdiff] | |
3 | > # for portability: |
|
3 | > # for portability: | |
4 | > pdiff = sh "$RUNTESTDIR/pdiff" |
|
4 | > pdiff = sh "$RUNTESTDIR/pdiff" | |
5 | > EOF |
|
5 | > EOF | |
6 |
|
6 | |||
7 | Create a repo with some stuff in it: |
|
7 | Create a repo with some stuff in it: | |
8 |
|
8 | |||
9 | $ hg init a |
|
9 | $ hg init a | |
10 | $ cd a |
|
10 | $ cd a | |
11 | $ echo a > a |
|
11 | $ echo a > a | |
12 | $ echo a > d |
|
12 | $ echo a > d | |
13 | $ echo a > e |
|
13 | $ echo a > e | |
14 | $ hg ci -qAm0 |
|
14 | $ hg ci -qAm0 | |
15 | $ echo b > a |
|
15 | $ echo b > a | |
16 | $ hg ci -m1 -u bar |
|
16 | $ hg ci -m1 -u bar | |
17 | $ hg mv a b |
|
17 | $ hg mv a b | |
18 | $ hg ci -m2 |
|
18 | $ hg ci -m2 | |
19 | $ hg cp b c |
|
19 | $ hg cp b c | |
20 | $ hg ci -m3 -u baz |
|
20 | $ hg ci -m3 -u baz | |
21 | $ echo b > d |
|
21 | $ echo b > d | |
22 | $ echo f > e |
|
22 | $ echo f > e | |
23 | $ hg ci -m4 |
|
23 | $ hg ci -m4 | |
24 | $ hg up -q 3 |
|
24 | $ hg up -q 3 | |
25 | $ echo b > e |
|
25 | $ echo b > e | |
26 | $ hg branch -q stable |
|
26 | $ hg branch -q stable | |
27 | $ hg ci -m5 |
|
27 | $ hg ci -m5 | |
28 | $ hg merge -q default --tool internal:local # for conflicts in e, choose 5 and ignore 4 |
|
28 | $ hg merge -q default --tool internal:local # for conflicts in e, choose 5 and ignore 4 | |
29 | $ hg branch -q default |
|
29 | $ hg branch -q default | |
30 | $ hg ci -m6 |
|
30 | $ hg ci -m6 | |
31 | $ hg phase --public 3 |
|
31 | $ hg phase --public 3 | |
32 | $ hg phase --force --secret 6 |
|
32 | $ hg phase --force --secret 6 | |
33 |
|
33 | |||
34 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
34 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' | |
35 | @ test@6.secret: 6 |
|
35 | @ test@6.secret: 6 | |
36 | |\ |
|
36 | |\ | |
37 | | o test@5.draft: 5 |
|
37 | | o test@5.draft: 5 | |
38 | | | |
|
38 | | | | |
39 | o | test@4.draft: 4 |
|
39 | o | test@4.draft: 4 | |
40 | |/ |
|
40 | |/ | |
41 | o baz@3.public: 3 |
|
41 | o baz@3.public: 3 | |
42 | | |
|
42 | | | |
43 | o test@2.public: 2 |
|
43 | o test@2.public: 2 | |
44 | | |
|
44 | | | |
45 | o bar@1.public: 1 |
|
45 | o bar@1.public: 1 | |
46 | | |
|
46 | | | |
47 | o test@0.public: 0 |
|
47 | o test@0.public: 0 | |
48 |
|
48 | |||
49 | Test --base for grafting the merge of 4 from the perspective of 5, thus only getting the change to d |
|
49 | Test --base for grafting the merge of 4 from the perspective of 5, thus only getting the change to d | |
50 |
|
50 | |||
51 | $ hg up -cqr 3 |
|
51 | $ hg up -cqr 3 | |
52 | $ hg graft -r 6 --base 5 |
|
52 | $ hg graft -r 6 --base 5 | |
53 | grafting 6:25a2b029d3ae "6" (tip) |
|
53 | grafting 6:25a2b029d3ae "6" (tip) | |
54 | merging e |
|
54 | merging e | |
55 | $ hg st --change . |
|
55 | $ hg st --change . | |
56 | M d |
|
56 | M d | |
57 |
|
57 | |||
58 | $ hg -q strip . --config extensions.strip= |
|
58 | $ hg -q strip . --config extensions.strip= | |
59 |
|
59 | |||
60 | Test --base for collapsing changesets 2 and 3, thus getting both b and c |
|
60 | Test --base for collapsing changesets 2 and 3, thus getting both b and c | |
61 |
|
61 | |||
62 | $ hg up -cqr 0 |
|
62 | $ hg up -cqr 0 | |
63 | $ hg graft -r 3 --base 1 |
|
63 | $ hg graft -r 3 --base 1 | |
64 | grafting 3:4c60f11aa304 "3" |
|
64 | grafting 3:4c60f11aa304 "3" | |
65 | merging a and b to b |
|
65 | merging a and b to b | |
66 | merging a and c to c |
|
66 | merging a and c to c | |
67 | $ hg st --change . |
|
67 | $ hg st --change . | |
68 | A b |
|
68 | A b | |
69 | A c |
|
69 | A c | |
70 | R a |
|
70 | R a | |
71 |
|
71 | |||
72 | $ hg -q strip . --config extensions.strip= |
|
72 | $ hg -q strip . --config extensions.strip= | |
73 |
|
73 | |||
74 | Specifying child as --base revision fails safely (perhaps slightly confusing, but consistent) |
|
74 | Specifying child as --base revision fails safely (perhaps slightly confusing, but consistent) | |
75 |
|
75 | |||
76 | $ hg graft -r 2 --base 3 |
|
76 | $ hg graft -r 2 --base 3 | |
77 | grafting 2:5c095ad7e90f "2" |
|
77 | grafting 2:5c095ad7e90f "2" | |
78 | note: possible conflict - c was deleted and renamed to: |
|
78 | note: possible conflict - c was deleted and renamed to: | |
79 | a |
|
79 | a | |
80 | note: graft of 2:5c095ad7e90f created no changes to commit |
|
80 | note: graft of 2:5c095ad7e90f created no changes to commit | |
81 |
|
81 | |||
82 | Can't continue without starting: |
|
82 | Can't continue without starting: | |
83 |
|
83 | |||
84 | $ hg -q up -cr tip |
|
84 | $ hg -q up -cr tip | |
85 | $ hg rm -q e |
|
85 | $ hg rm -q e | |
86 | $ hg graft --continue |
|
86 | $ hg graft --continue | |
87 | abort: no graft in progress |
|
87 | abort: no graft in progress | |
88 | [255] |
|
88 | [255] | |
89 | $ hg revert -r . -q e |
|
89 | $ hg revert -r . -q e | |
90 |
|
90 | |||
91 | Need to specify a rev: |
|
91 | Need to specify a rev: | |
92 |
|
92 | |||
93 | $ hg graft |
|
93 | $ hg graft | |
94 | abort: no revisions specified |
|
94 | abort: no revisions specified | |
95 | [255] |
|
95 | [255] | |
96 |
|
96 | |||
97 | Can't graft ancestor: |
|
97 | Can't graft ancestor: | |
98 |
|
98 | |||
99 | $ hg graft 1 2 |
|
99 | $ hg graft 1 2 | |
100 | skipping ancestor revision 1:5d205f8b35b6 |
|
100 | skipping ancestor revision 1:5d205f8b35b6 | |
101 | skipping ancestor revision 2:5c095ad7e90f |
|
101 | skipping ancestor revision 2:5c095ad7e90f | |
102 | [255] |
|
102 | [255] | |
103 |
|
103 | |||
104 | Specify revisions with -r: |
|
104 | Specify revisions with -r: | |
105 |
|
105 | |||
106 | $ hg graft -r 1 -r 2 |
|
106 | $ hg graft -r 1 -r 2 | |
107 | skipping ancestor revision 1:5d205f8b35b6 |
|
107 | skipping ancestor revision 1:5d205f8b35b6 | |
108 | skipping ancestor revision 2:5c095ad7e90f |
|
108 | skipping ancestor revision 2:5c095ad7e90f | |
109 | [255] |
|
109 | [255] | |
110 |
|
110 | |||
111 | $ hg graft -r 1 2 |
|
111 | $ hg graft -r 1 2 | |
112 | warning: inconsistent use of --rev might give unexpected revision ordering! |
|
112 | warning: inconsistent use of --rev might give unexpected revision ordering! | |
113 | skipping ancestor revision 2:5c095ad7e90f |
|
113 | skipping ancestor revision 2:5c095ad7e90f | |
114 | skipping ancestor revision 1:5d205f8b35b6 |
|
114 | skipping ancestor revision 1:5d205f8b35b6 | |
115 | [255] |
|
115 | [255] | |
116 |
|
116 | |||
117 | Conflicting date/user options: |
|
117 | Conflicting date/user options: | |
118 |
|
118 | |||
119 | $ hg up -q 0 |
|
119 | $ hg up -q 0 | |
120 | $ hg graft -U --user foo 2 |
|
120 | $ hg graft -U --user foo 2 | |
121 | abort: cannot specify both --user and --currentuser |
|
121 | abort: cannot specify both --user and --currentuser | |
122 | [255] |
|
122 | [255] | |
123 | $ hg graft -D --date '0 0' 2 |
|
123 | $ hg graft -D --date '0 0' 2 | |
124 | abort: cannot specify both --date and --currentdate |
|
124 | abort: cannot specify both --date and --currentdate | |
125 | [255] |
|
125 | [255] | |
126 |
|
126 | |||
127 | Can't graft with dirty wd: |
|
127 | Can't graft with dirty wd: | |
128 |
|
128 | |||
129 | $ hg up -q 0 |
|
129 | $ hg up -q 0 | |
130 | $ echo foo > a |
|
130 | $ echo foo > a | |
131 | $ hg graft 1 |
|
131 | $ hg graft 1 | |
132 | abort: uncommitted changes |
|
132 | abort: uncommitted changes | |
133 | [255] |
|
133 | [255] | |
134 | $ hg revert a |
|
134 | $ hg revert a | |
135 |
|
135 | |||
136 | Graft a rename: |
|
136 | Graft a rename: | |
137 | (this also tests that editor is invoked if '--edit' is specified) |
|
137 | (this also tests that editor is invoked if '--edit' is specified) | |
138 |
|
138 | |||
139 | $ hg status --rev "2^1" --rev 2 |
|
139 | $ hg status --rev "2^1" --rev 2 | |
140 | A b |
|
140 | A b | |
141 | R a |
|
141 | R a | |
142 | $ HGEDITOR=cat hg graft 2 -u foo --edit |
|
142 | $ HGEDITOR=cat hg graft 2 -u foo --edit | |
143 | grafting 2:5c095ad7e90f "2" |
|
143 | grafting 2:5c095ad7e90f "2" | |
144 | merging a and b to b |
|
144 | merging a and b to b | |
145 | 2 |
|
145 | 2 | |
146 |
|
146 | |||
147 |
|
147 | |||
148 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
148 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
149 | HG: Leave message empty to abort commit. |
|
149 | HG: Leave message empty to abort commit. | |
150 | HG: -- |
|
150 | HG: -- | |
151 | HG: user: foo |
|
151 | HG: user: foo | |
152 | HG: branch 'default' |
|
152 | HG: branch 'default' | |
153 | HG: added b |
|
153 | HG: added b | |
154 | HG: removed a |
|
154 | HG: removed a | |
155 | $ hg export tip --git |
|
155 | $ hg export tip --git | |
156 | # HG changeset patch |
|
156 | # HG changeset patch | |
157 | # User foo |
|
157 | # User foo | |
158 | # Date 0 0 |
|
158 | # Date 0 0 | |
159 | # Thu Jan 01 00:00:00 1970 +0000 |
|
159 | # Thu Jan 01 00:00:00 1970 +0000 | |
160 | # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
160 | # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
161 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e |
|
161 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e | |
162 | 2 |
|
162 | 2 | |
163 |
|
163 | |||
164 | diff --git a/a b/b |
|
164 | diff --git a/a b/b | |
165 | rename from a |
|
165 | rename from a | |
166 | rename to b |
|
166 | rename to b | |
167 |
|
167 | |||
168 | Look for extra:source |
|
168 | Look for extra:source | |
169 |
|
169 | |||
170 | $ hg log --debug -r tip |
|
170 | $ hg log --debug -r tip | |
171 | changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
171 | changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
172 | tag: tip |
|
172 | tag: tip | |
173 | phase: draft |
|
173 | phase: draft | |
174 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e |
|
174 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e | |
175 | parent: -1:0000000000000000000000000000000000000000 |
|
175 | parent: -1:0000000000000000000000000000000000000000 | |
176 | manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb |
|
176 | manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb | |
177 | user: foo |
|
177 | user: foo | |
178 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
178 | date: Thu Jan 01 00:00:00 1970 +0000 | |
179 | files+: b |
|
179 | files+: b | |
180 | files-: a |
|
180 | files-: a | |
181 | extra: branch=default |
|
181 | extra: branch=default | |
182 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
182 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
183 | description: |
|
183 | description: | |
184 | 2 |
|
184 | 2 | |
185 |
|
185 | |||
186 |
|
186 | |||
187 |
|
187 | |||
188 | Graft out of order, skipping a merge and a duplicate |
|
188 | Graft out of order, skipping a merge and a duplicate | |
189 | (this also tests that editor is not invoked if '--edit' is not specified) |
|
189 | (this also tests that editor is not invoked if '--edit' is not specified) | |
190 |
|
190 | |||
191 | $ hg graft 1 5 4 3 'merge()' 2 -n |
|
191 | $ hg graft 1 5 4 3 'merge()' 2 -n | |
192 | skipping ungraftable merge revision 6 |
|
192 | skipping ungraftable merge revision 6 | |
193 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
193 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) | |
194 | grafting 1:5d205f8b35b6 "1" |
|
194 | grafting 1:5d205f8b35b6 "1" | |
195 | grafting 5:97f8bfe72746 "5" |
|
195 | grafting 5:97f8bfe72746 "5" | |
196 | grafting 4:9c233e8e184d "4" |
|
196 | grafting 4:9c233e8e184d "4" | |
197 | grafting 3:4c60f11aa304 "3" |
|
197 | grafting 3:4c60f11aa304 "3" | |
198 |
|
198 | |||
199 | $ HGEDITOR=cat hg graft 1 5 'merge()' 2 --debug |
|
199 | $ HGEDITOR=cat hg graft 1 5 'merge()' 2 --debug | |
200 | skipping ungraftable merge revision 6 |
|
200 | skipping ungraftable merge revision 6 | |
201 | scanning for duplicate grafts |
|
201 | scanning for duplicate grafts | |
202 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
202 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) | |
203 | grafting 1:5d205f8b35b6 "1" |
|
203 | grafting 1:5d205f8b35b6 "1" | |
204 | unmatched files in local: |
|
204 | unmatched files in local: | |
205 | b |
|
205 | b | |
206 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
206 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
207 | src: 'a' -> dst: 'b' * |
|
207 | src: 'a' -> dst: 'b' * | |
208 | checking for directory renames |
|
208 | checking for directory renames | |
209 | resolving manifests |
|
209 | resolving manifests | |
210 | branchmerge: True, force: True, partial: False |
|
210 | branchmerge: True, force: True, partial: False | |
211 | ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6 |
|
211 | ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6 | |
212 | preserving b for resolve of b |
|
212 | preserving b for resolve of b | |
213 | starting 4 threads for background file closing (?) |
|
213 | starting 4 threads for background file closing (?) | |
214 | b: local copied/moved from a -> m (premerge) |
|
214 | b: local copied/moved from a -> m (premerge) | |
215 | picked tool ':merge' for b (binary False symlink False changedelete False) |
|
215 | picked tool ':merge' for b (binary False symlink False changedelete False) | |
216 | merging b and a to b |
|
216 | merging b and a to b | |
217 | my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622 |
|
217 | my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622 | |
218 | premerge successful |
|
218 | premerge successful | |
219 | committing files: |
|
219 | committing files: | |
220 | b |
|
220 | b | |
221 | committing manifest |
|
221 | committing manifest | |
222 | committing changelog |
|
222 | committing changelog | |
223 | updating the branch cache |
|
223 | updating the branch cache | |
224 | grafting 5:97f8bfe72746 "5" |
|
224 | grafting 5:97f8bfe72746 "5" | |
225 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
225 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
226 | src: 'c' -> dst: 'b' |
|
226 | src: 'c' -> dst: 'b' | |
227 | checking for directory renames |
|
227 | checking for directory renames | |
228 | resolving manifests |
|
228 | resolving manifests | |
229 | branchmerge: True, force: True, partial: False |
|
229 | branchmerge: True, force: True, partial: False | |
230 | ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746 |
|
230 | ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746 | |
231 | e: remote is newer -> g |
|
231 | e: remote is newer -> g | |
232 | getting e |
|
232 | getting e | |
233 | committing files: |
|
233 | committing files: | |
234 | e |
|
234 | e | |
235 | committing manifest |
|
235 | committing manifest | |
236 | committing changelog |
|
236 | committing changelog | |
237 | updating the branch cache |
|
237 | updating the branch cache | |
238 | $ HGEDITOR=cat hg graft 4 3 --log --debug |
|
238 | $ HGEDITOR=cat hg graft 4 3 --log --debug | |
239 | scanning for duplicate grafts |
|
239 | scanning for duplicate grafts | |
240 | grafting 4:9c233e8e184d "4" |
|
240 | grafting 4:9c233e8e184d "4" | |
241 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
241 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
242 | src: 'c' -> dst: 'b' |
|
242 | src: 'c' -> dst: 'b' | |
243 | checking for directory renames |
|
243 | checking for directory renames | |
244 | resolving manifests |
|
244 | resolving manifests | |
245 | branchmerge: True, force: True, partial: False |
|
245 | branchmerge: True, force: True, partial: False | |
246 | ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d |
|
246 | ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d | |
247 | preserving e for resolve of e |
|
247 | preserving e for resolve of e | |
248 | d: remote is newer -> g |
|
248 | d: remote is newer -> g | |
249 | getting d |
|
249 | getting d | |
250 | e: versions differ -> m (premerge) |
|
250 | e: versions differ -> m (premerge) | |
251 | picked tool ':merge' for e (binary False symlink False changedelete False) |
|
251 | picked tool ':merge' for e (binary False symlink False changedelete False) | |
252 | merging e |
|
252 | merging e | |
253 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304 |
|
253 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304 | |
254 | e: versions differ -> m (merge) |
|
254 | e: versions differ -> m (merge) | |
255 | picked tool ':merge' for e (binary False symlink False changedelete False) |
|
255 | picked tool ':merge' for e (binary False symlink False changedelete False) | |
256 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304 |
|
256 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304 | |
257 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
257 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | |
258 | abort: unresolved conflicts, can't continue |
|
258 | abort: unresolved conflicts, can't continue | |
259 | (use 'hg resolve' and 'hg graft --continue') |
|
259 | (use 'hg resolve' and 'hg graft --continue') | |
260 | [255] |
|
260 | [255] | |
261 |
|
261 | |||
262 | Summary should mention graft: |
|
262 | Summary should mention graft: | |
263 |
|
263 | |||
264 | $ hg summary |grep graft |
|
264 | $ hg summary |grep graft | |
265 | commit: 2 modified, 2 unknown, 1 unresolved (graft in progress) |
|
265 | commit: 2 modified, 2 unknown, 1 unresolved (graft in progress) | |
266 |
|
266 | |||
267 | Using status to get more context |
|
267 | Using status to get more context | |
268 |
|
268 | |||
269 | $ hg status --verbose |
|
269 | $ hg status --verbose | |
270 | M d |
|
270 | M d | |
271 | M e |
|
271 | M e | |
272 | ? a.orig |
|
272 | ? a.orig | |
273 | ? e.orig |
|
273 | ? e.orig | |
274 | # The repository is in an unfinished *graft* state. |
|
274 | # The repository is in an unfinished *graft* state. | |
275 |
|
275 | |||
276 | # Unresolved merge conflicts: |
|
276 | # Unresolved merge conflicts: | |
277 | # |
|
277 | # | |
278 | # e |
|
278 | # e | |
279 | # |
|
279 | # | |
280 | # To mark files as resolved: hg resolve --mark FILE |
|
280 | # To mark files as resolved: hg resolve --mark FILE | |
281 |
|
281 | |||
282 | # To continue: hg graft --continue |
|
282 | # To continue: hg graft --continue | |
283 | # To abort: hg graft --abort |
|
283 | # To abort: hg graft --abort | |
284 | # To stop: hg graft --stop |
|
284 | # To stop: hg graft --stop | |
285 |
|
285 | |||
286 |
|
286 | |||
287 | Commit while interrupted should fail: |
|
287 | Commit while interrupted should fail: | |
288 |
|
288 | |||
289 | $ hg ci -m 'commit interrupted graft' |
|
289 | $ hg ci -m 'commit interrupted graft' | |
290 | abort: graft in progress |
|
290 | abort: graft in progress | |
291 | (use 'hg graft --continue' or 'hg graft --stop' to stop) |
|
291 | (use 'hg graft --continue' or 'hg graft --stop' to stop) | |
292 | [255] |
|
292 | [255] | |
293 |
|
293 | |||
294 | Abort the graft and try committing: |
|
294 | Abort the graft and try committing: | |
295 |
|
295 | |||
296 | $ hg up -C . |
|
296 | $ hg up -C . | |
297 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
297 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
298 | $ echo c >> e |
|
298 | $ echo c >> e | |
299 | $ hg ci -mtest |
|
299 | $ hg ci -mtest | |
300 |
|
300 | |||
301 | $ hg strip . --config extensions.strip= |
|
301 | $ hg strip . --config extensions.strip= | |
302 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
302 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
303 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob) |
|
303 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob) | |
304 |
|
304 | |||
305 | Graft again: |
|
305 | Graft again: | |
306 |
|
306 | |||
307 | $ hg graft 1 5 4 3 'merge()' 2 |
|
307 | $ hg graft 1 5 4 3 'merge()' 2 | |
308 | skipping ungraftable merge revision 6 |
|
308 | skipping ungraftable merge revision 6 | |
309 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
309 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) | |
310 | skipping revision 1:5d205f8b35b6 (already grafted to 8:6b9e5368ca4e) |
|
310 | skipping revision 1:5d205f8b35b6 (already grafted to 8:6b9e5368ca4e) | |
311 | skipping revision 5:97f8bfe72746 (already grafted to 9:1905859650ec) |
|
311 | skipping revision 5:97f8bfe72746 (already grafted to 9:1905859650ec) | |
312 | grafting 4:9c233e8e184d "4" |
|
312 | grafting 4:9c233e8e184d "4" | |
313 | merging e |
|
313 | merging e | |
314 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
|
314 | warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | |
315 | abort: unresolved conflicts, can't continue |
|
315 | abort: unresolved conflicts, can't continue | |
316 | (use 'hg resolve' and 'hg graft --continue') |
|
316 | (use 'hg resolve' and 'hg graft --continue') | |
317 | [255] |
|
317 | [255] | |
318 |
|
318 | |||
319 | Continue without resolve should fail: |
|
319 | Continue without resolve should fail: | |
320 |
|
320 | |||
321 | $ hg graft -c |
|
321 | $ hg graft -c | |
322 | grafting 4:9c233e8e184d "4" |
|
322 | grafting 4:9c233e8e184d "4" | |
323 | abort: unresolved merge conflicts (see 'hg help resolve') |
|
323 | abort: unresolved merge conflicts (see 'hg help resolve') | |
324 | [255] |
|
324 | [255] | |
325 |
|
325 | |||
326 | Fix up: |
|
326 | Fix up: | |
327 |
|
327 | |||
328 | $ echo b > e |
|
328 | $ echo b > e | |
329 | $ hg resolve -m e |
|
329 | $ hg resolve -m e | |
330 | (no more unresolved files) |
|
330 | (no more unresolved files) | |
331 | continue: hg graft --continue |
|
331 | continue: hg graft --continue | |
332 |
|
332 | |||
333 | Continue with a revision should fail: |
|
333 | Continue with a revision should fail: | |
334 |
|
334 | |||
335 | $ hg graft -c 6 |
|
335 | $ hg graft -c 6 | |
336 | abort: can't specify --continue and revisions |
|
336 | abort: can't specify --continue and revisions | |
337 | [255] |
|
337 | [255] | |
338 |
|
338 | |||
339 | $ hg graft -c -r 6 |
|
339 | $ hg graft -c -r 6 | |
340 | abort: can't specify --continue and revisions |
|
340 | abort: can't specify --continue and revisions | |
341 | [255] |
|
341 | [255] | |
342 |
|
342 | |||
343 | Continue for real, clobber usernames |
|
343 | Continue for real, clobber usernames | |
344 |
|
344 | |||
345 | $ hg graft -c -U |
|
345 | $ hg graft -c -U | |
346 | grafting 4:9c233e8e184d "4" |
|
346 | grafting 4:9c233e8e184d "4" | |
347 | grafting 3:4c60f11aa304 "3" |
|
347 | grafting 3:4c60f11aa304 "3" | |
348 |
|
348 | |||
349 | Compare with original: |
|
349 | Compare with original: | |
350 |
|
350 | |||
351 | $ hg diff -r 6 |
|
351 | $ hg diff -r 6 | |
352 | $ hg status --rev 0:. -C |
|
352 | $ hg status --rev 0:. -C | |
353 | M d |
|
353 | M d | |
354 | M e |
|
354 | M e | |
355 | A b |
|
355 | A b | |
356 | a |
|
356 | a | |
357 | A c |
|
357 | A c | |
358 | a |
|
358 | a | |
359 | R a |
|
359 | R a | |
360 |
|
360 | |||
361 | View graph: |
|
361 | View graph: | |
362 |
|
362 | |||
363 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
363 | $ hg log -G --template '{author}@{rev}.{phase}: {desc}\n' | |
364 | @ test@11.draft: 3 |
|
364 | @ test@11.draft: 3 | |
365 | | |
|
365 | | | |
366 | o test@10.draft: 4 |
|
366 | o test@10.draft: 4 | |
367 | | |
|
367 | | | |
368 | o test@9.draft: 5 |
|
368 | o test@9.draft: 5 | |
369 | | |
|
369 | | | |
370 | o bar@8.draft: 1 |
|
370 | o bar@8.draft: 1 | |
371 | | |
|
371 | | | |
372 | o foo@7.draft: 2 |
|
372 | o foo@7.draft: 2 | |
373 | | |
|
373 | | | |
374 | | o test@6.secret: 6 |
|
374 | | o test@6.secret: 6 | |
375 | | |\ |
|
375 | | |\ | |
376 | | | o test@5.draft: 5 |
|
376 | | | o test@5.draft: 5 | |
377 | | | | |
|
377 | | | | | |
378 | | o | test@4.draft: 4 |
|
378 | | o | test@4.draft: 4 | |
379 | | |/ |
|
379 | | |/ | |
380 | | o baz@3.public: 3 |
|
380 | | o baz@3.public: 3 | |
381 | | | |
|
381 | | | | |
382 | | o test@2.public: 2 |
|
382 | | o test@2.public: 2 | |
383 | | | |
|
383 | | | | |
384 | | o bar@1.public: 1 |
|
384 | | o bar@1.public: 1 | |
385 | |/ |
|
385 | |/ | |
386 | o test@0.public: 0 |
|
386 | o test@0.public: 0 | |
387 |
|
387 | |||
388 | Graft again onto another branch should preserve the original source |
|
388 | Graft again onto another branch should preserve the original source | |
389 | $ hg up -q 0 |
|
389 | $ hg up -q 0 | |
390 | $ echo 'g'>g |
|
390 | $ echo 'g'>g | |
391 | $ hg add g |
|
391 | $ hg add g | |
392 | $ hg ci -m 7 |
|
392 | $ hg ci -m 7 | |
393 | created new head |
|
393 | created new head | |
394 | $ hg graft 7 |
|
394 | $ hg graft 7 | |
395 | grafting 7:ef0ef43d49e7 "2" |
|
395 | grafting 7:ef0ef43d49e7 "2" | |
396 |
|
396 | |||
397 | $ hg log -r 7 --template '{rev}:{node}\n' |
|
397 | $ hg log -r 7 --template '{rev}:{node}\n' | |
398 | 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
398 | 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
399 | $ hg log -r 2 --template '{rev}:{node}\n' |
|
399 | $ hg log -r 2 --template '{rev}:{node}\n' | |
400 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
400 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
401 |
|
401 | |||
402 | $ hg log --debug -r tip |
|
402 | $ hg log --debug -r tip | |
403 | changeset: 13:7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
403 | changeset: 13:7a4785234d87ec1aa420ed6b11afe40fa73e12a9 | |
404 | tag: tip |
|
404 | tag: tip | |
405 | phase: draft |
|
405 | phase: draft | |
406 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
406 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f | |
407 | parent: -1:0000000000000000000000000000000000000000 |
|
407 | parent: -1:0000000000000000000000000000000000000000 | |
408 | manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637 |
|
408 | manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637 | |
409 | user: foo |
|
409 | user: foo | |
410 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
410 | date: Thu Jan 01 00:00:00 1970 +0000 | |
411 | files+: b |
|
411 | files+: b | |
412 | files-: a |
|
412 | files-: a | |
413 | extra: branch=default |
|
413 | extra: branch=default | |
414 | extra: intermediate-source=ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
414 | extra: intermediate-source=ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
415 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
415 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
416 | description: |
|
416 | description: | |
417 | 2 |
|
417 | 2 | |
418 |
|
418 | |||
419 |
|
419 | |||
420 | Disallow grafting an already grafted cset onto its original branch |
|
420 | Disallow grafting an already grafted cset onto its original branch | |
421 | $ hg up -q 6 |
|
421 | $ hg up -q 6 | |
422 | $ hg graft 7 |
|
422 | $ hg graft 7 | |
423 | skipping already grafted revision 7:ef0ef43d49e7 (was grafted from 2:5c095ad7e90f) |
|
423 | skipping already grafted revision 7:ef0ef43d49e7 (was grafted from 2:5c095ad7e90f) | |
424 | [255] |
|
424 | [255] | |
425 |
|
425 | |||
426 | $ hg pdiff --config extensions.extdiff= --patch -r 2 -r 13 |
|
426 | $ hg pdiff --config extensions.extdiff= --patch -r 2 -r 13 | |
427 | --- */hg-5c095ad7e90f.patch * (glob) |
|
427 | --- */hg-5c095ad7e90f.patch * (glob) | |
428 | +++ */hg-7a4785234d87.patch * (glob) |
|
428 | +++ */hg-7a4785234d87.patch * (glob) | |
429 | @@ -1,18 +1,18 @@ |
|
429 | @@ -1,18 +1,18 @@ | |
430 | # HG changeset patch |
|
430 | # HG changeset patch | |
431 | -# User test |
|
431 | -# User test | |
432 | +# User foo |
|
432 | +# User foo | |
433 | # Date 0 0 |
|
433 | # Date 0 0 | |
434 | # Thu Jan 01 00:00:00 1970 +0000 |
|
434 | # Thu Jan 01 00:00:00 1970 +0000 | |
435 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
435 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
436 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 |
|
436 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 | |
437 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
437 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 | |
438 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
438 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f | |
439 | 2 |
|
439 | 2 | |
440 |
|
440 | |||
441 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f a |
|
441 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f a | |
442 | +diff -r b592ea63bb0c -r 7a4785234d87 a |
|
442 | +diff -r b592ea63bb0c -r 7a4785234d87 a | |
443 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
443 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |
444 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
444 | +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
445 | @@ -1,1 +0,0 @@ |
|
445 | @@ -1,1 +0,0 @@ | |
446 | --b |
|
446 | --b | |
447 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f b |
|
447 | -diff -r 5d205f8b35b6 -r 5c095ad7e90f b | |
448 | +-a |
|
448 | +-a | |
449 | +diff -r b592ea63bb0c -r 7a4785234d87 b |
|
449 | +diff -r b592ea63bb0c -r 7a4785234d87 b | |
450 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
450 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
451 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
451 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 | |
452 | @@ -0,0 +1,1 @@ |
|
452 | @@ -0,0 +1,1 @@ | |
453 | -+b |
|
453 | -+b | |
454 | ++a |
|
454 | ++a | |
455 | [1] |
|
455 | [1] | |
456 |
|
456 | |||
457 | $ hg pdiff --config extensions.extdiff= --patch -r 2 -r 13 -X . |
|
457 | $ hg pdiff --config extensions.extdiff= --patch -r 2 -r 13 -X . | |
458 | --- */hg-5c095ad7e90f.patch * (glob) |
|
458 | --- */hg-5c095ad7e90f.patch * (glob) | |
459 | +++ */hg-7a4785234d87.patch * (glob) |
|
459 | +++ */hg-7a4785234d87.patch * (glob) | |
460 | @@ -1,8 +1,8 @@ |
|
460 | @@ -1,8 +1,8 @@ | |
461 | # HG changeset patch |
|
461 | # HG changeset patch | |
462 | -# User test |
|
462 | -# User test | |
463 | +# User foo |
|
463 | +# User foo | |
464 | # Date 0 0 |
|
464 | # Date 0 0 | |
465 | # Thu Jan 01 00:00:00 1970 +0000 |
|
465 | # Thu Jan 01 00:00:00 1970 +0000 | |
466 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
466 | -# Node ID 5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
467 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 |
|
467 | -# Parent 5d205f8b35b66bc36375c9534ffd3237730e8f04 | |
468 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
468 | +# Node ID 7a4785234d87ec1aa420ed6b11afe40fa73e12a9 | |
469 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
469 | +# Parent b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f | |
470 | 2 |
|
470 | 2 | |
471 |
|
471 | |||
472 | [1] |
|
472 | [1] | |
473 |
|
473 | |||
474 | Disallow grafting already grafted csets with the same origin onto each other |
|
474 | Disallow grafting already grafted csets with the same origin onto each other | |
475 | $ hg up -q 13 |
|
475 | $ hg up -q 13 | |
476 | $ hg graft 2 |
|
476 | $ hg graft 2 | |
477 | skipping revision 2:5c095ad7e90f (already grafted to 13:7a4785234d87) |
|
477 | skipping revision 2:5c095ad7e90f (already grafted to 13:7a4785234d87) | |
478 | [255] |
|
478 | [255] | |
479 | $ hg graft 7 |
|
479 | $ hg graft 7 | |
480 | skipping already grafted revision 7:ef0ef43d49e7 (13:7a4785234d87 also has origin 2:5c095ad7e90f) |
|
480 | skipping already grafted revision 7:ef0ef43d49e7 (13:7a4785234d87 also has origin 2:5c095ad7e90f) | |
481 | [255] |
|
481 | [255] | |
482 |
|
482 | |||
483 | $ hg up -q 7 |
|
483 | $ hg up -q 7 | |
484 | $ hg graft 2 |
|
484 | $ hg graft 2 | |
485 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) |
|
485 | skipping revision 2:5c095ad7e90f (already grafted to 7:ef0ef43d49e7) | |
486 | [255] |
|
486 | [255] | |
487 | $ hg graft tip |
|
487 | $ hg graft tip | |
488 | skipping already grafted revision 13:7a4785234d87 (7:ef0ef43d49e7 also has origin 2:5c095ad7e90f) |
|
488 | skipping already grafted revision 13:7a4785234d87 (7:ef0ef43d49e7 also has origin 2:5c095ad7e90f) | |
489 | [255] |
|
489 | [255] | |
490 |
|
490 | |||
491 | Graft with --log |
|
491 | Graft with --log | |
492 |
|
492 | |||
493 | $ hg up -Cq 1 |
|
493 | $ hg up -Cq 1 | |
494 | $ hg graft 3 --log -u foo |
|
494 | $ hg graft 3 --log -u foo | |
495 | grafting 3:4c60f11aa304 "3" |
|
495 | grafting 3:4c60f11aa304 "3" | |
496 | warning: can't find ancestor for 'c' copied from 'b'! |
|
496 | warning: can't find ancestor for 'c' copied from 'b'! | |
497 | $ hg log --template '{rev}:{node|short} {parents} {desc}\n' -r tip |
|
497 | $ hg log --template '{rev}:{node|short} {parents} {desc}\n' -r tip | |
498 | 14:0c921c65ef1e 1:5d205f8b35b6 3 |
|
498 | 14:0c921c65ef1e 1:5d205f8b35b6 3 | |
499 | (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) |
|
499 | (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8) | |
500 |
|
500 | |||
501 | Resolve conflicted graft |
|
501 | Resolve conflicted graft | |
502 | $ hg up -q 0 |
|
502 | $ hg up -q 0 | |
503 | $ echo b > a |
|
503 | $ echo b > a | |
504 | $ hg ci -m 8 |
|
504 | $ hg ci -m 8 | |
505 | created new head |
|
505 | created new head | |
506 | $ echo c > a |
|
506 | $ echo c > a | |
507 | $ hg ci -m 9 |
|
507 | $ hg ci -m 9 | |
508 | $ hg graft 1 --tool internal:fail |
|
508 | $ hg graft 1 --tool internal:fail | |
509 | grafting 1:5d205f8b35b6 "1" |
|
509 | grafting 1:5d205f8b35b6 "1" | |
510 | abort: unresolved conflicts, can't continue |
|
510 | abort: unresolved conflicts, can't continue | |
511 | (use 'hg resolve' and 'hg graft --continue') |
|
511 | (use 'hg resolve' and 'hg graft --continue') | |
512 | [255] |
|
512 | [255] | |
513 | $ hg resolve --all |
|
513 | $ hg resolve --all | |
514 | merging a |
|
514 | merging a | |
515 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
515 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
516 | [1] |
|
516 | [1] | |
517 | $ cat a |
|
517 | $ cat a | |
518 | <<<<<<< local: aaa4406d4f0a - test: 9 |
|
518 | <<<<<<< local: aaa4406d4f0a - test: 9 | |
519 | c |
|
519 | c | |
520 | ======= |
|
520 | ======= | |
521 | b |
|
521 | b | |
522 | >>>>>>> graft: 5d205f8b35b6 - bar: 1 |
|
522 | >>>>>>> graft: 5d205f8b35b6 - bar: 1 | |
523 | $ echo b > a |
|
523 | $ echo b > a | |
524 | $ hg resolve -m a |
|
524 | $ hg resolve -m a | |
525 | (no more unresolved files) |
|
525 | (no more unresolved files) | |
526 | continue: hg graft --continue |
|
526 | continue: hg graft --continue | |
527 | $ hg graft -c |
|
527 | $ hg graft -c | |
528 | grafting 1:5d205f8b35b6 "1" |
|
528 | grafting 1:5d205f8b35b6 "1" | |
529 | $ hg export tip --git |
|
529 | $ hg export tip --git | |
530 | # HG changeset patch |
|
530 | # HG changeset patch | |
531 | # User bar |
|
531 | # User bar | |
532 | # Date 0 0 |
|
532 | # Date 0 0 | |
533 | # Thu Jan 01 00:00:00 1970 +0000 |
|
533 | # Thu Jan 01 00:00:00 1970 +0000 | |
534 | # Node ID f67661df0c4804d301f064f332b57e7d5ddaf2be |
|
534 | # Node ID f67661df0c4804d301f064f332b57e7d5ddaf2be | |
535 | # Parent aaa4406d4f0ae9befd6e58c82ec63706460cbca6 |
|
535 | # Parent aaa4406d4f0ae9befd6e58c82ec63706460cbca6 | |
536 | 1 |
|
536 | 1 | |
537 |
|
537 | |||
538 | diff --git a/a b/a |
|
538 | diff --git a/a b/a | |
539 | --- a/a |
|
539 | --- a/a | |
540 | +++ b/a |
|
540 | +++ b/a | |
541 | @@ -1,1 +1,1 @@ |
|
541 | @@ -1,1 +1,1 @@ | |
542 | -c |
|
542 | -c | |
543 | +b |
|
543 | +b | |
544 |
|
544 | |||
545 | Resolve conflicted graft with rename |
|
545 | Resolve conflicted graft with rename | |
546 | $ echo c > a |
|
546 | $ echo c > a | |
547 | $ hg ci -m 10 |
|
547 | $ hg ci -m 10 | |
548 | $ hg graft 2 --tool internal:fail |
|
548 | $ hg graft 2 --tool internal:fail | |
549 | grafting 2:5c095ad7e90f "2" |
|
549 | grafting 2:5c095ad7e90f "2" | |
550 | abort: unresolved conflicts, can't continue |
|
550 | abort: unresolved conflicts, can't continue | |
551 | (use 'hg resolve' and 'hg graft --continue') |
|
551 | (use 'hg resolve' and 'hg graft --continue') | |
552 | [255] |
|
552 | [255] | |
553 | $ hg resolve --all |
|
553 | $ hg resolve --all | |
554 | merging a and b to b |
|
554 | merging a and b to b | |
555 | (no more unresolved files) |
|
555 | (no more unresolved files) | |
556 | continue: hg graft --continue |
|
556 | continue: hg graft --continue | |
557 | $ hg graft -c |
|
557 | $ hg graft -c | |
558 | grafting 2:5c095ad7e90f "2" |
|
558 | grafting 2:5c095ad7e90f "2" | |
559 | $ hg export tip --git |
|
559 | $ hg export tip --git | |
560 | # HG changeset patch |
|
560 | # HG changeset patch | |
561 | # User test |
|
561 | # User test | |
562 | # Date 0 0 |
|
562 | # Date 0 0 | |
563 | # Thu Jan 01 00:00:00 1970 +0000 |
|
563 | # Thu Jan 01 00:00:00 1970 +0000 | |
564 | # Node ID 9627f653b421c61fc1ea4c4e366745070fa3d2bc |
|
564 | # Node ID 9627f653b421c61fc1ea4c4e366745070fa3d2bc | |
565 | # Parent ee295f490a40b97f3d18dd4c4f1c8936c233b612 |
|
565 | # Parent ee295f490a40b97f3d18dd4c4f1c8936c233b612 | |
566 | 2 |
|
566 | 2 | |
567 |
|
567 | |||
568 | diff --git a/a b/b |
|
568 | diff --git a/a b/b | |
569 | rename from a |
|
569 | rename from a | |
570 | rename to b |
|
570 | rename to b | |
571 |
|
571 | |||
572 | Test simple origin(), with and without args |
|
572 | Test simple origin(), with and without args | |
573 | $ hg log -r 'origin()' |
|
573 | $ hg log -r 'origin()' | |
574 | changeset: 1:5d205f8b35b6 |
|
574 | changeset: 1:5d205f8b35b6 | |
575 | user: bar |
|
575 | user: bar | |
576 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
576 | date: Thu Jan 01 00:00:00 1970 +0000 | |
577 | summary: 1 |
|
577 | summary: 1 | |
578 |
|
578 | |||
579 | changeset: 2:5c095ad7e90f |
|
579 | changeset: 2:5c095ad7e90f | |
580 | user: test |
|
580 | user: test | |
581 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
581 | date: Thu Jan 01 00:00:00 1970 +0000 | |
582 | summary: 2 |
|
582 | summary: 2 | |
583 |
|
583 | |||
584 | changeset: 3:4c60f11aa304 |
|
584 | changeset: 3:4c60f11aa304 | |
585 | user: baz |
|
585 | user: baz | |
586 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
586 | date: Thu Jan 01 00:00:00 1970 +0000 | |
587 | summary: 3 |
|
587 | summary: 3 | |
588 |
|
588 | |||
589 | changeset: 4:9c233e8e184d |
|
589 | changeset: 4:9c233e8e184d | |
590 | user: test |
|
590 | user: test | |
591 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
591 | date: Thu Jan 01 00:00:00 1970 +0000 | |
592 | summary: 4 |
|
592 | summary: 4 | |
593 |
|
593 | |||
594 | changeset: 5:97f8bfe72746 |
|
594 | changeset: 5:97f8bfe72746 | |
595 | branch: stable |
|
595 | branch: stable | |
596 | parent: 3:4c60f11aa304 |
|
596 | parent: 3:4c60f11aa304 | |
597 | user: test |
|
597 | user: test | |
598 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
598 | date: Thu Jan 01 00:00:00 1970 +0000 | |
599 | summary: 5 |
|
599 | summary: 5 | |
600 |
|
600 | |||
601 | $ hg log -r 'origin(7)' |
|
601 | $ hg log -r 'origin(7)' | |
602 | changeset: 2:5c095ad7e90f |
|
602 | changeset: 2:5c095ad7e90f | |
603 | user: test |
|
603 | user: test | |
604 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
604 | date: Thu Jan 01 00:00:00 1970 +0000 | |
605 | summary: 2 |
|
605 | summary: 2 | |
606 |
|
606 | |||
607 | Now transplant a graft to test following through copies |
|
607 | Now transplant a graft to test following through copies | |
608 | $ hg up -q 0 |
|
608 | $ hg up -q 0 | |
609 | $ hg branch -q dev |
|
609 | $ hg branch -q dev | |
610 | $ hg ci -qm "dev branch" |
|
610 | $ hg ci -qm "dev branch" | |
611 | $ hg --config extensions.transplant= transplant -q 7 |
|
611 | $ hg --config extensions.transplant= transplant -q 7 | |
612 | $ hg log -r 'origin(.)' |
|
612 | $ hg log -r 'origin(.)' | |
613 | changeset: 2:5c095ad7e90f |
|
613 | changeset: 2:5c095ad7e90f | |
614 | user: test |
|
614 | user: test | |
615 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
615 | date: Thu Jan 01 00:00:00 1970 +0000 | |
616 | summary: 2 |
|
616 | summary: 2 | |
617 |
|
617 | |||
618 | Test that the graft and transplant markers in extra are converted, allowing |
|
618 | Test that the graft and transplant markers in extra are converted, allowing | |
619 | origin() to still work. Note that these recheck the immediately preceeding two |
|
619 | origin() to still work. Note that these recheck the immediately preceeding two | |
620 | tests. |
|
620 | tests. | |
621 | $ hg --quiet --config extensions.convert= --config convert.hg.saverev=True convert . ../converted |
|
621 | $ hg --quiet --config extensions.convert= --config convert.hg.saverev=True convert . ../converted | |
622 |
|
622 | |||
623 | The graft case |
|
623 | The graft case | |
624 | $ hg -R ../converted log -r 7 --template "{rev}: {node}\n{join(extras, '\n')}\n" |
|
624 | $ hg -R ../converted log -r 7 --template "{rev}: {node}\n{join(extras, '\n')}\n" | |
625 | 7: 7ae846e9111fc8f57745634250c7b9ac0a60689b |
|
625 | 7: 7ae846e9111fc8f57745634250c7b9ac0a60689b | |
626 | branch=default |
|
626 | branch=default | |
627 | convert_revision=ef0ef43d49e79e81ddafdc7997401ba0041efc82 |
|
627 | convert_revision=ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
628 | source=e0213322b2c1a5d5d236c74e79666441bee67a7d |
|
628 | source=e0213322b2c1a5d5d236c74e79666441bee67a7d | |
629 | $ hg -R ../converted log -r 'origin(7)' |
|
629 | $ hg -R ../converted log -r 'origin(7)' | |
630 | changeset: 2:e0213322b2c1 |
|
630 | changeset: 2:e0213322b2c1 | |
631 | user: test |
|
631 | user: test | |
632 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
632 | date: Thu Jan 01 00:00:00 1970 +0000 | |
633 | summary: 2 |
|
633 | summary: 2 | |
634 |
|
634 | |||
635 | Test that template correctly expands more than one 'extra' (issue4362), and that |
|
635 | Test that template correctly expands more than one 'extra' (issue4362), and that | |
636 | 'intermediate-source' is converted. |
|
636 | 'intermediate-source' is converted. | |
637 | $ hg -R ../converted log -r 13 --template "{extras % ' Extra: {extra}\n'}" |
|
637 | $ hg -R ../converted log -r 13 --template "{extras % ' Extra: {extra}\n'}" | |
638 | Extra: branch=default |
|
638 | Extra: branch=default | |
639 | Extra: convert_revision=7a4785234d87ec1aa420ed6b11afe40fa73e12a9 |
|
639 | Extra: convert_revision=7a4785234d87ec1aa420ed6b11afe40fa73e12a9 | |
640 | Extra: intermediate-source=7ae846e9111fc8f57745634250c7b9ac0a60689b |
|
640 | Extra: intermediate-source=7ae846e9111fc8f57745634250c7b9ac0a60689b | |
641 | Extra: source=e0213322b2c1a5d5d236c74e79666441bee67a7d |
|
641 | Extra: source=e0213322b2c1a5d5d236c74e79666441bee67a7d | |
642 |
|
642 | |||
643 | The transplant case |
|
643 | The transplant case | |
644 | $ hg -R ../converted log -r tip --template "{rev}: {node}\n{join(extras, '\n')}\n" |
|
644 | $ hg -R ../converted log -r tip --template "{rev}: {node}\n{join(extras, '\n')}\n" | |
645 | 21: fbb6c5cc81002f2b4b49c9d731404688bcae5ade |
|
645 | 21: fbb6c5cc81002f2b4b49c9d731404688bcae5ade | |
646 | branch=dev |
|
646 | branch=dev | |
647 | convert_revision=7e61b508e709a11d28194a5359bc3532d910af21 |
|
647 | convert_revision=7e61b508e709a11d28194a5359bc3532d910af21 | |
648 | transplant_source=z\xe8F\xe9\x11\x1f\xc8\xf5wEcBP\xc7\xb9\xac\n`h\x9b |
|
648 | transplant_source=z\xe8F\xe9\x11\x1f\xc8\xf5wEcBP\xc7\xb9\xac\n`h\x9b | |
649 | $ hg -R ../converted log -r 'origin(tip)' |
|
649 | $ hg -R ../converted log -r 'origin(tip)' | |
650 | changeset: 2:e0213322b2c1 |
|
650 | changeset: 2:e0213322b2c1 | |
651 | user: test |
|
651 | user: test | |
652 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
652 | date: Thu Jan 01 00:00:00 1970 +0000 | |
653 | summary: 2 |
|
653 | summary: 2 | |
654 |
|
654 | |||
655 |
|
655 | |||
656 | Test simple destination |
|
656 | Test simple destination | |
657 | $ hg log -r 'destination()' |
|
657 | $ hg log -r 'destination()' | |
658 | changeset: 7:ef0ef43d49e7 |
|
658 | changeset: 7:ef0ef43d49e7 | |
659 | parent: 0:68795b066622 |
|
659 | parent: 0:68795b066622 | |
660 | user: foo |
|
660 | user: foo | |
661 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
661 | date: Thu Jan 01 00:00:00 1970 +0000 | |
662 | summary: 2 |
|
662 | summary: 2 | |
663 |
|
663 | |||
664 | changeset: 8:6b9e5368ca4e |
|
664 | changeset: 8:6b9e5368ca4e | |
665 | user: bar |
|
665 | user: bar | |
666 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
666 | date: Thu Jan 01 00:00:00 1970 +0000 | |
667 | summary: 1 |
|
667 | summary: 1 | |
668 |
|
668 | |||
669 | changeset: 9:1905859650ec |
|
669 | changeset: 9:1905859650ec | |
670 | user: test |
|
670 | user: test | |
671 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
671 | date: Thu Jan 01 00:00:00 1970 +0000 | |
672 | summary: 5 |
|
672 | summary: 5 | |
673 |
|
673 | |||
674 | changeset: 10:52dc0b4c6907 |
|
674 | changeset: 10:52dc0b4c6907 | |
675 | user: test |
|
675 | user: test | |
676 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
676 | date: Thu Jan 01 00:00:00 1970 +0000 | |
677 | summary: 4 |
|
677 | summary: 4 | |
678 |
|
678 | |||
679 | changeset: 11:882b35362a6b |
|
679 | changeset: 11:882b35362a6b | |
680 | user: test |
|
680 | user: test | |
681 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
681 | date: Thu Jan 01 00:00:00 1970 +0000 | |
682 | summary: 3 |
|
682 | summary: 3 | |
683 |
|
683 | |||
684 | changeset: 13:7a4785234d87 |
|
684 | changeset: 13:7a4785234d87 | |
685 | user: foo |
|
685 | user: foo | |
686 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
686 | date: Thu Jan 01 00:00:00 1970 +0000 | |
687 | summary: 2 |
|
687 | summary: 2 | |
688 |
|
688 | |||
689 | changeset: 14:0c921c65ef1e |
|
689 | changeset: 14:0c921c65ef1e | |
690 | parent: 1:5d205f8b35b6 |
|
690 | parent: 1:5d205f8b35b6 | |
691 | user: foo |
|
691 | user: foo | |
692 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
692 | date: Thu Jan 01 00:00:00 1970 +0000 | |
693 | summary: 3 |
|
693 | summary: 3 | |
694 |
|
694 | |||
695 | changeset: 17:f67661df0c48 |
|
695 | changeset: 17:f67661df0c48 | |
696 | user: bar |
|
696 | user: bar | |
697 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
697 | date: Thu Jan 01 00:00:00 1970 +0000 | |
698 | summary: 1 |
|
698 | summary: 1 | |
699 |
|
699 | |||
700 | changeset: 19:9627f653b421 |
|
700 | changeset: 19:9627f653b421 | |
701 | user: test |
|
701 | user: test | |
702 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
702 | date: Thu Jan 01 00:00:00 1970 +0000 | |
703 | summary: 2 |
|
703 | summary: 2 | |
704 |
|
704 | |||
705 | changeset: 21:7e61b508e709 |
|
705 | changeset: 21:7e61b508e709 | |
706 | branch: dev |
|
706 | branch: dev | |
707 | tag: tip |
|
707 | tag: tip | |
708 | user: foo |
|
708 | user: foo | |
709 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
709 | date: Thu Jan 01 00:00:00 1970 +0000 | |
710 | summary: 2 |
|
710 | summary: 2 | |
711 |
|
711 | |||
712 | $ hg log -r 'destination(2)' |
|
712 | $ hg log -r 'destination(2)' | |
713 | changeset: 7:ef0ef43d49e7 |
|
713 | changeset: 7:ef0ef43d49e7 | |
714 | parent: 0:68795b066622 |
|
714 | parent: 0:68795b066622 | |
715 | user: foo |
|
715 | user: foo | |
716 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
716 | date: Thu Jan 01 00:00:00 1970 +0000 | |
717 | summary: 2 |
|
717 | summary: 2 | |
718 |
|
718 | |||
719 | changeset: 13:7a4785234d87 |
|
719 | changeset: 13:7a4785234d87 | |
720 | user: foo |
|
720 | user: foo | |
721 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
721 | date: Thu Jan 01 00:00:00 1970 +0000 | |
722 | summary: 2 |
|
722 | summary: 2 | |
723 |
|
723 | |||
724 | changeset: 19:9627f653b421 |
|
724 | changeset: 19:9627f653b421 | |
725 | user: test |
|
725 | user: test | |
726 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
726 | date: Thu Jan 01 00:00:00 1970 +0000 | |
727 | summary: 2 |
|
727 | summary: 2 | |
728 |
|
728 | |||
729 | changeset: 21:7e61b508e709 |
|
729 | changeset: 21:7e61b508e709 | |
730 | branch: dev |
|
730 | branch: dev | |
731 | tag: tip |
|
731 | tag: tip | |
732 | user: foo |
|
732 | user: foo | |
733 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
733 | date: Thu Jan 01 00:00:00 1970 +0000 | |
734 | summary: 2 |
|
734 | summary: 2 | |
735 |
|
735 | |||
736 | Transplants of grafts can find a destination... |
|
736 | Transplants of grafts can find a destination... | |
737 | $ hg log -r 'destination(7)' |
|
737 | $ hg log -r 'destination(7)' | |
738 | changeset: 21:7e61b508e709 |
|
738 | changeset: 21:7e61b508e709 | |
739 | branch: dev |
|
739 | branch: dev | |
740 | tag: tip |
|
740 | tag: tip | |
741 | user: foo |
|
741 | user: foo | |
742 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
742 | date: Thu Jan 01 00:00:00 1970 +0000 | |
743 | summary: 2 |
|
743 | summary: 2 | |
744 |
|
744 | |||
745 | ... grafts of grafts unfortunately can't |
|
745 | ... grafts of grafts unfortunately can't | |
746 | $ hg graft -q 13 --debug |
|
746 | $ hg graft -q 13 --debug | |
747 | scanning for duplicate grafts |
|
747 | scanning for duplicate grafts | |
748 | grafting 13:7a4785234d87 "2" |
|
748 | grafting 13:7a4785234d87 "2" | |
749 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): |
|
749 | all copies found (* = to merge, ! = divergent, % = renamed and deleted): | |
750 | src: 'a' -> dst: 'b' * |
|
750 | src: 'a' -> dst: 'b' * | |
751 | checking for directory renames |
|
751 | checking for directory renames | |
752 | resolving manifests |
|
752 | resolving manifests | |
753 | branchmerge: True, force: True, partial: False |
|
753 | branchmerge: True, force: True, partial: False | |
754 | ancestor: b592ea63bb0c, local: 7e61b508e709+, remote: 7a4785234d87 |
|
754 | ancestor: b592ea63bb0c, local: 7e61b508e709+, remote: 7a4785234d87 | |
755 | starting 4 threads for background file closing (?) |
|
755 | starting 4 threads for background file closing (?) | |
756 | committing files: |
|
756 | committing files: | |
757 | b |
|
757 | b | |
758 | warning: can't find ancestor for 'b' copied from 'a'! |
|
758 | warning: can't find ancestor for 'b' copied from 'a'! | |
759 | reusing manifest from p1 (listed files actually unchanged) |
|
759 | reusing manifest from p1 (listed files actually unchanged) | |
760 | committing changelog |
|
760 | committing changelog | |
761 | updating the branch cache |
|
761 | updating the branch cache | |
762 | $ hg log -r 'destination(13)' |
|
762 | $ hg log -r 'destination(13)' | |
763 | All copies of a cset |
|
763 | All copies of a cset | |
764 | $ hg log -r 'origin(13) or destination(origin(13))' |
|
764 | $ hg log -r 'origin(13) or destination(origin(13))' | |
765 | changeset: 2:5c095ad7e90f |
|
765 | changeset: 2:5c095ad7e90f | |
766 | user: test |
|
766 | user: test | |
767 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
767 | date: Thu Jan 01 00:00:00 1970 +0000 | |
768 | summary: 2 |
|
768 | summary: 2 | |
769 |
|
769 | |||
770 | changeset: 7:ef0ef43d49e7 |
|
770 | changeset: 7:ef0ef43d49e7 | |
771 | parent: 0:68795b066622 |
|
771 | parent: 0:68795b066622 | |
772 | user: foo |
|
772 | user: foo | |
773 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
773 | date: Thu Jan 01 00:00:00 1970 +0000 | |
774 | summary: 2 |
|
774 | summary: 2 | |
775 |
|
775 | |||
776 | changeset: 13:7a4785234d87 |
|
776 | changeset: 13:7a4785234d87 | |
777 | user: foo |
|
777 | user: foo | |
778 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
778 | date: Thu Jan 01 00:00:00 1970 +0000 | |
779 | summary: 2 |
|
779 | summary: 2 | |
780 |
|
780 | |||
781 | changeset: 19:9627f653b421 |
|
781 | changeset: 19:9627f653b421 | |
782 | user: test |
|
782 | user: test | |
783 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
783 | date: Thu Jan 01 00:00:00 1970 +0000 | |
784 | summary: 2 |
|
784 | summary: 2 | |
785 |
|
785 | |||
786 | changeset: 21:7e61b508e709 |
|
786 | changeset: 21:7e61b508e709 | |
787 | branch: dev |
|
787 | branch: dev | |
788 | user: foo |
|
788 | user: foo | |
789 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
789 | date: Thu Jan 01 00:00:00 1970 +0000 | |
790 | summary: 2 |
|
790 | summary: 2 | |
791 |
|
791 | |||
792 | changeset: 22:3a4e92d81b97 |
|
792 | changeset: 22:3a4e92d81b97 | |
793 | branch: dev |
|
793 | branch: dev | |
794 | tag: tip |
|
794 | tag: tip | |
795 | user: foo |
|
795 | user: foo | |
796 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
796 | date: Thu Jan 01 00:00:00 1970 +0000 | |
797 | summary: 2 |
|
797 | summary: 2 | |
798 |
|
798 | |||
799 |
|
799 | |||
800 | graft works on complex revset |
|
800 | graft skips ancestors | |
801 |
|
801 | |||
802 | $ hg graft 'origin(13) or destination(origin(13))' |
|
802 | $ hg graft 21 3 | |
803 | skipping ancestor revision 21:7e61b508e709 |
|
803 | skipping ancestor revision 21:7e61b508e709 | |
804 | skipping ancestor revision 22:3a4e92d81b97 |
|
804 | grafting 3:4c60f11aa304 "3" | |
805 | skipping revision 2:5c095ad7e90f (already grafted to 22:3a4e92d81b97) |
|
805 | merging b and c to c | |
806 | grafting 7:ef0ef43d49e7 "2" |
|
|||
807 | warning: can't find ancestor for 'b' copied from 'a'! |
|
|||
808 | grafting 13:7a4785234d87 "2" |
|
|||
809 | warning: can't find ancestor for 'b' copied from 'a'! |
|
|||
810 | grafting 19:9627f653b421 "2" |
|
|||
811 | merging b |
|
|||
812 | warning: can't find ancestor for 'b' copied from 'a'! |
|
|||
813 |
|
806 | |||
814 |
graft |
|
807 | graft with --force (still doesn't graft merges) | |
815 |
|
808 | |||
816 | $ hg graft 19 0 6 |
|
809 | $ hg graft 19 0 6 | |
817 | skipping ungraftable merge revision 6 |
|
810 | skipping ungraftable merge revision 6 | |
818 | skipping ancestor revision 0:68795b066622 |
|
811 | skipping ancestor revision 0:68795b066622 | |
819 | skipping already grafted revision 19:9627f653b421 (22:3a4e92d81b97 also has origin 2:5c095ad7e90f) |
|
812 | skipping already grafted revision 19:9627f653b421 (22:3a4e92d81b97 also has origin 2:5c095ad7e90f) | |
820 | [255] |
|
813 | [255] | |
821 | $ hg graft 19 0 6 --force |
|
814 | $ hg graft 19 0 6 --force | |
822 | skipping ungraftable merge revision 6 |
|
815 | skipping ungraftable merge revision 6 | |
823 | grafting 19:9627f653b421 "2" |
|
816 | grafting 19:9627f653b421 "2" | |
824 | merging b |
|
817 | merging b | |
825 |
warning: can't find ancestor for 'b' copied from 'a'! |
|
818 | warning: can't find ancestor for 'b' copied from 'a'! | |
826 | grafting 0:68795b066622 "0" |
|
819 | grafting 0:68795b066622 "0" | |
827 |
|
820 | |||
828 | graft --force after backout |
|
821 | graft --force after backout | |
829 |
|
822 | |||
830 | $ echo abc > a |
|
823 | $ echo abc > a | |
831 |
$ hg ci -m 2 |
|
824 | $ hg ci -m 26 | |
832 |
$ hg backout 2 |
|
825 | $ hg backout 26 | |
833 | reverting a |
|
826 | reverting a | |
834 |
changeset 2 |
|
827 | changeset 27:e25e17192dc4 backs out changeset 26:44f862488a35 | |
835 |
$ hg graft 2 |
|
828 | $ hg graft 26 | |
836 |
skipping ancestor revision 2 |
|
829 | skipping ancestor revision 26:44f862488a35 | |
837 | [255] |
|
830 | [255] | |
838 |
$ hg graft 2 |
|
831 | $ hg graft 26 --force | |
839 |
grafting 2 |
|
832 | grafting 26:44f862488a35 "26" | |
840 | merging a |
|
833 | merging a | |
841 | $ cat a |
|
834 | $ cat a | |
842 | abc |
|
835 | abc | |
843 |
|
836 | |||
844 | graft --continue after --force |
|
837 | graft --continue after --force | |
845 |
|
838 | |||
846 | $ echo def > a |
|
839 | $ echo def > a | |
847 |
$ hg ci -m |
|
840 | $ hg ci -m 29 | |
848 |
$ hg graft 2 |
|
841 | $ hg graft 26 --force --tool internal:fail | |
849 |
grafting 2 |
|
842 | grafting 26:44f862488a35 "26" | |
850 |
|
|
843 | abort: unresolved conflicts, can't continue | |
851 |
(use 'hg |
|
844 | (use 'hg resolve' and 'hg graft --continue') | |
852 | [255] |
|
845 | [255] | |
853 | $ hg resolve --all |
|
846 | $ hg resolve --all | |
854 | merging a |
|
847 | merging a | |
855 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
848 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
856 | [1] |
|
849 | [1] | |
857 | $ echo abc > a |
|
850 | $ echo abc > a | |
858 | $ hg resolve -m a |
|
851 | $ hg resolve -m a | |
859 | (no more unresolved files) |
|
852 | (no more unresolved files) | |
860 | continue: hg graft --continue |
|
853 | continue: hg graft --continue | |
861 | $ hg graft -c |
|
854 | $ hg graft -c | |
862 |
grafting 2 |
|
855 | grafting 26:44f862488a35 "26" | |
863 | $ cat a |
|
856 | $ cat a | |
864 | abc |
|
857 | abc | |
865 |
|
858 | |||
866 | Continue testing same origin policy, using revision numbers from test above |
|
859 | Continue testing same origin policy, using revision numbers from test above | |
867 | but do some destructive editing of the repo: |
|
860 | but do some destructive editing of the repo: | |
868 |
|
861 | |||
869 | $ hg up -qC 7 |
|
862 | $ hg up -qC 7 | |
870 | $ hg tag -l -r 13 tmp |
|
863 | $ hg tag -l -r 13 tmp | |
871 | $ hg --config extensions.strip= strip 2 |
|
864 | $ hg --config extensions.strip= strip 2 | |
872 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/5c095ad7e90f-d323a1e4-backup.hg |
|
865 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/5c095ad7e90f-d323a1e4-backup.hg | |
873 | $ hg graft tmp |
|
866 | $ hg graft tmp | |
874 | skipping already grafted revision 8:7a4785234d87 (2:ef0ef43d49e7 also has unknown origin 5c095ad7e90f) |
|
867 | skipping already grafted revision 8:7a4785234d87 (2:ef0ef43d49e7 also has unknown origin 5c095ad7e90f) | |
875 | [255] |
|
868 | [255] | |
876 |
|
869 | |||
877 | Empty graft |
|
870 | Empty graft | |
878 |
|
871 | |||
879 |
$ hg up -qr 2 |
|
872 | $ hg up -qr 24 | |
880 | $ hg tag -f something |
|
873 | $ hg tag -f something | |
881 |
$ hg graft -qr 2 |
|
874 | $ hg graft -qr 25 | |
882 |
$ hg graft -f 2 |
|
875 | $ hg graft -f 25 | |
883 |
grafting 2 |
|
876 | grafting 25:bd0c98709948 "26" | |
884 |
note: graft of 2 |
|
877 | note: graft of 25:bd0c98709948 created no changes to commit | |
885 |
|
878 | |||
886 | $ cd .. |
|
879 | $ cd .. | |
887 |
|
880 | |||
888 | Graft to duplicate a commit |
|
881 | Graft to duplicate a commit | |
889 |
|
882 | |||
890 | $ hg init graftsibling |
|
883 | $ hg init graftsibling | |
891 | $ cd graftsibling |
|
884 | $ cd graftsibling | |
892 | $ touch a |
|
885 | $ touch a | |
893 | $ hg commit -qAm a |
|
886 | $ hg commit -qAm a | |
894 | $ touch b |
|
887 | $ touch b | |
895 | $ hg commit -qAm b |
|
888 | $ hg commit -qAm b | |
896 | $ hg log -G -T '{rev}\n' |
|
889 | $ hg log -G -T '{rev}\n' | |
897 | @ 1 |
|
890 | @ 1 | |
898 | | |
|
891 | | | |
899 | o 0 |
|
892 | o 0 | |
900 |
|
893 | |||
901 | $ hg up -q 0 |
|
894 | $ hg up -q 0 | |
902 | $ hg graft -r 1 |
|
895 | $ hg graft -r 1 | |
903 | grafting 1:0e067c57feba "b" (tip) |
|
896 | grafting 1:0e067c57feba "b" (tip) | |
904 | $ hg log -G -T '{rev}\n' |
|
897 | $ hg log -G -T '{rev}\n' | |
905 | @ 2 |
|
898 | @ 2 | |
906 | | |
|
899 | | | |
907 | | o 1 |
|
900 | | o 1 | |
908 | |/ |
|
901 | |/ | |
909 | o 0 |
|
902 | o 0 | |
910 |
|
903 | |||
911 | Graft to duplicate a commit twice |
|
904 | Graft to duplicate a commit twice | |
912 |
|
905 | |||
913 | $ hg up -q 0 |
|
906 | $ hg up -q 0 | |
914 | $ hg graft -r 2 |
|
907 | $ hg graft -r 2 | |
915 | grafting 2:044ec77f6389 "b" (tip) |
|
908 | grafting 2:044ec77f6389 "b" (tip) | |
916 | $ hg log -G -T '{rev}\n' |
|
909 | $ hg log -G -T '{rev}\n' | |
917 | @ 3 |
|
910 | @ 3 | |
918 | | |
|
911 | | | |
919 | | o 2 |
|
912 | | o 2 | |
920 | |/ |
|
913 | |/ | |
921 | | o 1 |
|
914 | | o 1 | |
922 | |/ |
|
915 | |/ | |
923 | o 0 |
|
916 | o 0 | |
924 |
|
917 |
General Comments 0
You need to be logged in to leave comments.
Login now