mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 15:57:43 +03:00
revert: use actions[...] in all disptable cases
1. Special cases are not special enough 2. There are two cases where nothing is done and a message is displayed. This prepares it.
This commit is contained in:
parent
5b69082d6e
commit
110f9a614a
@ -2469,7 +2469,9 @@ def revert(ui, repo, ctx, parents, *pats, **opts):
|
||||
actions = {'revert': ([], _('reverting %s\n')),
|
||||
'add': ([], _('adding %s\n')),
|
||||
'remove': ([], removeforget),
|
||||
'undelete': ([], _('undeleting %s\n'))}
|
||||
'undelete': ([], _('undeleting %s\n')),
|
||||
'noop': None,
|
||||
}
|
||||
|
||||
|
||||
# should we do a backup?
|
||||
@ -2486,7 +2488,7 @@ def revert(ui, repo, ctx, parents, *pats, **opts):
|
||||
(dsadded, actions['remove'], backup),
|
||||
(removed, actions['add'], backup),
|
||||
(dsremoved, actions['undelete'], backup),
|
||||
(clean, None, discard),
|
||||
(clean, actions['noop'], discard),
|
||||
)
|
||||
|
||||
for abs, (rel, exact) in sorted(names.items()):
|
||||
|
Loading…
Reference in New Issue
Block a user