Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/merge.py @ 30200:a2804ddcf9ae
update: enable copy tracing for backwards and non-linear updates
As a followup to the issue4028 series, this fixes a variant of the issue
that can occur when updating with uncommited local changes.
The duplicated .hgsub warning is coming from wc.dirty(). We would previously
skip this call because it's only relevant when we're going to perform copy
tracing, which we didn't do before.
The change to the update summary line is because we now treat the rename as a
proper rename (which counts as a change), rather than an add+delete pair
(which counts as a change and a delete).
author | G?bor Stefanik <gabor.stefanik@nng.com> |
---|---|
date | Thu, 25 Aug 2016 22:02:26 +0200 |
parents | 90a6c18a7c1d |
children | 318a24b52eeb |
comparison
equal
deleted
inserted
replaced
30199:ba22059602e3 | 30200:a2804ddcf9ae |
---|---|
1553 else: | 1553 else: |
1554 # Allow jumping branches if clean and specific rev given | 1554 # Allow jumping branches if clean and specific rev given |
1555 pas = [p1] | 1555 pas = [p1] |
1556 | 1556 |
1557 # deprecated config: merge.followcopies | 1557 # deprecated config: merge.followcopies |
1558 followcopies = False | 1558 followcopies = repo.ui.configbool('merge', 'followcopies', True) |
1559 if overwrite: | 1559 if overwrite: |
1560 pas = [wc] | 1560 pas = [wc] |
1561 followcopies = False | |
1561 elif pas == [p2]: # backwards | 1562 elif pas == [p2]: # backwards |
1562 pas = [wc.p1()] | 1563 pas = [p1] |
1563 elif not branchmerge and not wc.dirty(missing=True): | 1564 elif not pas[0]: |
1564 pass | 1565 followcopies = False |
1565 elif pas[0] and repo.ui.configbool('merge', 'followcopies', True): | 1566 if not branchmerge and not wc.dirty(missing=True): |
1566 followcopies = True | 1567 followcopies = False |
1567 | 1568 |
1568 ### calculate phase | 1569 ### calculate phase |
1569 actionbyfile, diverge, renamedelete = calculateupdates( | 1570 actionbyfile, diverge, renamedelete = calculateupdates( |
1570 repo, wc, p2, pas, branchmerge, force, mergeancestor, | 1571 repo, wc, p2, pas, branchmerge, force, mergeancestor, |
1571 followcopies, matcher=matcher, mergeforce=mergeforce) | 1572 followcopies, matcher=matcher, mergeforce=mergeforce) |