sangeet259 created this revision. Herald added a reviewer: durin42. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers.
REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D2394 AFFECTED FILES hgext/histedit.py CHANGE DETAILS diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -422,7 +422,14 @@ def fromrule(cls, state, rule): """Parses the given rule, returning an instance of the histeditaction. """ - rulehash = rule.strip().split(' ', 1)[0] + ruleid = rule.strip().split(' ', 1)[0] + # The ruleid can be anything like revison no,rulehashes, "tip","@" etc + # Check for validation of rule ids and get the rulehash + try: + _ctx = scmutil.revsingle(state.repo,ruleid) + rulehash = _ctx.hex()[:12] + except RepoLookupError : + raise error.ParseError("invalid changeset %s" % ruleid) try: rev = node.bin(rulehash) except TypeError: To: sangeet259, durin42, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel