Rev 631: Add stubs for hybrid mapping. in file:///data/jelmer/bzr-svn/revprops/

Jelmer Vernooij jelmer at samba.org
Sat Feb 2 21:14:28 GMT 2008


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

------------------------------------------------------------
revno: 631
revision-id:jelmer at samba.org-20080202211425-zhu54c7m9c5wtrbb
parent: jelmer at samba.org-20080202204104-40slrzfp4dqs0vm8
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: revprops
timestamp: Sat 2008-02-02 22:14:25 +0100
message:
  Add stubs for hybrid mapping.
modified:
  mapping.py                     mapping.py-20080128201303-6cp01phc0dmc0kiv-1
=== modified file 'mapping.py'
--- a/mapping.py	2008-02-02 20:41:04 +0000
+++ b/mapping.py	2008-02-02 21:14:25 +0000
@@ -327,12 +327,7 @@
         :param revprops: Subversion revision properties
         :param fileprops: File properties
         """
-        if fileids != {}:
-            file_id_text = generate_fileid_property(fileids)
-            revprops[SVN_REVPROP_BZR_FILEIDS] = file_id_text
-            fileprops[SVN_PROP_BZR_FILEIDS] = file_id_text
-        else:
-            fileprops[SVN_PROP_BZR_FILEIDS] = ""
+        raise NotImplementedError(self.export_fileid_map)
 
     @staticmethod
     def export_revision(branch_root, timestamp, timezone, committer, revprops, revision_id, revno, merges, 
@@ -449,7 +444,6 @@
 
     @staticmethod
     def import_revision(svn_revprops, get_branch_file_property, rev):
-        parse_svn_revprops(svn_revprops, rev)
         parse_revision_metadata(
                 get_branch_file_property(SVN_PROP_BZR_REVISION_INFO, ""), rev)
 
@@ -559,8 +553,17 @@
             mutter(str(e))
             return (None, None)
 
-
-class BzrSvnMappingv4(BzrSvnMappingv3):
+    @staticmethod
+    def export_fileid_map(fileids, revprops, fileprops):
+        if fileids != {}:
+            file_id_text = generate_fileid_property(fileids)
+            fileprops[SVN_PROP_BZR_FILEIDS] = file_id_text
+        else:
+            fileprops[SVN_PROP_BZR_FILEIDS] = ""
+
+
+
+class BzrSvnMappingv4:
     @staticmethod
     def import_revision(svn_revprops, get_branch_file_property, rev):
         parse_svn_revprops(svn_revprops, rev)
@@ -612,6 +615,30 @@
             svn_revprops[SVN_REVPROP_BZR_MERGE] = "".join([x+"\n" for x in merges])
         svn_revprops[SVN_REVPROP_BZR_REVNO] = str(revno)
 
+    @staticmethod
+    def export_fileid_map(fileids, revprops, fileprops):
+        revprops[SVN_REVPROP_BZR_FILEIDS] = generate_fileid_property(fileids)
+
+    @staticmethod
+    def import_revision(svn_revprops, get_branch_file_property, rev):
+        parse_svn_revprops(svn_revprops, rev)
+
+    @staticmethod
+    def get_rhs_ancestors(revprops, get_branch_file_property, scheme):
+        raise NotImplementedError(self.get_rhs_ancestors)
+
+    @staticmethod
+    def parse_revision_id(revid):
+        raise NotImplementedError(self.parse_revision_id)
+
+    @staticmethod
+    def generate_revision_id(uuid, revnum, path, scheme):
+        raise NotImplementedError(self.generate_revision_id)
+
+    @staticmethod
+    def generate_file_id(uuid, revnum, branch, inv_path):
+        raise NotImplementedError(self.generate_file_id)
+
 
 class BzrSvnMappingHybrid:
     @classmethod
@@ -643,6 +670,28 @@
         BzrSvnMappingv4.export_revision(branch_root, timestamp, timezone, committer, revprops, revision_id,
                 revno, merges, get_branch_file_property, scheme)
 
+    @staticmethod
+    def parse_revision_id(revid):
+        raise NotImplementedError(self.parse_revision_id)
+
+    @staticmethod
+    def generate_revision_id(uuid, revnum, path, scheme):
+        raise NotImplementedError(self.generate_revision_id)
+
+    @staticmethod
+    def generate_file_id(uuid, revnum, branch, inv_path):
+        raise NotImplementedError(self.generate_file_id)
+
+    @staticmethod
+    def export_fileid_map(fileids, revprops, fileprops):
+        BzrSvnMappingv3.export_fileid_map(fileids, revprops, fileprops)
+        BzrSvnMappingv4.export_fileid_map(fileids, revprops, fileprops)
+
+    @staticmethod
+    def import_revision(svn_revprops, get_branch_file_property, rev):
+        BzrSvnMappingv3.import_revision(svn_revprops, get_branch_file_property, rev)
+        BzrSvnMappingv4.import_revision(svn_revprops, get_branch_file_property, rev)
+
 
 class BzrSvnMappingRegistry(registry.Registry):
     def register(self, key, factory, help):




More information about the bazaar-commits mailing list