Rev 1908: Add to_revnum argument. in file:///data/jelmer/bzr-svn/trunk/

Jelmer Vernooij jelmer at samba.org
Thu Sep 11 19:38:15 BST 2008


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

------------------------------------------------------------
revno: 1908
revision-id: jelmer at samba.org-20080911183735-c11cmhkph0bfvnor
parent: jelmer at samba.org-20080911175650-168gua9dwkhe68nr
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Thu 2008-09-11 20:37:35 +0200
message:
  Add to_revnum argument.
modified:
  __init__.py                    __init__.py-20051008155114-eae558e6cf149e1d
  convert.py                     svn2bzr.py-20051018015439-cb4563bff29e632d
=== modified file '__init__.py'
--- a/__init__.py	2008-09-10 17:40:32 +0000
+++ b/__init__.py	2008-09-11 18:37:35 +0000
@@ -252,10 +252,12 @@
             prefix = urlutils.relative_url(from_repos.base, from_location)
             prefix = prefix.encode("utf-8")
 
+        to_revnum = from_repos.get_latest_revnum()
+
         from_repos.lock_read()
         try:
             (guessed_overall_layout, _) = repository_guess_layout(from_repos, 
-                from_repos.get_latest_revnum())
+                to_revnum)
 
             if prefix is not None:
                 prefix = prefix.strip("/") + "/"
@@ -283,7 +285,8 @@
             convert_repository(from_repos, to_location, layout, 
                                not standalone, trees, all, 
                                filter_branch=filter_branch,
-                               keep=keep, incremental=incremental)
+                               keep=keep, incremental=incremental,
+                               to_revnum=to_revnum)
 
             if tmp_repos is not None:
                 osutils.rmtree(tmp_repos)

=== modified file 'convert.py'
--- a/convert.py	2008-09-07 22:15:06 +0000
+++ b/convert.py	2008-09-11 18:37:35 +0000
@@ -118,7 +118,7 @@
 def convert_repository(source_repos, output_url, layout=None,
                        create_shared_repo=True, working_trees=False, all=False,
                        format=None, filter_branch=None, keep=False, 
-                       incremental=False):
+                       incremental=False, to_revnum=None):
     """Convert a Subversion repository and its' branches to a 
     Bazaar repository.
 
@@ -170,7 +170,8 @@
         else:
             from_revnum = 0
         project = None
-        to_revnum = source_repos.get_latest_revnum()
+        if to_revnum is None:
+            to_revnum = source_repos.get_latest_revnum()
         # Searching history for touched and removed branches is more expensive than 
         # just listing the branches in HEAD, so avoid it if possible.
         # If there's more than one subdirectory (we always have .bzr), we may 




More information about the bazaar-commits mailing list