diff hgext/evolution.py @ 92:5b23cdf998d0

[evolution:amend] prevent amending immutable changeset.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Tue, 20 Sep 2011 18:16:40 +0200
parents 5b8d08c78854
children 780a222d547d
line wrap: on
line diff
--- a/hgext/evolution.py	Tue Sep 20 18:15:48 2011 +0200
+++ b/hgext/evolution.py	Tue Sep 20 18:16:40 2011 +0200
@@ -246,6 +246,8 @@
 
     wlock = repo.wlock()
     try:
+        if not old.state().mutable:
+            raise util.Abort(_("can not rewrite immutable changeset %s") % old)
 
         # commit current changes as update
         # code copied from commands.commit to avoid noisy messages