Mercurial > hg
diff mercurial/dirstate.py @ 29137:d115cbf5980b
dirstate: make backup methods public
They are called from outside of dirstate anyway and I want the localrepo to
use them too.
author | Mateusz Kwapich <mitrandir@fb.com> |
---|---|
date | Thu, 05 May 2016 17:06:54 -0700 |
parents | ff4cc44364e3 |
children | 2e40fada340b |
line wrap: on
line diff
--- a/mercurial/dirstate.py Fri May 06 08:45:56 2016 -0500 +++ b/mercurial/dirstate.py Thu May 05 17:06:54 2016 -0700 @@ -1205,7 +1205,7 @@ else: return self._filename - def _savebackup(self, tr, suffix): + def savebackup(self, tr, suffix): '''Save current dirstate into backup file with suffix''' filename = self._actualfilename(tr) @@ -1228,7 +1228,7 @@ self._opener.write(filename + suffix, self._opener.tryread(filename)) - def _restorebackup(self, tr, suffix): + def restorebackup(self, tr, suffix): '''Restore dirstate by backup file with suffix''' # this "invalidate()" prevents "wlock.release()" from writing # changes of dirstate out after restoring from backup file @@ -1236,7 +1236,7 @@ filename = self._actualfilename(tr) self._opener.rename(filename + suffix, filename) - def _clearbackup(self, tr, suffix): + def clearbackup(self, tr, suffix): '''Clear backup file with suffix''' filename = self._actualfilename(tr) self._opener.unlink(filename + suffix)