Patchwork [fix-for-default-bug] transaction: use the right location when cleaning up backup file (issue4479)

login
register
mail settings
Submitter Pierre-Yves David
Date Jan. 5, 2015, 11:04 p.m.
Message ID <987ef74d8d01a70f4177.1420499046@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/7318/
State Accepted
Commit 987ef74d8d01a70f41772edaa22724179652aa10
Headers show

Comments

Pierre-Yves David - Jan. 5, 2015, 11:04 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1420498802 28800
#      Mon Jan 05 15:00:02 2015 -0800
# Node ID 987ef74d8d01a70f41772edaa22724179652aa10
# Parent  d944492445fa0d0b9c164336afab68127080a1f3
transaction: use the right location when cleaning up backup file (issue4479)

The location variable fetch from the loop and the one used to actually fetch it
mismatched. We fix the name to ensure file outside of store are cleaned up.
Matt Mackall - Jan. 5, 2015, 11:09 p.m.
On Mon, 2015-01-05 at 15:04 -0800, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1420498802 28800
> #      Mon Jan 05 15:00:02 2015 -0800
> # Node ID 987ef74d8d01a70f41772edaa22724179652aa10
> # Parent  d944492445fa0d0b9c164336afab68127080a1f3
> transaction: use the right location when cleaning up backup file (issue4479)

Queued for default, thanks.

Patch

diff --git a/mercurial/transaction.py b/mercurial/transaction.py
--- a/mercurial/transaction.py
+++ b/mercurial/transaction.py
@@ -395,11 +395,11 @@  class transaction(object):
             self.after()
         if self.opener.isfile(self.journal):
             self.opener.unlink(self.journal)
         if self.opener.isfile(self._backupjournal):
             self.opener.unlink(self._backupjournal)
-            for _l, _f, b, c in self._backupentries:
+            for l, _f, b, c in self._backupentries:
                 if l not in self._vfsmap and c:
                     self.report("couldn't remote %s: unknown cache location"
                                 "%s\n" % (b, l))
                     continue
                 vfs = self._vfsmap[l]