Rename import-svn -> svn-import, for consistency (bzrtools has "baz-import")
authorJelmer Vernooij <jelmer@samba.org>
Mon, 18 Dec 2006 15:48:23 +0000 (16:48 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 18 Dec 2006 15:48:23 +0000 (16:48 +0100)
README
__init__.py
convert.py

diff --git a/README b/README
index e394363ec99c0e28445abf480b96c616c0c4480c..708a5883a376de883eeca89299eec93cf6be3872 100644 (file)
--- a/README
+++ b/README
@@ -44,7 +44,7 @@ The following features are currently present:
 
  * Recognizes file metadata (executable bits, symlinks).
  
- * 'import-svn' command with functionality similar to svn2bzr.
+ * 'svn-import' command with functionality similar to svn2bzr.
 
  * Ability to track merges done with SVK (http://svk.elixus.org/) 
    and write merges.
index 37192833c66f05b08b91ef666b26d7da8ab6d415..6cb7eb350a3402c7f06ba3039f131e60712a1406 100644 (file)
@@ -100,7 +100,7 @@ InterRepository.register_optimiser(InterSvnRepository)
 
 from bzrlib.commands import Command, register_command, display_command, Option
 
-class cmd_import_svn(Command):
+class cmd_svn_import(Command):
     """Convert a Subversion repository to a Bazaar repository.
     
     """
@@ -117,7 +117,7 @@ class cmd_import_svn(Command):
                            trees)
 
 
-register_command(cmd_import_svn)
+register_command(cmd_svn_import)
 
 def test_suite():
     from unittest import TestSuite, TestLoader
index 739534e162ff50355eaba731b136432e5718141b..ee39e3b0479a4c2db8ea8904ac900a9d37c9a1be 100644 (file)
@@ -51,17 +51,17 @@ def convert_repository(url, output_dir, scheme, create_shared_repo=True, working
         except SubversionException, (svn.core.SVN_ERR_STREAM_MALFORMED_DATA, _):            
             raise BzrError("%s is not a dump file" % url)
         
-        url = "svn+file://%s" % tmp_repos
+        url = "file://%s" % tmp_repos
 
     if create_shared_repo:
         target_repos = BzrDir.create_repository(output_dir, shared=True)
         target_repos.set_make_working_trees(working_trees)
 
     try:
-        source_repos = SvnRemoteAccess(SvnRaTransport(url), SvnFormat(), 
-                                       scheme).open_repository()
+        source_repos = Repository.open(url)
 
-        branches = source_repos._log.find_branches(source_repos._latest_revnum)
+        branches = source_repos._log.find_branches(
+                source_repos.transport.get_latest_revnum())
         existing_branches = filter(lambda (bp, revnum, exists): exists, 
                                    branches)
         info('Importing branches: \n%s' % "".join(map(lambda (bp,revnum,exists): "%s\n" % bp, existing_branches)))