[PATCH 8 of 8 cleanup] histedit: remove now unused 'constraints' related code
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Fri Aug 26 15:35:33 EDT 2016
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1472238391 -7200
# Fri Aug 26 21:06:31 2016 +0200
# Node ID 7366faf468f2eb037ea1ce4ef9919786a564bf9d
# Parent c4809d82bb0ae1b068a0fdac1e1012d8182624df
# EXP-Topic histedit.constraint
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.
diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -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 = 'internal' 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:
More information about the Mercurial-devel
mailing list