[evolution:amend] prevent amending immutable changeset.
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Tue, 20 Sep 2011 18:16:40 +0200
changeset 92 5b23cdf998d0
parent 91 5b8d08c78854
child 93 1b962aaf0c7d
[evolution:amend] prevent amending immutable changeset.
hgext/evolution.py
--- 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