Mercurial > public > mercurial-scm > hg-stable
diff hgext/histedit.py @ 19841:fab753424e78 stable
histedit: abort if there are multiple roots in "--outgoing" revisions
Before this patch, if there are multiple roots in "--outgoing"
revisions, result of "histedit --outgoing" depends on the parent of
the working directory. It succeeds only when the parent of the working
directory is a descendant of the oldest root in "--outgoing"
revisions, and fails otherwise.
It seems to be ambiguous and difficult for users.
This patch makes "histedit --outgoing" abort if there are multiple
roots in "--outgoing" revisions always.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Tue, 01 Oct 2013 00:12:34 +0900 |
parents | bd5c1b49d106 |
children | 1aaefba2a3a9 |
line wrap: on
line diff
--- a/hgext/histedit.py Mon Sep 30 20:54:39 2013 +0200 +++ b/hgext/histedit.py Tue Oct 01 00:12:34 2013 +0900 @@ -426,7 +426,12 @@ outgoing = discovery.findcommonoutgoing(repo, other, revs, force=force) if not outgoing.missing: raise util.Abort(_('no outgoing ancestors')) - return outgoing.missing[0] + roots = list(repo.revs("roots(%ln)", outgoing.missing)) + if 1 < len(roots): + msg = _('there are ambiguous outgoing revisions') + hint = _('see "hg help histedit" for more detail') + raise util.Abort(msg, hint=hint) + return repo.lookup(roots[0]) actiontable = {'p': pick, 'pick': pick,