Mercurial > public > mercurial-scm > hg-stable
diff hgext/histedit.py @ 19473:10a0ae668fe6 stable
histedit: refuse to edit history that contains merges (issue3962)
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Wed, 24 Jul 2013 17:39:29 -0400 |
parents | 33e1b2d4bdbc |
children | 11664641fbad |
line wrap: on
line diff
--- a/hgext/histedit.py Wed Jul 24 13:20:44 2013 +0800 +++ b/hgext/histedit.py Wed Jul 24 17:39:29 2013 -0400 @@ -679,6 +679,8 @@ if (not obsolete._enabled and repo.revs('(%ld::) - (%ld)', ctxs, ctxs)): raise util.Abort(_('cannot edit history that would orphan nodes')) + if repo.revs('(%ld) and merge()', ctxs): + raise util.Abort(_('cannot edit history that contains merges')) root = ctxs[0] # list is already sorted by repo.set if not root.phase(): raise util.Abort(_('cannot edit immutable changeset: %s') % root)