# HG changeset patch # User Pierre-Yves David # Date 1409359148 -7200 # Node ID 0f323ed8effd86aabcc28faf9e453a94d500c8fe # Parent 3760ebf786b84ab2d9fc4108d14333c3ec3fedfc revert: track added files with local modifications Those files need to be backed up but are currently not. We compute the set of them to be able to use a different backup strategy in the next changeset. diff -r 3760ebf786b8 -r 0f323ed8effd mercurial/cmdutil.py --- a/mercurial/cmdutil.py Sat Aug 30 02:30:24 2014 +0200 +++ b/mercurial/cmdutil.py Sat Aug 30 02:39:08 2014 +0200 @@ -2524,6 +2524,7 @@ unknown = set(changes[4]) unknown.update(changes[5]) clean = set(changes[6]) + modadded = set() # split between files known in target manifest and the others smf = set(mf) @@ -2554,6 +2555,9 @@ # distinct between dirstate remove and other removed -= dsremoved + modadded = added & dsmodified + added -= modadded + # tell newly modified apart. dsmodified &= modified dsmodified |= modified & dsadded # dirstate added may needs backup @@ -2653,6 +2657,8 @@ (added, actions['remove'], discard), # Added in working directory (dsadded, actions['forget'], discard), + # Added since target, have local modification + (modadded, actions['remove'], discard), # Added since target but file is missing in working directory (deladded, actions['drop'], discard), # Removed since target, before working copy parent