--- a/mercurial/scmutil.py Sat Nov 12 03:06:07 2016 +0000
+++ b/mercurial/scmutil.py Wed Nov 16 23:29:28 2016 -0500
@@ -392,8 +392,7 @@
newstat = util.filestat(dstpath)
if newstat.isambig(oldstat):
# stat of renamed file is ambiguous to original one
- advanced = (oldstat.stat.st_mtime + 1) & 0x7fffffff
- os.utime(dstpath, (advanced, advanced))
+ newstat.avoidambig(dstpath, oldstat)
return ret
return util.rename(self.join(src), dstpath)
@@ -1460,8 +1459,7 @@
newstat = util.filestat(self._origfh.name)
if newstat.isambig(oldstat):
# stat of changed file is ambiguous to original one
- advanced = (oldstat.stat.st_mtime + 1) & 0x7fffffff
- os.utime(self._origfh.name, (advanced, advanced))
+ newstat.avoidambig(self._origfh.name, oldstat)
def __exit__(self, exc_type, exc_value, exc_tb):
self._origfh.__exit__(exc_type, exc_value, exc_tb)