SF patch 959726:  sdist versus SVN
The disutils sdist command now ignores .svn directories.
diff --git a/Doc/dist/dist.tex b/Doc/dist/dist.tex
index da9341e..7b91809 100644
--- a/Doc/dist/dist.tex
+++ b/Doc/dist/dist.tex
@@ -1066,7 +1066,7 @@
 be included in the source distribution:
 \begin{itemize}
 \item all files in the Distutils ``build'' tree (default \file{build/})
-\item all files in directories named \file{RCS} or \file{CVS}
+\item all files in directories named \file{RCS}, \file{CVS} or \file{.svn}
 \end{itemize}
 Now we have our complete list of files, which is written to the manifest
 for future reference, and then used to build the source distribution
@@ -1098,8 +1098,8 @@
   included by the previous two steps, so it's important that the
   \code{prune} command in the manifest template comes after the
   \code{recursive-include} command
-\item exclude the entire \file{build} tree, and any \file{RCS} or
-  \file{CVS} directories
+\item exclude the entire \file{build} tree, and any \file{RCS},
+  \file{CVS} and \file{.svn} directories
 \end{enumerate}
 Just like in the setup script, file and directory names in the manifest
 template should always be slash-separated; the Distutils will take care
diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py
index 0a29add..7021496 100644
--- a/Lib/distutils/command/sdist.py
+++ b/Lib/distutils/command/sdist.py
@@ -347,14 +347,14 @@
           * the build tree (typically "build")
           * the release tree itself (only an issue if we ran "sdist"
             previously with --keep-temp, or it aborted)
-          * any RCS or CVS directories
+          * any RCS, CVS and .svn directories
         """
         build = self.get_finalized_command('build')
         base_dir = self.distribution.get_fullname()
 
         self.filelist.exclude_pattern(None, prefix=build.build_base)
         self.filelist.exclude_pattern(None, prefix=base_dir)
-        self.filelist.exclude_pattern(r'/(RCS|CVS)/.*', is_regex=1)
+        self.filelist.exclude_pattern(r'/(RCS|CVS|\.svn)/.*', is_regex=1)
 
 
     def write_manifest (self):
diff --git a/Misc/NEWS b/Misc/NEWS
index 45a172c..ab705af 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -149,7 +149,7 @@
   over a sequence.
 
 - Added a sorted() builtin function that returns a new sorted list
-  from any iterable.  
+  from any iterable.
 
 - CObjects are now mutable (on the C level) through PyCObject_SetVoidPtr.
 
@@ -197,9 +197,9 @@
 
 - buffer objects based on other objects no longer cache a pointer to
   the data and the data length.  Instead, the appropriate tp_as_buffer
-  method is called as necessary.  
+  method is called as necessary.
 
-- fixed: if a file is opened with an explicit buffer size >= 1, repeated 
+- fixed: if a file is opened with an explicit buffer size >= 1, repeated
   close() calls would attempt to free() the buffer already free()ed on
   the first call.
 
@@ -311,6 +311,10 @@
 Library
 -------
 
+- The distutils sdist command now ignores all .svn directories, in
+  addition to CVS and RCS directories.  .svn directories hold
+  administrative files for the Subversion source control system.
+
 - Added a new module: cookielib.  Automatic cookie handling for HTTP
   clients.  Also, support for cookielib has been added to urllib2, so
   urllib2.urlopen() can transparently handle cookies.