[Svnmerge] [PATCH] svnmerge.py: Don't retrieve props twice for unchanged properties

David James djames at collab.net
Thu Mar 2 13:51:05 PST 2006


This patch improves the performance of analyze_revs by avoiding the
need for getting props twice when a property is unchanged.

[[[
* contrib/client-side/svnmerge.py
  (analyze_revs): Don't retrieve props twice for unchanged properties.
]]]
--
David James -- http://www.cs.toronto.edu/~james
-------------- next part --------------
Index: svnmerge.py
===================================================================
--- svnmerge.py	(revision 18692)
+++ svnmerge.py	(working copy)
@@ -697,18 +697,16 @@
         report("checking for reflected changes in %d revision(s)"
                % len(prop_changed_revs))
 
-        previous_rev = None
         previous_props = None
 
         for rev in prop_changed_revs:
-            if rev-1 == previous_rev:
+            if previous_props:
                 old_props = previous_props
             else:
                 old_props = get_revlist_prop(url, opts["prop"], rev-1)
 
             new_props = get_revlist_prop(url, opts["prop"], rev)
             previous_props = new_props
-            previous_rev = rev
 
             old_revisions = old_props.get(target_dir)
             new_revisions = new_props.get(target_dir)



More information about the Svnmerge mailing list