Patchwork [2,of,4] revert: drop more dead code

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 18, 2014, 11:36 p.m.
Message ID <dc71811ffcd0443fbec9.1408405011@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5484/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 18, 2014, 11:36 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1403650543 -3600
#      Tue Jun 24 23:55:43 2014 +0100
# Node ID dc71811ffcd0443fbec9bdd21d8be6ce7c30659e
# Parent  8fd7b8a721f0fa8b35f02354b643bfc73c6f0524
revert: drop more dead code

Now that we detect all clean files we do not needs this clause anymore.

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2523,15 +2523,10 @@  def revert(ui, repo, ctx, parents, *pats
                 if abs not in repo.dirstate:
                     if exact:
                         ui.warn(_('file not managed: %s\n') % rel)
                     continue
 
-                # parent is target, no changes mean no changes
-                if node == parent:
-                    if exact:
-                        ui.warn(_('no changes needed to %s\n') % rel)
-                    continue
 
         if not opts.get('dry_run'):
             _performrevert(repo, parents, ctx, actions)
 
             if targetsubs: