[PATCH 3 of 5] revert: add more padding in the dispatch list
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu Sep 4 13:33:21 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 44dbbc50f939e9656dae206f6f64f378db115790
# Parent fcf5369a3f73b708c628b0789cc4d3e0a211bc40
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(ctx, *[actions[name][0] for name in needdata])
More information about the Mercurial-devel
mailing list