Show More
@@ -321,6 +321,23 b' def mergecopies(repo, c1, c2, base):' | |||||
321 | if repo.ui.configbool('experimental', 'disablecopytrace'): |
|
321 | if repo.ui.configbool('experimental', 'disablecopytrace'): | |
322 | return {}, {}, {}, {} |
|
322 | return {}, {}, {}, {} | |
323 |
|
323 | |||
|
324 | # In certain scenarios (e.g. graft, update or rebase), base can be | |||
|
325 | # overridden We still need to know a real common ancestor in this case We | |||
|
326 | # can't just compute _c1.ancestor(_c2) and compare it to ca, because there | |||
|
327 | # can be multiple common ancestors, e.g. in case of bidmerge. Because our | |||
|
328 | # caller may not know if the revision passed in lieu of the CA is a genuine | |||
|
329 | # common ancestor or not without explicitly checking it, it's better to | |||
|
330 | # determine that here. | |||
|
331 | # | |||
|
332 | # base.descendant(wc) and base.descendant(base) are False, work around that | |||
|
333 | _c1 = c1.p1() if c1.rev() is None else c1 | |||
|
334 | _c2 = c2.p1() if c2.rev() is None else c2 | |||
|
335 | # an endpoint is "dirty" if it isn't a descendant of the merge base | |||
|
336 | # if we have a dirty endpoint, we need to trigger graft logic, and also | |||
|
337 | # keep track of which endpoint is dirty | |||
|
338 | dirtyc1 = not (base == _c1 or base.descendant(_c1)) | |||
|
339 | dirtyc2 = not (base== _c2 or base.descendant(_c2)) | |||
|
340 | graft = dirtyc1 or dirtyc2 | |||
324 | limit = _findlimit(repo, c1.rev(), c2.rev()) |
|
341 | limit = _findlimit(repo, c1.rev(), c2.rev()) | |
325 | if limit is None: |
|
342 | if limit is None: | |
326 | # no common ancestor, no copies |
|
343 | # no common ancestor, no copies |
General Comments 0
You need to be logged in to leave comments.
Login now