# HG changeset patch # User FUJIWARA Katsunori # Date 1394294608 -32400 # Node ID 37cdf1fca1b27ae970c7d5ea9a6abf5f39d95c6f # Parent ef377f2e0ab9e6615b8d00119fc1b1c9c504844b localrepo: make "undofiles()" return list of tuples "(vfs, relative filename)" Before this patch, "localrepository.undofiles()" returns list of absolute filename of undo files. This patch makes it return list of tuples "(vfs, relative filename)" to access undo files via vfs. This patch also changes "repair.strip()", which is the only user of "localrepository.undofiles()". diff -r ef377f2e0ab9 -r 37cdf1fca1b2 mercurial/localrepo.py --- a/mercurial/localrepo.py Fri Apr 11 17:20:15 2014 -0400 +++ b/mercurial/localrepo.py Sun Mar 09 01:03:28 2014 +0900 @@ -862,7 +862,7 @@ (self.svfs, 'journal.phaseroots')) def undofiles(self): - return [vfs.join(undoname(x)) for vfs, x in self._journalfiles()] + return [(vfs, undoname(x)) for vfs, x in self._journalfiles()] def _writejournal(self, desc): self.opener.write("journal.dirstate", diff -r ef377f2e0ab9 -r 37cdf1fca1b2 mercurial/repair.py --- a/mercurial/repair.py Fri Apr 11 17:20:15 2014 -0400 +++ b/mercurial/repair.py Sun Mar 09 01:03:28 2014 +0900 @@ -157,12 +157,13 @@ os.unlink(chgrpfile) # remove undo files - for undofile in repo.undofiles(): + for undovfs, undofile in repo.undofiles(): try: - os.unlink(undofile) + undovfs.unlink(undofile) except OSError, e: if e.errno != errno.ENOENT: - ui.warn(_('error removing %s: %s\n') % (undofile, str(e))) + ui.warn(_('error removing %s: %s\n') % + (undovfs.join(undofile), str(e))) for m in updatebm: bm[m] = repo[newbmtarget].node()