Markus Zapke-Gründemann committed c0a4850

copytree wasn't using exclude_path on recursion.

Comments (0)

Files changed (2)

                 linkto = os.readlink(srcname)
                 os.symlink(linkto, dstname)
             elif os.path.isdir(srcname):
-                copytree(srcname, dstname, symlinks, ignore)
+                copytree(srcname, dstname, symlinks, ignore, exclude_path)
                 shutil.copy2(srcname, dstname)
         except (IOError, os.error), why:


   adding doc/spam/index
   adding src/eggs/calc
-Perform an import ignoring the proj/doc/eggs and the proj/src/spam directory:
+Adding another source directory at a deeper level to be ignored:
-  $ hg importfs r5 proj --exclude-path doc/eggs --exclude-path src/spam
+  $ mkdir proj/src/eggs/db
+  $ echo "SELECT * FROM table" > proj/src/eggs/db/sql
+Perform an import ignoring the proj/doc/eggs, the proj/src/spam and the
+src/eggs/db directories:
+  $ hg importfs r5 proj --exclude-path doc/eggs --exclude-path src/spam --exclude-path src/eggs/db
   created repository $TESTTMP/r5
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   adding doc/index