subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1625709 - /subversion/trunk/tools/server-side/svnpredumpfilter.py
Date Wed, 17 Sep 2014 17:18:58 GMT
Author: stsp
Date: Wed Sep 17 17:18:57 2014
New Revision: 1625709

URL: http://svn.apache.org/r1625709
Log:
In svnpredumpfilter.py, store copies as a set of tuples instead of as a dict.

* tools/server-side/svnpredumpfilter.py
  (handle_changes): Iterate the set.
  (svn_log_stream_get_dependencies): Create path_copies a set and use the
   set's add() method to add copy-tuples.

Modified:
    subversion/trunk/tools/server-side/svnpredumpfilter.py

Modified: subversion/trunk/tools/server-side/svnpredumpfilter.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/server-side/svnpredumpfilter.py?rev=1625709&r1=1625708&r2=1625709&view=diff
==============================================================================
--- subversion/trunk/tools/server-side/svnpredumpfilter.py (original)
+++ subversion/trunk/tools/server-side/svnpredumpfilter.py Wed Sep 17 17:18:57 2014
@@ -127,7 +127,7 @@ class DependencyTracker:
     return False
 
   def handle_changes(self, path_copies):
-    for path, copyfrom_path in path_copies.items():
+    for path, copyfrom_path in path_copies:
       if self.path_included(path) and copyfrom_path:
         if not self.path_included(copyfrom_path):
           self.dependent_paths.append(copyfrom_path)
@@ -151,7 +151,7 @@ def svn_log_stream_get_dependencies(stre
   line_buf = None
   last_revision = 0
   eof = False
-  path_copies = {}
+  path_copies = set()
   found_changed_path = False
 
   while not eof:
@@ -198,8 +198,8 @@ def svn_log_stream_get_dependencies(stre
         match = copy_action_re.search(line)
         if match:
           found_changed_path = True
-          path_copies[sanitize_path(match.group(1))] = \
-            sanitize_path(match.group(2))
+          path_copies.add((sanitize_path(match.group(1)),
+                           sanitize_path(match.group(2))))
         elif action_re.search(line):
           found_changed_path = True
         else:



Mime
View raw message