Skip to content
Snippets Groups Projects
Commit 12f8bef5 authored by Pierre-Yves David's avatar Pierre-Yves David
Browse files

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.
parent a485ec06
No related branches found
No related tags found
No related merge requests found
...@@ -201,18 +201,6 @@ ...@@ -201,18 +201,6 @@
cmdtable = {} cmdtable = {}
command = cmdutil.command(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 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
# extensions which SHIP WITH MERCURIAL. Non-mainline extensions should # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
# be specifying the version(s) of Mercurial they are tested with, or # be specifying the version(s) of Mercurial they are tested with, or
...@@ -392,8 +380,6 @@ ...@@ -392,8 +380,6 @@
self.repo = state.repo self.repo = state.repo
self.node = node self.node = node
constraints = set([_constraints.noduplicates, _constraints.noother])
@classmethod @classmethod
def fromrule(cls, state, rule): def fromrule(cls, state, rule):
"""Parses the given rule, returning an instance of the histeditaction. """Parses the given rule, returning an instance of the histeditaction.
...@@ -786,7 +772,6 @@ ...@@ -786,7 +772,6 @@
return repo[n], replacements return repo[n], replacements
class base(histeditaction): class base(histeditaction):
constraints = set([_constraints.forceother])
def run(self): def run(self):
if self.repo['.'].node() != self.node: if self.repo['.'].node() != self.node:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment