Mercurial > hg
comparison hgext/rebase.py @ 21826:2ba6c9b4e0eb stable
rebase: fix bug that caused transitive copy records to disappear (issue4192)
The defect was that copies were always duplicated against the target
revision, rather than the first parent of the revision being
rebased. This produced nominally correct results if changes were
rebased one at a time (or with --collapse), but was wrong if we
rebased a sequence of changesets which contained a sequence of copies.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Sat, 07 Jun 2014 15:23:12 -0400 |
parents | 799c494189a9 |
children | 4b93e19cd6e6 |
comparison
equal
deleted
inserted
replaced
21825:3666331164bb | 21826:2ba6c9b4e0eb |
---|---|
343 raise error.InterventionRequired( | 343 raise error.InterventionRequired( |
344 _('unresolved conflicts (see hg ' | 344 _('unresolved conflicts (see hg ' |
345 'resolve, then hg rebase --continue)')) | 345 'resolve, then hg rebase --continue)')) |
346 finally: | 346 finally: |
347 ui.setconfig('ui', 'forcemerge', '', 'rebase') | 347 ui.setconfig('ui', 'forcemerge', '', 'rebase') |
348 cmdutil.duplicatecopies(repo, rev, target) | 348 if collapsef: |
349 cmdutil.duplicatecopies(repo, rev, target) | |
350 else: | |
351 # If we're not using --collapse, we need to | |
352 # duplicate copies between the revision we're | |
353 # rebasing and its first parent, but *not* | |
354 # duplicate any copies that have already been | |
355 # performed in the destination. | |
356 p1rev = repo[rev].p1().rev() | |
357 cmdutil.duplicatecopies(repo, rev, p1rev, skiprev=target) | |
349 if not collapsef: | 358 if not collapsef: |
350 newrev = concludenode(repo, rev, p1, p2, extrafn=extrafn, | 359 newrev = concludenode(repo, rev, p1, p2, extrafn=extrafn, |
351 editor=editor) | 360 editor=editor) |
352 else: | 361 else: |
353 # Skip commit if we are collapsing | 362 # Skip commit if we are collapsing |