diff mercurial/localrepo.py @ 8294:48a382c23226

transaction: refactor transaction.abort and rollback to use the same code This adds a change to the way that abort is processed, as it will not continue truncating files beyond the first failure, otherwise the respective functionality is maintained, i.e. abort will not unlink files, but rollback will. Co-contributor: Sune Foldager <cryo@cyanite.org>
author Henrik Stuart <hg@hstuart.dk>
date Mon, 04 May 2009 15:31:57 +0200
parents c214a895f62c
children b87a50b7125c
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon May 04 13:47:12 2009 +0200
+++ b/mercurial/localrepo.py	Mon May 04 15:31:57 2009 +0200
@@ -624,7 +624,7 @@
         try:
             if os.path.exists(self.sjoin("journal")):
                 self.ui.status(_("rolling back interrupted transaction\n"))
-                transaction.rollback(self.sopener, self.sjoin("journal"))
+                transaction.rollback(self.sopener, self.sjoin("journal"), self.ui.warn)
                 self.invalidate()
                 return True
             else:
@@ -640,7 +640,7 @@
             lock = self.lock()
             if os.path.exists(self.sjoin("undo")):
                 self.ui.status(_("rolling back last transaction\n"))
-                transaction.rollback(self.sopener, self.sjoin("undo"))
+                transaction.rollback(self.sopener, self.sjoin("undo"), self.ui.warn)
                 util.rename(self.join("undo.dirstate"), self.join("dirstate"))
                 try:
                     branch = self.opener("undo.branch").read()