[Zope-dev] copyzopeskel.py patch

Dale Hirt dale at sbcltd.com
Thu May 12 15:27:23 EDT 2005


Hi all,

Wonderful product, more than appreciate all the hard work that has been put into Zope and all the various products that are out there.

Came across a small issue, and wrote a quick patch for it.  Didn't know who to send it to, so I thought I'd send it here.

When creating a new zope instance, using mkzopeinstance.py, and having my files under Subversion, copyzopeskel.py also took across my .svn directories.  So I created the small patch below to stop that.  Makes it a little more flexible for adding in new types, and since you've switched to Subversion anyways, makes sense to add it in there.

Again, thanks for your time,

Dale Hirt


Index: copyzopeskel.py
===================================================================
--- copyzopeskel.py	(revision 30342)
+++ copyzopeskel.py	(working copy)
@@ -186,12 +186,12 @@
         print >>sys.stderr, msg
         sys.exit(1)
 
-CVS = os.path.normcase("CVS")
+CVS_DIRS = [os.path.normcase("CVS"), os.path.normcase(".svn")]
 
 def copydir((targetdir, replacements, uid, gid), sourcedir, names):
     # Don't recurse into CVS directories:
     for name in names[:]:
-        if os.path.normcase(name) == CVS:
+        if os.path.normcase(name) in CVS_DIRS:
             names.remove(name)
         elif os.path.isfile(os.path.join(sourcedir, name)):
             # Copy the file:


More information about the Zope-Dev mailing list