[PATCH 3 of 5 V2] revert: add more padding in the dispatch list

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Sep 8 09:58:20 CDT 2014

# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1409407569 -7200
#      Sat Aug 30 16:06:09 2014 +0200
# Node ID 88e9546f2f323f2bb63acc37cb2fcb6fba4d1d0b
# Parent  fee9bbe045a80ce0706dd86442ab5dc16a07a80b
revert: add more padding in the dispatch list

We are going to add more sets and some of them will have longer name. We add
the padding in a different patch for readbility purpose.

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2519,24 +2519,24 @@ def revert(ui, repo, ctx, parents, *pats
             #   action
             #   make backup
             ## Sets that results that will change file on disk
             # Modified compared to target, no local change
-            (modified,   actions['revert'],   discard),
+            (modified,      actions['revert'],   discard),
             # Modified compared to target, local change
-            (dsmodified, actions['revert'],   backup),
+            (dsmodified,    actions['revert'],   backup),
             # Added since target
-            (dsadded,    actions['remove'],   backup),
+            (dsadded,       actions['remove'],   backup),
             # Removed since  target, before working copy parent
-            (removed,    actions['add'],      backup),
+            (removed,       actions['add'],      backup),
             # Removed since targe, marked as such in working copy parent
-            (dsremoved,  actions['undelete'], backup),
+            (dsremoved,     actions['undelete'], backup),
             ## the following sets does not result in any file changes
             # File with no modification
-            (clean,      actions['noop'],     discard),
+            (clean,         actions['noop'],     discard),
             # Existing file, not tracked anywhere
-            (unknown,    actions['unknown'],  discard),
+            (unknown,       actions['unknown'],  discard),
         needdata = ('revert', 'add', 'remove', 'undelete')
         _revertprefetch(repo, ctx, *[actions[name][0] for name in needdata])

More information about the Mercurial-devel mailing list