changeset 22186:a89bc7833e0d

revert: also track clean files Tracking clean files is the simplest way to be able to reports files that need no changes. So we explicitly retrieve them. This fixes a couple of test outputs where the lack of changes was not reported.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 31 Jul 2014 15:52:56 -0700
parents afead12e724b
children aee5385e4bae
files mercurial/cmdutil.py tests/test-revert.t tests/test-shelve.t
diffstat 3 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Fri Aug 01 18:57:53 2014 -0700
+++ b/mercurial/cmdutil.py	Thu Jul 31 15:52:56 2014 -0700
@@ -2381,6 +2381,7 @@
         added    = set(changes[1])
         removed  = set(changes[2])
         _deleted  = set(changes[3])
+        clean    = set(changes[6])
 
         # split between files known in target manifest and the others
         smf = set(mf)
@@ -2449,6 +2450,7 @@
             (missingadded,     (actions['remove'],   False)),
             (dsremoved,        (actions['undelete'], True)),
             (missingremoved,   (None,                False)),
+            (clean,            (None,                False)),
             )
 
         for abs, (rel, exact) in sorted(names.items()):
--- a/tests/test-revert.t	Fri Aug 01 18:57:53 2014 -0700
+++ b/tests/test-revert.t	Thu Jul 31 15:52:56 2014 -0700
@@ -1104,8 +1104,6 @@
 
 - fails to report no change to revert for
 |
-| - clean_clean
-| - clean_revert
 | - modified_revert
 | - removed_revert
 
@@ -1136,12 +1134,14 @@
   ### revert for: added_wc
   
   ### revert for: clean_clean
+  no changes needed to clean_clean
   
   ### revert for: clean_deleted
   
   ### revert for: clean_removed
   
   ### revert for: clean_revert
+  no changes needed to clean_revert
   
   ### revert for: clean_untracked-clean
   
--- a/tests/test-shelve.t	Fri Aug 01 18:57:53 2014 -0700
+++ b/tests/test-shelve.t	Thu Jul 31 15:52:56 2014 -0700
@@ -680,9 +680,6 @@
   g
   $ hg unshelve --abort
   rebase aborted
-  no changes needed to a
-  no changes needed to d
-  no changes needed to e
   unshelve of 'default' aborted
   $ hg st
   ? f.orig