changeset 1784:031682c1faa2

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.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 02 May 2016 18:24:36 +0200
parents 73e0018c423f
children 60752ed8d2d4
files hgext/evolve.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -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]