Show More
@@ -1,257 +1,257 b'' | |||||
1 | Create a repo with some stuff in it: |
|
1 | Create a repo with some stuff in it: | |
2 |
|
2 | |||
3 | $ hg init a |
|
3 | $ hg init a | |
4 | $ cd a |
|
4 | $ cd a | |
5 | $ echo a > a |
|
5 | $ echo a > a | |
6 | $ echo a > d |
|
6 | $ echo a > d | |
7 | $ echo a > e |
|
7 | $ echo a > e | |
8 | $ hg ci -qAm0 |
|
8 | $ hg ci -qAm0 | |
9 | $ echo b > a |
|
9 | $ echo b > a | |
10 | $ hg ci -m1 -u bar |
|
10 | $ hg ci -m1 -u bar | |
11 | $ hg mv a b |
|
11 | $ hg mv a b | |
12 | $ hg ci -m2 |
|
12 | $ hg ci -m2 | |
13 | $ hg cp b c |
|
13 | $ hg cp b c | |
14 | $ hg ci -m3 -u baz |
|
14 | $ hg ci -m3 -u baz | |
15 | $ echo b > d |
|
15 | $ echo b > d | |
16 | $ echo f > e |
|
16 | $ echo f > e | |
17 | $ hg ci -m4 |
|
17 | $ hg ci -m4 | |
18 | $ hg up -q 3 |
|
18 | $ hg up -q 3 | |
19 | $ echo b > e |
|
19 | $ echo b > e | |
20 | $ hg branch -q stable |
|
20 | $ hg branch -q stable | |
21 | $ hg ci -m5 |
|
21 | $ hg ci -m5 | |
22 | $ hg merge -q default --tool internal:local |
|
22 | $ hg merge -q default --tool internal:local | |
23 | $ hg branch -q default |
|
23 | $ hg branch -q default | |
24 | $ hg ci -m6 |
|
24 | $ hg ci -m6 | |
25 |
|
25 | |||
26 | Need to specify a rev: |
|
26 | Need to specify a rev: | |
27 |
|
27 | |||
28 | $ hg graft |
|
28 | $ hg graft | |
29 | abort: no revisions specified |
|
29 | abort: no revisions specified | |
30 | [255] |
|
30 | [255] | |
31 |
|
31 | |||
32 | Can't graft ancestor: |
|
32 | Can't graft ancestor: | |
33 |
|
33 | |||
34 | $ hg graft 1 2 |
|
34 | $ hg graft 1 2 | |
35 | skipping ancestor revision 1 |
|
35 | skipping ancestor revision 1 | |
36 | skipping ancestor revision 2 |
|
36 | skipping ancestor revision 2 | |
37 | [255] |
|
37 | [255] | |
38 |
|
38 | |||
39 | Can't graft with dirty wd: |
|
39 | Can't graft with dirty wd: | |
40 |
|
40 | |||
41 | $ hg up -q 0 |
|
41 | $ hg up -q 0 | |
42 | $ echo foo > a |
|
42 | $ echo foo > a | |
43 | $ hg graft 1 |
|
43 | $ hg graft 1 | |
44 | abort: outstanding uncommitted changes |
|
44 | abort: outstanding uncommitted changes | |
45 | [255] |
|
45 | [255] | |
46 | $ hg revert a |
|
46 | $ hg revert a | |
47 |
|
47 | |||
48 | Graft a rename: |
|
48 | Graft a rename: | |
49 |
|
49 | |||
50 | $ hg graft 2 -u foo |
|
50 | $ hg graft 2 -u foo | |
51 | grafting revision 2 |
|
51 | grafting revision 2 | |
52 | merging a and b to b |
|
52 | merging a and b to b | |
53 | $ hg export tip --git |
|
53 | $ hg export tip --git | |
54 | # HG changeset patch |
|
54 | # HG changeset patch | |
55 | # User foo |
|
55 | # User foo | |
56 | # Date 0 0 |
|
56 | # Date 0 0 | |
57 | # Node ID d2e44c99fd3f31c176ea4efb9eca9f6306c81756 |
|
57 | # Node ID d2e44c99fd3f31c176ea4efb9eca9f6306c81756 | |
58 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e |
|
58 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e | |
59 | 2 |
|
59 | 2 | |
60 |
|
60 | |||
61 | diff --git a/a b/b |
|
61 | diff --git a/a b/b | |
62 | rename from a |
|
62 | rename from a | |
63 | rename to b |
|
63 | rename to b | |
64 | --- a/a |
|
64 | --- a/a | |
65 | +++ b/b |
|
65 | +++ b/b | |
66 | @@ -1,1 +1,1 @@ |
|
66 | @@ -1,1 +1,1 @@ | |
67 | -a |
|
67 | -a | |
68 | +b |
|
68 | +b | |
69 |
|
69 | |||
70 | Look for extra:source |
|
70 | Look for extra:source | |
71 |
|
71 | |||
72 | $ hg log --debug -r tip |
|
72 | $ hg log --debug -r tip | |
73 | changeset: 7:d2e44c99fd3f31c176ea4efb9eca9f6306c81756 |
|
73 | changeset: 7:d2e44c99fd3f31c176ea4efb9eca9f6306c81756 | |
74 | tag: tip |
|
74 | tag: tip | |
75 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e |
|
75 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e | |
76 | parent: -1:0000000000000000000000000000000000000000 |
|
76 | parent: -1:0000000000000000000000000000000000000000 | |
77 | manifest: 7:5d59766436fd8fbcd38e7bebef0f6eaf3eebe637 |
|
77 | manifest: 7:5d59766436fd8fbcd38e7bebef0f6eaf3eebe637 | |
78 | user: foo |
|
78 | user: foo | |
79 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
79 | date: Thu Jan 01 00:00:00 1970 +0000 | |
80 | files+: b |
|
80 | files+: b | |
81 | files-: a |
|
81 | files-: a | |
82 | extra: branch=default |
|
82 | extra: branch=default | |
83 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
83 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
84 | description: |
|
84 | description: | |
85 | 2 |
|
85 | 2 | |
86 |
|
86 | |||
87 |
|
87 | |||
88 |
|
88 | |||
89 | Graft out of order, skipping a merge and a duplicate |
|
89 | Graft out of order, skipping a merge and a duplicate | |
90 |
|
90 | |||
91 | $ hg graft 1 5 4 3 'merge()' 2 --debug |
|
91 | $ hg graft 1 5 4 3 'merge()' 2 --debug | |
92 | skipping ungraftable merge revision 6 |
|
92 | skipping ungraftable merge revision 6 | |
93 | scanning for duplicate grafts |
|
93 | scanning for duplicate grafts | |
94 | skipping already grafted revision 2 |
|
94 | skipping already grafted revision 2 | |
95 | grafting revision 1 |
|
95 | grafting revision 1 | |
96 | searching for copies back to rev 1 |
|
96 | searching for copies back to rev 1 | |
97 | unmatched files in local: |
|
97 | unmatched files in local: | |
98 | a.orig |
|
98 | a.orig | |
99 | b |
|
99 | b | |
100 | all copies found (* = to merge, ! = divergent): |
|
100 | all copies found (* = to merge, ! = divergent): | |
101 | b -> a * |
|
101 | b -> a * | |
102 | checking for directory renames |
|
102 | checking for directory renames | |
103 | resolving manifests |
|
103 | resolving manifests | |
104 | overwrite False partial False |
|
104 | overwrite False partial False | |
105 | ancestor 68795b066622 local d2e44c99fd3f+ remote 5d205f8b35b6 |
|
105 | ancestor 68795b066622 local d2e44c99fd3f+ remote 5d205f8b35b6 | |
106 | b: local copied/moved to a -> m |
|
106 | b: local copied/moved to a -> m | |
107 | preserving b for resolve of b |
|
107 | preserving b for resolve of b | |
108 | updating: b 1/1 files (100.00%) |
|
108 | updating: b 1/1 files (100.00%) | |
109 | searching for copies back to rev 1 |
|
109 | searching for copies back to rev 1 | |
110 | unmatched files in local: |
|
110 | unmatched files in local: | |
111 | a |
|
111 | a | |
112 | unmatched files in other: |
|
112 | unmatched files in other: | |
113 | b |
|
113 | b | |
114 | all copies found (* = to merge, ! = divergent): |
|
114 | all copies found (* = to merge, ! = divergent): | |
115 | b -> a * |
|
115 | b -> a * | |
116 | checking for directory renames |
|
116 | checking for directory renames | |
117 | b |
|
117 | b | |
118 | b: searching for copy revision for a |
|
118 | b: searching for copy revision for a | |
119 | b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
119 | b: copy a:b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 | |
120 | grafting revision 5 |
|
120 | grafting revision 5 | |
121 | searching for copies back to rev 1 |
|
121 | searching for copies back to rev 1 | |
122 | unmatched files in local: |
|
122 | unmatched files in local: | |
123 | a.orig |
|
123 | a.orig | |
124 | resolving manifests |
|
124 | resolving manifests | |
125 | overwrite False partial False |
|
125 | overwrite False partial False | |
126 | ancestor 4c60f11aa304 local 6f5ea6ac8b70+ remote 97f8bfe72746 |
|
126 | ancestor 4c60f11aa304 local 6f5ea6ac8b70+ remote 97f8bfe72746 | |
127 | e: remote is newer -> g |
|
127 | e: remote is newer -> g | |
128 | updating: e 1/1 files (100.00%) |
|
128 | updating: e 1/1 files (100.00%) | |
129 | getting e |
|
129 | getting e | |
130 | searching for copies back to rev 1 |
|
130 | searching for copies back to rev 1 | |
131 | unmatched files in local: |
|
131 | unmatched files in local: | |
132 | c |
|
132 | c | |
133 | all copies found (* = to merge, ! = divergent): |
|
133 | all copies found (* = to merge, ! = divergent): | |
134 | c -> b * |
|
134 | c -> b * | |
135 | checking for directory renames |
|
135 | checking for directory renames | |
136 | e |
|
136 | e | |
137 | grafting revision 4 |
|
137 | grafting revision 4 | |
138 | searching for copies back to rev 1 |
|
138 | searching for copies back to rev 1 | |
139 | unmatched files in local: |
|
139 | unmatched files in local: | |
140 | a.orig |
|
140 | a.orig | |
141 | resolving manifests |
|
141 | resolving manifests | |
142 | overwrite False partial False |
|
142 | overwrite False partial False | |
143 | ancestor 4c60f11aa304 local 77eb504366ab+ remote 9c233e8e184d |
|
143 | ancestor 4c60f11aa304 local 77eb504366ab+ remote 9c233e8e184d | |
144 | e: versions differ -> m |
|
144 | e: versions differ -> m | |
145 | d: remote is newer -> g |
|
145 | d: remote is newer -> g | |
146 | preserving e for resolve of e |
|
146 | preserving e for resolve of e | |
147 | updating: d 1/2 files (50.00%) |
|
147 | updating: d 1/2 files (50.00%) | |
148 | getting d |
|
148 | getting d | |
149 | updating: e 2/2 files (100.00%) |
|
149 | updating: e 2/2 files (100.00%) | |
150 | picked tool 'internal:merge' for e (binary False symlink False) |
|
150 | picked tool 'internal:merge' for e (binary False symlink False) | |
151 | merging e |
|
151 | merging e | |
152 | my e@77eb504366ab+ other e@9c233e8e184d ancestor e@68795b066622 |
|
152 | my e@77eb504366ab+ other e@9c233e8e184d ancestor e@68795b066622 | |
153 | warning: conflicts during merge. |
|
153 | warning: conflicts during merge. | |
154 | merging e failed! |
|
154 | merging e failed! | |
155 | searching for copies back to rev 1 |
|
155 | searching for copies back to rev 1 | |
156 | unmatched files in local: |
|
156 | unmatched files in local: | |
157 | c |
|
157 | c | |
158 | all copies found (* = to merge, ! = divergent): |
|
158 | all copies found (* = to merge, ! = divergent): | |
159 | c -> b * |
|
159 | c -> b * | |
160 | checking for directory renames |
|
160 | checking for directory renames | |
161 | abort: unresolved conflicts, can't continue |
|
161 | abort: unresolved conflicts, can't continue | |
162 | (use hg resolve and hg graft --continue) |
|
162 | (use hg resolve and hg graft --continue) | |
163 | [255] |
|
163 | [255] | |
164 |
|
164 | |||
165 | Continue without resolve should fail: |
|
165 | Continue without resolve should fail: | |
166 |
|
166 | |||
167 | $ hg graft -c |
|
167 | $ hg graft -c | |
168 | grafting revision 4 |
|
168 | grafting revision 4 | |
169 | abort: unresolved merge conflicts (see hg help resolve) |
|
169 | abort: unresolved merge conflicts (see hg help resolve) | |
170 | [255] |
|
170 | [255] | |
171 |
|
171 | |||
172 | Fix up: |
|
172 | Fix up: | |
173 |
|
173 | |||
174 | $ echo b > e |
|
174 | $ echo b > e | |
175 | $ hg resolve -m e |
|
175 | $ hg resolve -m e | |
176 |
|
176 | |||
177 | Continue with a revision should fail: |
|
177 | Continue with a revision should fail: | |
178 |
|
178 | |||
179 | $ hg graft -c 6 |
|
179 | $ hg graft -c 6 | |
180 | abort: can't specify --continue and revisions |
|
180 | abort: can't specify --continue and revisions | |
181 | [255] |
|
181 | [255] | |
182 |
|
182 | |||
183 | Continue for real, clobber usernames |
|
183 | Continue for real, clobber usernames | |
184 |
|
184 | |||
185 | $ hg graft -c -U |
|
185 | $ hg graft -c -U | |
186 | grafting revision 4 |
|
186 | grafting revision 4 | |
187 | grafting revision 3 |
|
187 | grafting revision 3 | |
188 |
|
188 | |||
189 | Compare with original: |
|
189 | Compare with original: | |
190 |
|
190 | |||
191 | $ hg diff -r 6 |
|
191 | $ hg diff -r 6 | |
192 | $ hg status --rev 0:. -C |
|
192 | $ hg status --rev 0:. -C | |
193 | M d |
|
193 | M d | |
194 | M e |
|
194 | M e | |
195 | A b |
|
195 | A b | |
196 | a |
|
196 | a | |
197 | A c |
|
197 | A c | |
198 | a |
|
198 | a | |
199 | R a |
|
199 | R a | |
200 |
|
200 | |||
201 | View graph: |
|
201 | View graph: | |
202 |
|
202 | |||
203 | $ hg --config extensions.graphlog= log -G --template '{author}@rev: {desc}\n' |
|
203 | $ hg --config extensions.graphlog= log -G --template '{author}@{rev}: {desc}\n' | |
204 |
@ test@ |
|
204 | @ test@11: 3 | |
205 | | |
|
205 | | | |
206 |
o test@ |
|
206 | o test@10: 4 | |
207 | | |
|
207 | | | |
208 |
o test@ |
|
208 | o test@9: 5 | |
209 | | |
|
209 | | | |
210 |
o bar@ |
|
210 | o bar@8: 1 | |
211 | | |
|
211 | | | |
212 |
o foo@ |
|
212 | o foo@7: 2 | |
213 | | |
|
213 | | | |
214 |
| o test@ |
|
214 | | o test@6: 6 | |
215 | | |\ |
|
215 | | |\ | |
216 |
| | o test@ |
|
216 | | | o test@5: 5 | |
217 | | | | |
|
217 | | | | | |
218 |
| o | test@ |
|
218 | | o | test@4: 4 | |
219 | | |/ |
|
219 | | |/ | |
220 |
| o baz@ |
|
220 | | o baz@3: 3 | |
221 | | | |
|
221 | | | | |
222 |
| o test@ |
|
222 | | o test@2: 2 | |
223 | | | |
|
223 | | | | |
224 |
| o bar@ |
|
224 | | o bar@1: 1 | |
225 | |/ |
|
225 | |/ | |
226 |
o test@ |
|
226 | o test@0: 0 | |
227 |
|
227 | |||
228 | Graft again onto another branch should preserve the original source |
|
228 | Graft again onto another branch should preserve the original source | |
229 | $ hg up -q 0 |
|
229 | $ hg up -q 0 | |
230 | $ echo 'g'>g |
|
230 | $ echo 'g'>g | |
231 | $ hg add g |
|
231 | $ hg add g | |
232 | $ hg ci -m 7 |
|
232 | $ hg ci -m 7 | |
233 | created new head |
|
233 | created new head | |
234 | $ hg graft 7 |
|
234 | $ hg graft 7 | |
235 | grafting revision 7 |
|
235 | grafting revision 7 | |
236 |
|
236 | |||
237 | $ hg log -r 7 --template '{rev}:{node}\n' |
|
237 | $ hg log -r 7 --template '{rev}:{node}\n' | |
238 | 7:d2e44c99fd3f31c176ea4efb9eca9f6306c81756 |
|
238 | 7:d2e44c99fd3f31c176ea4efb9eca9f6306c81756 | |
239 | $ hg log -r 2 --template '{rev}:{node}\n' |
|
239 | $ hg log -r 2 --template '{rev}:{node}\n' | |
240 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
240 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
241 |
|
241 | |||
242 | $ hg log --debug -r tip |
|
242 | $ hg log --debug -r tip | |
243 | changeset: 13:39bb1d13572759bd1e6fc874fed1b12ece047a18 |
|
243 | changeset: 13:39bb1d13572759bd1e6fc874fed1b12ece047a18 | |
244 | tag: tip |
|
244 | tag: tip | |
245 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f |
|
245 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f | |
246 | parent: -1:0000000000000000000000000000000000000000 |
|
246 | parent: -1:0000000000000000000000000000000000000000 | |
247 | manifest: 13:0780e055d8f4cd12eadd5a2719481648f336f7a9 |
|
247 | manifest: 13:0780e055d8f4cd12eadd5a2719481648f336f7a9 | |
248 | user: foo |
|
248 | user: foo | |
249 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
249 | date: Thu Jan 01 00:00:00 1970 +0000 | |
250 | files+: b |
|
250 | files+: b | |
251 | files-: a |
|
251 | files-: a | |
252 | extra: branch=default |
|
252 | extra: branch=default | |
253 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
253 | extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4 | |
254 | description: |
|
254 | description: | |
255 | 2 |
|
255 | 2 | |
256 |
|
256 | |||
257 |
|
257 |
General Comments 0
You need to be logged in to leave comments.
Login now