diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -451,7 +451,7 @@ def copyfiles(src, dst, hardlink=None): for name, kind in osutil.listdir(src): srcname = os.path.join(src, name) dstname = os.path.join(dst, name) - copyfiles(srcname, dstname, hardlink) + hardlink = copyfiles(srcname, dstname, hardlink) else: if hardlink: try: @@ -462,6 +462,8 @@ def copyfiles(src, dst, hardlink=None): else: shutil.copy(src, dst) + return hardlink + class path_auditor(object): '''ensure that a filesystem path contains no banned components. the following properties of a path are checked: