Support repositories. This should make converting SVN repositories with a
authorJelmer Vernooij <jelmer@samba.org>
Mon, 19 Jun 2006 18:50:54 +0000 (20:50 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 19 Jun 2006 18:50:54 +0000 (20:50 +0200)
lot of tags more efficient.

TODO
svn2bzr

diff --git a/TODO b/TODO
index 1c4ae777a61a72bac8643821068f94e9469139de..5cfe762b386b22899cd2e9889644dbd44a43d2fa 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,4 +1,3 @@
-- support for repositories
 - support for tags (once it is in bzrs core)
 - support nested branches (svn:externals)
 - use commitbuilder so there's no need for workingtrees?
diff --git a/svn2bzr b/svn2bzr
index 01014f7b6797245e08ff0763c7a06b117eaa2181..481d7612c5e52470024582cb007db3de83ba9e5c 100755 (executable)
--- a/svn2bzr
+++ b/svn2bzr
@@ -41,6 +41,7 @@ from bzrlib.bzrdir import BzrDir
 from bzrlib.branch import Branch
 import bzrlib.osutils as osutils
 from bzrlib.progress import ProgressBar
+from bzrlib.workingtree import WorkingTree
 import bzrlib.trace
 
 VERSION = "0.8.2"
@@ -511,6 +512,7 @@ class DynamicBranchCreator(BranchCreator):
 
     def __init__(self, ra, root, prefix=None, log=None, check=False):
         BranchCreator.__init__(self, ra, root, prefix, log, check)
+        BzrDir.create_repository(self._root, shared=True)
 
     def _remove_branch(self, branch):
         # Retire a branch to the attic
@@ -555,10 +557,9 @@ class DynamicBranchCreator(BranchCreator):
             if self.is_good(unpref_path) and self._want_branch(unpref_path):
                 branch_path = os.path.join(self._root, unpref_path)
                 os.makedirs(branch_path)
-                wt = BzrDir.create_standalone_workingtree(branch_path)
-                branch = wt.branch
+                branch = BzrDir.create_branch_convenience(branch_path)
                 self._branches[unpref_path] = branch
-                self._new_branch(branch, wt)
+                self._new_branch(branch, WorkingTree.open(branch_path))
         else:
             BranchCreator.add_dir(self, path)