# HG changeset patch # User Pierre-Yves David # Date 1462206276 -7200 # Node ID 031682c1faa2d256c8de6a4c23450ce5742766a2 # Parent 73e0018c423fa59dcfd0c601f8bf8d6441a888d1 metaedit: check for public changeset before instability Public changeset will stay public even if the selection is adjusted, this is a more definitive condition that is worth warning about first. diff -r 73e0018c423f -r 031682c1faa2 hgext/evolve.py --- a/hgext/evolve.py Mon May 02 18:21:54 2016 +0200 +++ b/hgext/evolve.py Mon May 02 18:24:36 2016 +0200 @@ -3221,14 +3221,14 @@ if opts['fold']: root, head = _foldcheck(repo, revs) else: + if repo.revs("%ld and public()", revs): + raise error.Abort(_('cannot edit commit information for public ' + 'revisions')) newunstable = _disallowednewunstable(repo, revs) if newunstable: raise error.Abort( _('cannot edit commit information in the middle of a stack'), hint=_('%s will be affected') % repo[newunstable.first()]) - if repo.revs("%ld and public()", revs): - raise error.Abort(_('cannot edit commit information for public ' - 'revisions')) root = head = repo[revs.first()] wctx = repo[None]