# HG changeset patch # User Pierre-Yves David # Date 2013-04-18 13:10:01 # Node ID 080b801c34f1d053c3550a4f57b96ca3633e7e6f # Parent f77c23ec09f77aa5946614e362744b97a77345a3 histedit: ensure rules return short hex at all time Handling homogeneous data is both simpler and safer. diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -724,11 +724,12 @@ def verifyrules(rules, repo, ctxs): action, rest = r.split(' ', 1) ha = rest.strip().split(' ', 1)[0] try: - if repo[ha] not in ctxs: - raise util.Abort( - _('may not use changesets other than the ones listed')) + 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: + raise util.Abort( + _('may not use changesets other than the ones listed')) if action not in actiontable: raise util.Abort(_('unknown action "%s"') % action) parsed.append([action, ha])