##// END OF EJS Templates
dirstate: clean up when restoring identical backups...
Mark Thomas -
r34941:c2b30348 stable
parent child Browse files
Show More
@@ -1187,7 +1187,11 b' class dirstate(object):'
1187 # changes of dirstate out after restoring from backup file
1187 # changes of dirstate out after restoring from backup file
1188 self.invalidate()
1188 self.invalidate()
1189 filename = self._actualfilename(tr)
1189 filename = self._actualfilename(tr)
1190 self._opener.rename(backupname, filename, checkambig=True)
1190 o = self._opener
1191 if util.samefile(o.join(backupname), o.join(filename)):
1192 o.unlink(backupname)
1193 else:
1194 o.rename(backupname, filename, checkambig=True)
1191
1195
1192 def clearbackup(self, tr, backupname):
1196 def clearbackup(self, tr, backupname):
1193 '''Clear backup file'''
1197 '''Clear backup file'''
@@ -11,9 +11,8 b' Try to import an empty patch'
11 abort: stdin: no diffs found
11 abort: stdin: no diffs found
12 [255]
12 [255]
13
13
14 A dirstate backup is left behind
14 No dirstate backups are left behind
15
15
16 $ ls .hg/dirstate* | sort
16 $ ls .hg/dirstate* | sort
17 .hg/dirstate
17 .hg/dirstate
18 .hg/dirstate.backup.import.* (glob)
19
18
General Comments 0
You need to be logged in to leave comments. Login now