Only warn about unknown svn: or bzr: properties, not just any random property.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 19 Mar 2007 13:27:10 +0000 (14:27 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 19 Mar 2007 13:27:10 +0000 (14:27 +0100)
fetch.py
repository.py
tree.py

index 3cf8a03eba268bb23876b09cc8b3b34aea896ce4..6693cc6fcb67668f3419682d419f5a1986881187 100644 (file)
--- a/fetch.py
+++ b/fetch.py
@@ -32,7 +32,8 @@ import svn.core, svn.ra
 
 from fileids import generate_file_id
 from repository import (SvnRepository, SVN_PROP_BZR_MERGE, SVN_PROP_SVK_MERGE,
-                SVN_PROP_BZR_REVPROP_PREFIX, SvnRepositoryFormat)
+                SVN_PROP_BZR_PREFIX, SVN_PROP_BZR_REVPROP_PREFIX, 
+                SvnRepositoryFormat)
 from tree import apply_txdelta_handler
 
 
@@ -169,7 +170,8 @@ class RevisionBuildEditor(svn.delta.Editor):
             pass
         elif name.startswith(svn.core.SVN_PROP_WC_PREFIX):
             pass
-        else:
+        elif (name.startswith(svn.core.SVN_PROP_PREFIX) or
+              name.startswith(SVN_PROP_BZR_PREFIX)):
             mutter('unsupported file property %r' % name)
 
     def change_file_prop(self, id, name, value, pool):
@@ -191,7 +193,8 @@ class RevisionBuildEditor(svn.delta.Editor):
             pass
         elif name.startswith(svn.core.SVN_PROP_WC_PREFIX):
             pass
-        else:
+        elif (name.startswith(svn.core.SVN_PROP_PREFIX) or
+              name.startswith(SVN_PROP_BZR_PREFIX)):
             mutter('unsupported file property %r' % name)
 
     def add_file(self, path, parent_id, copyfrom_path, copyfrom_revnum, baton):
index 45189329c8adcca364e58a06e911c734b3e35c9c..5e4db9e4183944953f36f5e16d05828b1f083896 100644 (file)
@@ -47,6 +47,7 @@ import logwalker
 from tree import SvnRevisionTree
 
 MAPPING_VERSION = 2
+SVN_PROP_BZR_PREFIX = 'bzr:'
 REVISION_ID_PREFIX = "svn-v%d:" % MAPPING_VERSION
 SVN_PROP_BZR_MERGE = 'bzr:merge'
 SVN_PROP_SVK_MERGE = 'svk:merge'
diff --git a/tree.py b/tree.py
index 91f89d9752a02bdeb872289a70dcec0d87874995..61ec2c5636a8891b248be9c576c1886125df1742 100644 (file)
--- a/tree.py
+++ b/tree.py
@@ -102,7 +102,8 @@ class TreeBuildEditor(svn.delta.Editor):
 
     def change_dir_prop(self, id, name, value, pool):
         from repository import (SVN_PROP_BZR_MERGE, SVN_PROP_SVK_MERGE, 
-                        SVN_PROP_BZR_REVPROP_PREFIX, SVN_PROP_BZR_FILEIDS)
+                        SVN_PROP_BZR_PREFIX, SVN_PROP_BZR_REVPROP_PREFIX, 
+                        SVN_PROP_BZR_FILEIDS)
 
         if name == svn.core.SVN_PROP_ENTRY_COMMITTED_REV:
             self.dir_revnum[id] = int(value)
@@ -126,10 +127,13 @@ class TreeBuildEditor(svn.delta.Editor):
             pass
         elif name.startswith(SVN_PROP_BZR_REVPROP_PREFIX):
             pass
-        else:
+        elif (name.startswith(svn.core.SVN_PROP_PREFIX) or
+              name.startswith(SVN_PROP_BZR_PREFIX)):
             mutter('unsupported dir property %r' % name)
 
     def change_file_prop(self, id, name, value, pool):
+        from repository import SVN_PROP_BZR_PREFIX
+
         if name == svn.core.SVN_PROP_EXECUTABLE:
             self.is_executable = (value != None)
         elif name == svn.core.SVN_PROP_SPECIAL:
@@ -144,7 +148,8 @@ class TreeBuildEditor(svn.delta.Editor):
             pass
         elif name.startswith(svn.core.SVN_PROP_WC_PREFIX):
             pass
-        else:
+        elif (name.startswith(svn.core.SVN_PROP_PREFIX) or
+              name.startswith(SVN_PROP_BZR_PREFIX)):
             mutter('unsupported file property %r' % name)
 
     def add_file(self, path, parent_id, copyfrom_path, copyfrom_revnum, baton):