[PATCH 2 of 4] revert: drop more dead code

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Aug 18 18:36:51 CDT 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at 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.

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:


More information about the Mercurial-devel mailing list