##// END OF EJS Templates
transaction: reorder unlinking .hg/journal and .hg/journal.backupfiles...
FUJIWARA Katsunori -
r26753:96dd93de default
parent child Browse files
Show More
@@ -75,10 +75,10 b' def _playback(journal, report, opener, v'
75 75 if not c:
76 76 raise
77 77
78 opener.unlink(journal)
79 78 backuppath = "%s.backupfiles" % journal
80 79 if opener.exists(backuppath):
81 80 opener.unlink(backuppath)
81 opener.unlink(journal)
82 82 try:
83 83 for f in backupfiles:
84 84 if opener.exists(f):
@@ -427,10 +427,11 b' class transaction(object):'
427 427 self._writeundo()
428 428 if self.after:
429 429 self.after()
430 if self.opener.isfile(self._backupjournal):
431 self.opener.unlink(self._backupjournal)
430 432 if self.opener.isfile(self.journal):
431 433 self.opener.unlink(self.journal)
432 if self.opener.isfile(self._backupjournal):
433 self.opener.unlink(self._backupjournal)
434 if True:
434 435 for l, _f, b, c in self._backupentries:
435 436 if l not in self._vfsmap and c:
436 437 self.report("couldn't remote %s: unknown cache location"
@@ -497,10 +498,10 b' class transaction(object):'
497 498
498 499 try:
499 500 if not self.entries and not self._backupentries:
501 if self._backupjournal:
502 self.opener.unlink(self._backupjournal)
500 503 if self.journal:
501 504 self.opener.unlink(self.journal)
502 if self._backupjournal:
503 self.opener.unlink(self._backupjournal)
504 505 return
505 506
506 507 self.report(_("transaction abort!\n"))
General Comments 0
You need to be logged in to leave comments. Login now