diff -r 45fa7b1c5d4c -r 9046a4f6a07c mercurial/util.py --- a/mercurial/util.py Thu Dec 27 23:55:40 2007 -0600 +++ b/mercurial/util.py Thu Dec 27 23:55:40 2007 -0600 @@ -1313,7 +1313,7 @@ # what we want. If the original file already exists, just copy # its mode. Otherwise, manually obey umask. try: - st_mode = os.lstat(name).st_mode + st_mode = os.lstat(name).st_mode & 0777 except OSError, inst: if inst.errno != errno.ENOENT: raise