subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1432779 - /subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py
Date Mon, 14 Jan 2013 01:26:05 GMT
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',



Mime
View raw message