You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/01/14 02:26:05 UTC

svn commit: r1432779 - /subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py

Author: breser
Date: Mon Jan 14 01:26:05 2013
New Revision: 1432779

URL: http://svn.apache.org/viewvc?rev=1432779&view=rev
Log:
svnwcsub.py: Improve the wc detection code.  Follow-up to r1429718.

* tools/server-side/svnpubsub/svnwcsub.py
  (WorkingCopy._get_match): Use os.path.join to join paths don't assume / is the path
    separator. Check for an empty .svn dir rather than an empty wc dir since the test
    is redundent otherwise.

Modified:
    subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py

Modified: subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py?rev=1432779&r1=1432778&r2=1432779&view=diff
==============================================================================
--- subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py (original)
+++ subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py Mon Jan 14 01:26:05 2013
@@ -147,7 +147,8 @@ class WorkingCopy(object):
 
     def _get_match(self, svnbin, env):
         ### quick little hack to auto-checkout missing working copies
-        if not os.path.isdir(self.path + "/.svn") or is_emptydir(self.path):
+        dotsvn = os.path.join(self.path, ".svn")
+        if not os.path.isdir(dotsvn) or is_emptydir(dotsvn):
             logging.info("autopopulate %s from %s" % (self.path, self.url))
             subprocess.check_call([svnbin, 'co', '-q',
                                    '--force',