Rev 2068: Avoid extra history walk when importing all revisions. in http://people.samba.org/bzr/jelmer/bzr-svn/0.5

Jelmer Vernooij jelmer at samba.org
Mon Nov 24 22:52:34 GMT 2008


At http://people.samba.org/bzr/jelmer/bzr-svn/0.5

------------------------------------------------------------
revno: 2068
revision-id: jelmer at samba.org-20081124225231-c2hczk4le71eeoja
parent: jelmer at samba.org-20081124222416-7za35il8sx2nj1ix
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.5
timestamp: Mon 2008-11-24 23:52:31 +0100
message:
  Avoid extra history walk when importing all revisions.
modified:
  convert.py                     svn2bzr.py-20051018015439-cb4563bff29e632d
  fetch.py                       fetch.py-20060625004942-x2lfaib8ra707a8p-1
=== modified file 'convert.py'
--- a/convert.py	2008-11-24 22:24:16 +0000
+++ b/convert.py	2008-11-24 22:52:31 +0000
@@ -229,13 +229,13 @@
         if create_shared_repo:
             inter = InterRepository.get(source_repos, target_repos)
 
-            if all:
+            if (target_repos.is_shared() and 
+                  getattr(inter, '_supports_revmetas', None) and 
+                  inter._supports_revmetas):
+                revmetas.reverse()
+                inter.fetch(needed=revmetas)
+            elif all:
                 inter.fetch()
-            elif (target_repos.is_shared() and 
-                  getattr(inter, '_supports_branches', None) and 
-                  inter._supports_branches):
-                revmetas.reverse()
-                inter.fetch(needed=revmetas, mapping=source_repos.get_mapping())
 
         if not keep:
             remove_branches(to_transport, removed_branches)

=== modified file 'fetch.py'
--- a/fetch.py	2008-11-24 22:24:16 +0000
+++ b/fetch.py	2008-11-24 22:52:31 +0000
@@ -745,7 +745,7 @@
 
     _matching_repo_format = SvnRepositoryFormat()
 
-    _supports_branches = True
+    _supports_revmetas = True
 
     @staticmethod
     def _get_repo_format_to_test():




More information about the bazaar-commits mailing list