histedit: track short hash instead of changectx object
This simplifies set usage and allow us to add a missing revision check
in a later commit.
--- a/hgext/histedit.py Thu Apr 18 15:10:01 2013 +0200
+++ b/hgext/histedit.py Thu Apr 18 15:13:35 2013 +0200
@@ -716,7 +716,8 @@
or a rule on a changeset outside of the user-given range.
"""
parsed = []
- if len(rules) != len(ctxs):
+ expected = set(str(c) for c in ctxs)
+ if len(rules) != len(expected):
raise util.Abort(_('must specify a rule for each changeset once'))
for r in rules:
if ' ' not in r:
@@ -727,7 +728,7 @@
ha = str(repo[ha]) # ensure its a short hash
except error.RepoError:
raise util.Abort(_('unknown changeset %s listed') % ha)
- if repo[ha] not in ctxs:
+ if ha not in expected:
raise util.Abort(
_('may not use changesets other than the ones listed'))
if action not in actiontable: