[RFC][Merge] repository support
Robert Collins
robertc at robertcollins.net
Wed Feb 15 04:18:02 GMT 2006
This is the data level support for repositories:
* finding a repository from a branch
* using a repository when making a branch if desired
(bzrdir.BzrDir.create_branch_convenience(URL, force_new_repo=False,
force_new_tree=None))
It does not have any UI yet, I've moved onto 'upgrade' support as part
of bzrdir phase 3. If this gets a +1 I'll merge it and hopefully someone
can do a UI :). Or I'll come back and do a minimal UI to get us going.
If you want to make a repository and play:
import bzrlib.bzrdir
repo = bzrdir.BzrDir.create_repository('.', shared=True)
shared_branch = bzrdir.BzrDir.create_branch_convenience('subdir')
To toggle the creation of new trees inside a repo (i.e. for repos that
you are publishing):
repo.set_make_new_trees(True|False)
To copy an existing branch into a repo so that it uses the shared
storage:
dir = bzrdir.BzrDir.open('old_branch')
dir.clone('path/in/repo')
After that ui commands should just work.
As you can see below, this is primarily corner case testing of new code
paths. I'm asking for a review on this so that we dont get another
mega-branch accumulating :)
robertc at lifelesslap:~/source/baz/repository$ diffstat < repository.patch
BRANCH.TODO | 1
bzrlib/branch.py | 14
bzrlib/bzrdir.py | 187
+++++-
bzrlib/repository.py | 151 +++--
bzrlib/tests/__init__.py | 4
bzrlib/tests/branch_implementations/test_branch.py | 22
bzrlib/tests/bzrdir_implementations/test_bzrdir.py | 378
++++++++++++-
bzrlib/tests/repository_implementations/test_repository.py | 39 +
bzrlib/tests/test_bzrdir.py | 161 +++++
bzrlib/tests/test_repository.py | 50 +
10 files changed, 919 insertions(+), 88 deletions(-)
robertc at lifelesslap:~/source/baz/repository$ wc -l repository.patch
1473 repository.patch
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: repository.patch
Type: text/x-patch
Size: 65957 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060215/d77834ea/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060215/d77834ea/attachment.pgp
More information about the bazaar
mailing list