##// 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 if not c:
75 if not c:
76 raise
76 raise
77
77
78 opener.unlink(journal)
79 backuppath = "%s.backupfiles" % journal
78 backuppath = "%s.backupfiles" % journal
80 if opener.exists(backuppath):
79 if opener.exists(backuppath):
81 opener.unlink(backuppath)
80 opener.unlink(backuppath)
81 opener.unlink(journal)
82 try:
82 try:
83 for f in backupfiles:
83 for f in backupfiles:
84 if opener.exists(f):
84 if opener.exists(f):
@@ -427,10 +427,11 b' class transaction(object):'
427 self._writeundo()
427 self._writeundo()
428 if self.after:
428 if self.after:
429 self.after()
429 self.after()
430 if self.opener.isfile(self._backupjournal):
431 self.opener.unlink(self._backupjournal)
430 if self.opener.isfile(self.journal):
432 if self.opener.isfile(self.journal):
431 self.opener.unlink(self.journal)
433 self.opener.unlink(self.journal)
432 if self.opener.isfile(self._backupjournal):
434 if True:
433 self.opener.unlink(self._backupjournal)
434 for l, _f, b, c in self._backupentries:
435 for l, _f, b, c in self._backupentries:
435 if l not in self._vfsmap and c:
436 if l not in self._vfsmap and c:
436 self.report("couldn't remote %s: unknown cache location"
437 self.report("couldn't remote %s: unknown cache location"
@@ -497,10 +498,10 b' class transaction(object):'
497
498
498 try:
499 try:
499 if not self.entries and not self._backupentries:
500 if not self.entries and not self._backupentries:
501 if self._backupjournal:
502 self.opener.unlink(self._backupjournal)
500 if self.journal:
503 if self.journal:
501 self.opener.unlink(self.journal)
504 self.opener.unlink(self.journal)
502 if self._backupjournal:
503 self.opener.unlink(self._backupjournal)
504 return
505 return
505
506
506 self.report(_("transaction abort!\n"))
507 self.report(_("transaction abort!\n"))
General Comments 0
You need to be logged in to leave comments. Login now