histedit: remove now unused 'constraints' related code

Now that the one action that need different logic handle that using inheritance
and overriding, we can remove that code.
This commit is contained in:
Pierre-Yves David 2016-08-26 21:06:31 +02:00
parent d2bccef0ce
commit b9ebcea85e

View File

@ -201,18 +201,6 @@ release = lock.release
cmdtable = {}
command = cmdutil.command(cmdtable)
class _constraints(object):
# aborts if there are multiple rules for one node
noduplicates = 'noduplicates'
# abort if the node does belong to edited stack
forceother = 'forceother'
# abort if the node doesn't belong to edited stack
noother = 'noother'
@classmethod
def known(cls):
return set([v for k, v in cls.__dict__.items() if k[0] != '_'])
# Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
# extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
# be specifying the version(s) of Mercurial they are tested with, or
@ -392,8 +380,6 @@ class histeditaction(object):
self.repo = state.repo
self.node = node
constraints = set([_constraints.noduplicates, _constraints.noother])
@classmethod
def fromrule(cls, state, rule):
"""Parses the given rule, returning an instance of the histeditaction.
@ -786,7 +772,6 @@ class fold(histeditaction):
return repo[n], replacements
class base(histeditaction):
constraints = set([_constraints.forceother])
def run(self):
if self.repo['.'].node() != self.node: