Patchwork [3,of,5] revert: drop `missingmodified` set

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 15, 2014, 4:48 p.m.
Message ID <5548613bc2904a03757d.1408121325@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5432/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 15, 2014, 4:48 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1403627809 -3600
#      Tue Jun 24 17:36:49 2014 +0100
# Node ID 5548613bc2904a03757dce37cc9613f1a3c74f73
# Parent  26ae04ea3c2496cf60ecd76d63134df577f17dd5
revert: drop `missingmodified` set

There cannot be any element in this set since:

    dsmodified &= modified

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2453,13 +2453,10 @@  def revert(ui, repo, ctx, parents, *pats
         def removeforget(abs):
             if repo.dirstate[abs] == 'a':
                 return _('forgetting %s\n')
             return _('removing %s\n')
 
-        missingmodified = dsmodified - smf
-        dsmodified -= missingmodified
-
         # action to be actually performed by revert
         # (<list of file>, message>) tuple
         actions = {'revert': ([], _('reverting %s\n')),
                    'add': ([], _('adding %s\n')),
                    'remove': ([], removeforget),
@@ -2470,11 +2467,10 @@  def revert(ui, repo, ctx, parents, *pats
             #   file state
             #   action
             #   make backup
             (modified,         (actions['revert'],   False)),
             (dsmodified,       (actions['revert'],   True)),
-            (missingmodified,  (actions['remove'],   True)),
             (dsadded,          (actions['remove'],   True)),
             (removed,          (actions['add'],      True)),
             (dsremoved,        (actions['undelete'], True)),
             (clean,            (None,                False)),
             )