changeset 37088 | 08890706366e |
parent 37084 | f0b6fbea00cf |
child 37103 | be3f33f5e232 |
--- a/mercurial/cmdutil.py Thu Mar 22 22:58:31 2018 -0400 +++ b/mercurial/cmdutil.py Thu Mar 08 11:44:03 2018 -0800 @@ -1192,7 +1192,9 @@ os.rename(src, tmp) os.rename(tmp, target) else: - util.copyfile(src, target) + # Preserve stat info on renames, not on copies; this matches + # Linux CLI behavior. + util.copyfile(src, target, copystat=rename) srcexists = True except IOError as inst: if inst.errno == errno.ENOENT: