Show More
@@ -1211,6 +1211,7 b' class dirstate(object):' | |||||
1211 |
|
1211 | |||
1212 | def savebackup(self, tr, suffix='', prefix=''): |
|
1212 | def savebackup(self, tr, suffix='', prefix=''): | |
1213 | '''Save current dirstate into backup file with suffix''' |
|
1213 | '''Save current dirstate into backup file with suffix''' | |
|
1214 | assert len(suffix) > 0 or len(prefix) > 0 | |||
1214 | filename = self._actualfilename(tr) |
|
1215 | filename = self._actualfilename(tr) | |
1215 |
|
1216 | |||
1216 | # use '_writedirstate' instead of 'write' to write changes certainly, |
|
1217 | # use '_writedirstate' instead of 'write' to write changes certainly, | |
@@ -1235,6 +1236,7 b' class dirstate(object):' | |||||
1235 |
|
1236 | |||
1236 | def restorebackup(self, tr, suffix='', prefix=''): |
|
1237 | def restorebackup(self, tr, suffix='', prefix=''): | |
1237 | '''Restore dirstate by backup file with suffix''' |
|
1238 | '''Restore dirstate by backup file with suffix''' | |
|
1239 | assert len(suffix) > 0 or len(prefix) > 0 | |||
1238 | # this "invalidate()" prevents "wlock.release()" from writing |
|
1240 | # this "invalidate()" prevents "wlock.release()" from writing | |
1239 | # changes of dirstate out after restoring from backup file |
|
1241 | # changes of dirstate out after restoring from backup file | |
1240 | self.invalidate() |
|
1242 | self.invalidate() | |
@@ -1244,5 +1246,6 b' class dirstate(object):' | |||||
1244 |
|
1246 | |||
1245 | def clearbackup(self, tr, suffix='', prefix=''): |
|
1247 | def clearbackup(self, tr, suffix='', prefix=''): | |
1246 | '''Clear backup file with suffix''' |
|
1248 | '''Clear backup file with suffix''' | |
|
1249 | assert len(suffix) > 0 or len(prefix) > 0 | |||
1247 | # using self._filename to avoid having "pending" in the backup filename |
|
1250 | # using self._filename to avoid having "pending" in the backup filename | |
1248 | self._opener.unlink(prefix + self._filename + suffix) |
|
1251 | self._opener.unlink(prefix + self._filename + suffix) |
General Comments 0
You need to be logged in to leave comments.
Login now