Rev 1763: Split determination of property diffs to separate function. in file:///data/jelmer/bzr-svn/trunk/

Jelmer Vernooij jelmer at samba.org
Mon Sep 1 21:37:50 BST 2008


At file:///data/jelmer/bzr-svn/trunk/

------------------------------------------------------------
revno: 1763
revision-id: jelmer at samba.org-20080901203749-buhe9rz2o97k94by
parent: jelmer at samba.org-20080901200110-2batz3cg8enf6i7s
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Mon 2008-09-01 22:37:49 +0200
message:
  Split determination of property diffs to separate function.
modified:
  branchprops.py                 branchprops.py-20061223204623-80lvm7pjrpsgk0dd-1
  properties.py                  util.py-20080502170127-o220e9py99vt69s6-1
=== modified file 'branchprops.py'
--- a/branchprops.py	2008-09-01 20:01:10 +0000
+++ b/branchprops.py	2008-09-01 20:37:49 +0000
@@ -18,7 +18,7 @@
 
 from bzrlib.errors import NoSuchRevision
 
-from bzrlib.plugins.svn import logwalker
+from bzrlib.plugins.svn import logwalker, properties
 from bzrlib.plugins.svn.core import SubversionException
 from bzrlib.plugins.svn.errors import ERR_FS_NO_SUCH_REVISION
 
@@ -80,8 +80,4 @@
         else:
             assert isinstance(prev_path, str)
             previous = self.get_properties(prev_path, prev_revnum)
-        ret = {}
-        for key, val in current.items():
-            if previous.get(key) != val:
-                ret[key] = val
-        return ret
+        return properties.diff(current, previous)

=== modified file 'properties.py'
--- a/properties.py	2008-08-23 17:55:26 +0000
+++ b/properties.py	2008-09-01 20:37:49 +0000
@@ -213,3 +213,10 @@
 PROP_REVISION_LOG = "svn:log"
 PROP_REVISION_AUTHOR = "svn:author"
 PROP_REVISION_DATE = "svn:date"
+
+def diff(current, previous):
+    ret = {}
+    for key, val in current.items():
+        if previous.get(key) != val:
+            ret[key] = val
+    return ret




More information about the bazaar-commits mailing list