# HG changeset patch # User Augie Fackler # Date 2013-01-30 15:57:28 # Node ID c795c9f87792fef98b358ae88f90c4003e9bbe4d # Parent ef60083b553623192ca1627954168bee2e494362 histedit: prevent parent guessed via --outgoing from being a revset (issue3770) If the binary hash of the parent node guessed via --outgoing happened to contain a special revset character (":" was specified in the bug), the revset parser would abort. Hexlifying the node before passing it to the revsingle call should fix that. diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -454,8 +454,12 @@ def histedit(ui, repo, *parent, **opts): if revs: revs = [repo.lookup(rev) for rev in revs] - parent = discovery.findcommonoutgoing( - repo, other, [], force=opts.get('force')).missing[0:1] + # hexlify nodes from outgoing, because we're going to parse + # parent[0] using revsingle below, and if the binary hash + # contains special revset characters like ":" the revset + # parser can choke. + parent = [node.hex(n) for n in discovery.findcommonoutgoing( + repo, other, [], force=opts.get('force')).missing[0:1]] else: if opts.get('force'): raise util.Abort(_('--force only allowed with --outgoing'))