Mercurial > hg
diff hgext/narrow/narrowcommands.py @ 41039:54c3b4bd01f2
merge: extract helper for creating empty "actions" dict
Replicating the set of actions in multiple places is bad.
Differential Revision: https://phab.mercurial-scm.org/D5472
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 21 Dec 2018 09:48:30 -0800 |
parents | 095a0a63ad88 |
children | ce0bc2952e2a |
line wrap: on
line diff
--- a/hgext/narrow/narrowcommands.py Mon Dec 03 22:22:23 2018 -0800 +++ b/hgext/narrow/narrowcommands.py Fri Dec 21 09:48:30 2018 -0800 @@ -316,7 +316,7 @@ transactiongetter=tgetter) repo.setnewnarrowpats() - actions = {k: [] for k in 'a am f g cd dc r dm dg m e k p pr'.split()} + actions = merge.emptyactions() addgaction = actions['g'].append mf = repo['.'].manifest().matches(newmatch)