changeset 22211:76fa261b5fe3

revert: remove code killed by the double status All those checks were here to catch cases where files were not modified in dirstate but were different in the target revision. This is now properly handled by calling status on the target node too.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 24 Jun 2014 17:37:24 +0100
parents 537f55a27101
children f18aca03ddd9
files mercurial/cmdutil.py
diffstat 1 files changed, 0 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Tue Jun 24 17:36:49 2014 +0100
+++ b/mercurial/cmdutil.py	Tue Jun 24 17:37:24 2014 +0100
@@ -2482,8 +2482,6 @@
             )
 
         for abs, (rel, exact) in sorted(names.items()):
-            # hash on file in target manifest (or None if missing from target)
-            mfentry = mf.get(abs)
             # target file to be touch on disk (relative to cwd)
             target = repo.wjoin(abs)
             def handle(xlist, dobackup):
@@ -2528,19 +2526,6 @@
                     if exact:
                         ui.warn(_('no changes needed to %s\n') % rel)
                     continue
-                # no change in dirstate but parent and target may differ
-                if pmf is None:
-                    # only need parent manifest in this unlikely case,
-                    # so do not read by default
-                    pmf = repo[parent].manifest()
-                if abs in pmf and mfentry:
-                    # if version of file is same in parent and target
-                    # manifests, do nothing
-                    if (pmf[abs] != mfentry or
-                        pmf.flags(abs) != mf.flags(abs)):
-                        handle(actions['revert'], False)
-                else:
-                    handle(actions['remove'], False)
 
         if not opts.get('dry_run'):
             _performrevert(repo, parents, ctx, actions)