##// END OF EJS Templates
localrepo: use "vfs.rename()" instead of "util.rename()"...
FUJIWARA Katsunori -
r18952:8086b530 default
parent child Browse files
Show More
@@ -811,7 +811,7 class localrepository(object):
811 _("abandoned transaction found - run hg recover"))
811 _("abandoned transaction found - run hg recover"))
812
812
813 self._writejournal(desc)
813 self._writejournal(desc)
814 renames = [(x, undoname(x)) for x in self._journalfiles()]
814 renames = [(vfs, x, undoname(x)) for vfs, x in self._journalfiles()]
815
815
816 tr = transaction.transaction(self.ui.warn, self.sopener,
816 tr = transaction.transaction(self.ui.warn, self.sopener,
817 self.sjoin("journal"),
817 self.sjoin("journal"),
@@ -821,13 +821,15 class localrepository(object):
821 return tr
821 return tr
822
822
823 def _journalfiles(self):
823 def _journalfiles(self):
824 return (self.sjoin('journal'), self.join('journal.dirstate'),
824 return ((self.svfs, 'journal'),
825 self.join('journal.branch'), self.join('journal.desc'),
825 (self.vfs, 'journal.dirstate'),
826 self.join('journal.bookmarks'),
826 (self.vfs, 'journal.branch'),
827 self.sjoin('journal.phaseroots'))
827 (self.vfs, 'journal.desc'),
828 (self.vfs, 'journal.bookmarks'),
829 (self.svfs, 'journal.phaseroots'))
828
830
829 def undofiles(self):
831 def undofiles(self):
830 return [undoname(x) for x in self._journalfiles()]
832 return [vfs.join(undoname(x)) for vfs, x in self._journalfiles()]
831
833
832 def _writejournal(self, desc):
834 def _writejournal(self, desc):
833 self.opener.write("journal.dirstate",
835 self.opener.write("journal.dirstate",
@@ -2575,9 +2577,9 class localrepository(object):
2575 def aftertrans(files):
2577 def aftertrans(files):
2576 renamefiles = [tuple(t) for t in files]
2578 renamefiles = [tuple(t) for t in files]
2577 def a():
2579 def a():
2578 for src, dest in renamefiles:
2580 for vfs, src, dest in renamefiles:
2579 try:
2581 try:
2580 util.rename(src, dest)
2582 vfs.rename(src, dest)
2581 except OSError: # journal file does not yet exist
2583 except OSError: # journal file does not yet exist
2582 pass
2584 pass
2583 return a
2585 return a
General Comments 0
You need to be logged in to leave comments. Login now