You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2012/02/29 03:46:09 UTC

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

Author: gstein
Date: Wed Feb 29 02:46:09 2012
New Revision: 1294950

URL: http://svn.apache.org/viewvc?rev=1294950&view=rev
Log:
There is no need for a lock, given it is only used by one method, and
the method is called only once (ie. the interlock is not needed)

* tools/server-side/svnpubsub/svnwcsub.py:
  (WorkingCopy.__init__): no need to create a lock
  (WorkingCopy._get_match): forget the lock

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=1294950&r1=1294949&r2=1294950&view=diff
==============================================================================
--- subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py (original)
+++ subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py Wed Feb 29 02:46:09 2012
@@ -141,7 +141,6 @@ class ProcSvnClient(SvnClient):
 
 class WorkingCopy(object):
     def __init__(self, bdec, path, url):
-        self.lock = threading.Lock()
         self.bdec = bdec
         self.path = path
         self.url = url
@@ -185,16 +184,12 @@ class WorkingCopy(object):
         defer.returnValue(rev)
 
     def _get_match(self):
-        self.lock.acquire()
-        try:
-            c = SvnClient(self.bdec.svnbin, self.path, self.url)
-            repos = c.get_repos()
-            url = c.get_url()
-            uuid = c.get_uuid()
-            match  = url[len(repos):]
-            return [match, url, repos, uuid]
-        finally:
-            self.lock.release()
+        c = SvnClient(self.bdec.svnbin, self.path, self.url)
+        repos = c.get_repos()
+        url = c.get_url()
+        uuid = c.get_uuid()
+        match  = url[len(repos):]
+        return [match, url, repos, uuid]
         
 
 class HTTPStream(HTTPClientFactory):