Comments
Patch
@@ -800,7 +800,7 @@
raise Abort(str(inst))
def copyfiles(src, dst, hardlink=None, progress=lambda t, pos: None,
- overwrite=True):
+ overwrite=True, ignore=None):
"""Copy a directory tree using hardlinks if possible."""
num = 0
@@ -812,7 +812,9 @@
else:
topic = _('copying')
- if os.path.isdir(src):
+ if ignore and src in ignore:
+ pass
+ elif os.path.isdir(src):
if not os.path.exists(dst):
os.mkdir(dst)
for name, kind in osutil.listdir(src):
@@ -822,7 +824,7 @@
if pos is not None:
return progress(t, pos + num)
hardlink, n = copyfiles(srcname, dstname, hardlink, progress=nprog,
- overwrite=overwrite)
+ overwrite=overwrite, ignore=ignore)
num += n
elif not overwrite and os.path.exists(dst):
pass