Mercurial > hg
comparison mercurial/scmutil.py @ 30417:854190becacb
merge with stable
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 16 Nov 2016 23:29:28 -0500 |
parents | 365812902904 e0ff47999b13 |
children | 4338f87dbf6f |
comparison
equal
deleted
inserted
replaced
30416:c27614f2dec1 | 30417:854190becacb |
---|---|
390 if oldstat and oldstat.stat: | 390 if oldstat and oldstat.stat: |
391 ret = util.rename(self.join(src), dstpath) | 391 ret = util.rename(self.join(src), dstpath) |
392 newstat = util.filestat(dstpath) | 392 newstat = util.filestat(dstpath) |
393 if newstat.isambig(oldstat): | 393 if newstat.isambig(oldstat): |
394 # stat of renamed file is ambiguous to original one | 394 # stat of renamed file is ambiguous to original one |
395 advanced = (oldstat.stat.st_mtime + 1) & 0x7fffffff | 395 newstat.avoidambig(dstpath, oldstat) |
396 os.utime(dstpath, (advanced, advanced)) | |
397 return ret | 396 return ret |
398 return util.rename(self.join(src), dstpath) | 397 return util.rename(self.join(src), dstpath) |
399 | 398 |
400 def readlink(self, path): | 399 def readlink(self, path): |
401 return os.readlink(self.join(path)) | 400 return os.readlink(self.join(path)) |
1458 oldstat = self._oldstat | 1457 oldstat = self._oldstat |
1459 if oldstat.stat: | 1458 if oldstat.stat: |
1460 newstat = util.filestat(self._origfh.name) | 1459 newstat = util.filestat(self._origfh.name) |
1461 if newstat.isambig(oldstat): | 1460 if newstat.isambig(oldstat): |
1462 # stat of changed file is ambiguous to original one | 1461 # stat of changed file is ambiguous to original one |
1463 advanced = (oldstat.stat.st_mtime + 1) & 0x7fffffff | 1462 newstat.avoidambig(self._origfh.name, oldstat) |
1464 os.utime(self._origfh.name, (advanced, advanced)) | |
1465 | 1463 |
1466 def __exit__(self, exc_type, exc_value, exc_tb): | 1464 def __exit__(self, exc_type, exc_value, exc_tb): |
1467 self._origfh.__exit__(exc_type, exc_value, exc_tb) | 1465 self._origfh.__exit__(exc_type, exc_value, exc_tb) |
1468 self._checkambig() | 1466 self._checkambig() |
1469 | 1467 |