comparison mercurial/util.py @ 13099:a08b49d2f116

record: move copystat() hack out of util.copyfile() and into record b2410ed2cbe9 updated copyfile to also copy over atimes and mtimes. That behavior is specifically to trick editors into thinking files that hg record has modified haven't changed. We don't really care about preserving times in the general case.
author Brodie Rao <brodie@bitheap.org>
date Tue, 07 Dec 2010 20:03:05 +1100
parents f7d6750dcd01
children 039a964dbbb3
comparison
equal deleted inserted replaced
13098:f7d6750dcd01 13099:a08b49d2f116
450 pass 450 pass
451 os.symlink(os.readlink(src), dest) 451 os.symlink(os.readlink(src), dest)
452 else: 452 else:
453 try: 453 try:
454 shutil.copyfile(src, dest) 454 shutil.copyfile(src, dest)
455 shutil.copystat(src, dest) 455 shutil.copymode(src, dest)
456 except shutil.Error, inst: 456 except shutil.Error, inst:
457 raise Abort(str(inst)) 457 raise Abort(str(inst))
458 458
459 def copyfiles(src, dst, hardlink=None): 459 def copyfiles(src, dst, hardlink=None):
460 """Copy a directory tree using hardlinks if possible""" 460 """Copy a directory tree using hardlinks if possible"""