mercurial/cmdutil.py
branchstable
changeset 18197 153659e86a5f
parent 18006 0c10cf819146
child 18198 9b4adaef0db9
--- a/mercurial/cmdutil.py	Thu Dec 20 16:36:45 2012 -0600
+++ b/mercurial/cmdutil.py	Sat Dec 29 18:00:18 2012 +0100
@@ -1619,7 +1619,7 @@
     ui.note(_('amending changeset %s\n') % old)
     base = old.p1()
 
-    wlock = lock = None
+    wlock = lock = newid = None
     try:
         wlock = repo.wlock()
         lock = repo.lock()
@@ -1782,6 +1782,8 @@
             ui.note(_('stripping amended changeset %s\n') % old)
             repair.strip(ui, repo, old.node(), topic='amend-backup')
     finally:
+        if newid is None:
+            repo.dirstate.invalidate()
         lockmod.release(wlock, lock)
     return newid