Show More
@@ -645,9 +645,16 b' class filectx(object):' | |||
|
645 | 645 | # the easy case: no (relevant) renames |
|
646 | 646 | if fc2.path() == self.path() and self.path() in actx: |
|
647 | 647 | return actx[self.path()] |
|
648 | acache = {} | |
|
648 | ||
|
649 | # the next easiest cases: unambiguous predecessor (name trumps | |
|
650 | # history) | |
|
651 | if self.path() in actx and fc2.path() not in actx: | |
|
652 | return actx[self.path()] | |
|
653 | if fc2.path() in actx and self.path() not in actx: | |
|
654 | return actx[fc2.path()] | |
|
649 | 655 | |
|
650 | 656 | # prime the ancestor cache for the working directory |
|
657 | acache = {} | |
|
651 | 658 | for c in (self, fc2): |
|
652 | 659 | if c._filerev is None: |
|
653 | 660 | pl = [(n.path(), n.filenode()) for n in c.parents()] |
@@ -72,28 +72,23 b' Graft a rename:' | |||
|
72 | 72 | # HG changeset patch |
|
73 | 73 | # User foo |
|
74 | 74 | # Date 0 0 |
|
75 | # Node ID d2e44c99fd3f31c176ea4efb9eca9f6306c81756 | |
|
75 | # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
|
76 | 76 | # Parent 68795b066622ca79a25816a662041d8f78f3cd9e |
|
77 | 77 | 2 |
|
78 | 78 | |
|
79 | 79 | diff --git a/a b/b |
|
80 | 80 | rename from a |
|
81 | 81 | rename to b |
|
82 | --- a/a | |
|
83 | +++ b/b | |
|
84 | @@ -1,1 +1,1 @@ | |
|
85 | -a | |
|
86 | +b | |
|
87 | 82 | |
|
88 | 83 | Look for extra:source |
|
89 | 84 | |
|
90 | 85 | $ hg log --debug -r tip |
|
91 | changeset: 7:d2e44c99fd3f31c176ea4efb9eca9f6306c81756 | |
|
86 | changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
|
92 | 87 | tag: tip |
|
93 | 88 | phase: draft |
|
94 | 89 | parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e |
|
95 | 90 | parent: -1:0000000000000000000000000000000000000000 |
|
96 | manifest: 7:5d59766436fd8fbcd38e7bebef0f6eaf3eebe637 | |
|
91 | manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb | |
|
97 | 92 | user: foo |
|
98 | 93 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
99 | 94 | files+: b |
@@ -128,16 +123,20 b' Graft out of order, skipping a merge and' | |||
|
128 | 123 | checking for directory renames |
|
129 | 124 | resolving manifests |
|
130 | 125 | overwrite: False, partial: False |
|
131 |
ancestor: 68795b066622, local: |
|
|
126 | ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6 | |
|
132 | 127 | b: local copied/moved to a -> m |
|
133 | 128 | preserving b for resolve of b |
|
134 | 129 | updating: b 1/1 files (100.00%) |
|
135 | graft for revision 1 is empty | |
|
130 | picked tool 'internal:merge' for b (binary False symlink False) | |
|
131 | merging b and a to b | |
|
132 | my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622 | |
|
133 | premerge successful | |
|
134 | b | |
|
136 | 135 | grafting revision 5 |
|
137 | 136 | searching for copies back to rev 1 |
|
138 | 137 | resolving manifests |
|
139 | 138 | overwrite: False, partial: False |
|
140 |
ancestor: 4c60f11aa304, local: |
|
|
139 | ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746 | |
|
141 | 140 | e: remote is newer -> g |
|
142 | 141 | updating: e 1/1 files (100.00%) |
|
143 | 142 | getting e |
@@ -146,7 +145,7 b' Graft out of order, skipping a merge and' | |||
|
146 | 145 | searching for copies back to rev 1 |
|
147 | 146 | resolving manifests |
|
148 | 147 | overwrite: False, partial: False |
|
149 |
ancestor: 4c60f11aa304, local: 8 |
|
|
148 | ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d | |
|
150 | 149 | e: versions differ -> m |
|
151 | 150 | d: remote is newer -> g |
|
152 | 151 | preserving e for resolve of e |
@@ -155,7 +154,7 b' Graft out of order, skipping a merge and' | |||
|
155 | 154 | updating: e 2/2 files (100.00%) |
|
156 | 155 | picked tool 'internal:merge' for e (binary False symlink False) |
|
157 | 156 | merging e |
|
158 |
my e@8 |
|
|
157 | my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622 | |
|
159 | 158 | warning: conflicts during merge. |
|
160 | 159 | merging e incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
161 | 160 | abort: unresolved conflicts, can't continue |
@@ -201,11 +200,13 b' Compare with original:' | |||
|
201 | 200 | View graph: |
|
202 | 201 | |
|
203 | 202 | $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n' |
|
204 |
@ test@1 |
|
|
203 | @ test@11.draft: 3 | |
|
204 | | | |
|
205 | o test@10.draft: 4 | |
|
205 | 206 | | |
|
206 |
o test@9.draft: |
|
|
207 | o test@9.draft: 5 | |
|
207 | 208 | | |
|
208 |
o |
|
|
209 | o bar@8.draft: 1 | |
|
209 | 210 | | |
|
210 | 211 | o foo@7.draft: 2 |
|
211 | 212 | | |
@@ -233,17 +234,17 b' Graft again onto another branch should p' | |||
|
233 | 234 | grafting revision 7 |
|
234 | 235 | |
|
235 | 236 | $ hg log -r 7 --template '{rev}:{node}\n' |
|
236 | 7:d2e44c99fd3f31c176ea4efb9eca9f6306c81756 | |
|
237 | 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82 | |
|
237 | 238 | $ hg log -r 2 --template '{rev}:{node}\n' |
|
238 | 239 | 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4 |
|
239 | 240 | |
|
240 | 241 | $ hg log --debug -r tip |
|
241 | changeset: 12:95adbe5de6b10f376b699ece9ed5a57cd7b4b0f6 | |
|
242 | changeset: 13:9db0f28fd3747e92c57d015f53b5593aeec53c2d | |
|
242 | 243 | tag: tip |
|
243 | 244 | phase: draft |
|
244 |
parent: 1 |
|
|
245 | parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f | |
|
245 | 246 | parent: -1:0000000000000000000000000000000000000000 |
|
246 | manifest: 12:9944044f82a462bbaccc9bdf7e0ac5b811db7d1b | |
|
247 | manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637 | |
|
247 | 248 | user: foo |
|
248 | 249 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
249 | 250 | files+: b |
@@ -261,7 +262,7 b' Disallow grafting an already grafted cse' | |||
|
261 | 262 | [255] |
|
262 | 263 | |
|
263 | 264 | Disallow grafting already grafted csets with the same origin onto each other |
|
264 |
$ hg up -q 1 |
|
|
265 | $ hg up -q 13 | |
|
265 | 266 | $ hg graft 2 |
|
266 | 267 | skipping already grafted revision 2 |
|
267 | 268 | [255] |
@@ -274,5 +275,5 b' Disallow grafting already grafted csets ' | |||
|
274 | 275 | skipping already grafted revision 2 |
|
275 | 276 | [255] |
|
276 | 277 | $ hg graft tip |
|
277 |
skipping already grafted revision 1 |
|
|
278 | skipping already grafted revision 13 (same origin 2) | |
|
278 | 279 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now