[RFC][MERGE] bzrdir phase 3

Robert Collins robertc at robertcollins.net
Thu Feb 16 09:46:27 GMT 2006


Okies, this is the end of the bzrdir get-things-roughly-right work.

I've consolidated the locks so that format 6 branches only ever lock
things once - ditto format 4 and 5. That should fix the windows problems
bzrdir introduced. 

upgrade has been taught to use the bzrdir format knowledge, so a new
bzrdir format can just be plugged in. This can be made more useful, but
not until we have some extra details like multiple repository formats
within a metaformat, or a desire for multiple 'active' formats (i.e. a
ForeignBranch implementation might want to replace the entire metadir
instance). I will work on this some more as part of the VersionedFile
work.

the upgrade ui reports more useful stuff with checkouts, and I've
sketched out the ui as no-op ui tests for upgrading repositories and
branches. They still are not coded, but I want to get the core code up
for review before the diff grows anymore. Its at 1000 lines of
alterations, but much of that is due to moving the conversion logic from
upgrade.py into bzrdir.py. (The idea is that the converter is owned by
the bzrdir it converts from).

Oh, also a couple of cleanups like removing bzrlib.BZRDIR.

Hmm, I'm going to do one more change before merging this, but it should
not affect the review - I'm going to add ui support for 'bzr upgrade
--format=metadir' so that we bleeding edge junkies can upgrade from the
console rather than needing to use the library.

That will be just passing in the desired format to upgrade, and from
there to 'needs_format_upgrade'.

Rob



robertc at lifelesslap:~/source/baz/bzr-dir$ bzr diff -r
ancestor:../repository > phase3.patch
wc -l phase3.patch
robertc at lifelesslap:~/source/baz/bzr-dir$ wc -l phase3.patch
2264 phase3.patch
robertc at lifelesslap:~/source/baz/bzr-dir$ diffstat phase3.patch 
 __init__.py                                                   |    1 
 add.py                                                        |    4 
 branch.py                                                     |   27 
 builtins.py                                                   |    5 
 bzrdir.py                                                     |  474
+++++++++-
 commands.py                                                   |    1 
 errors.py                                                     |    8 
 info.py                                                       |   41 
 missing.py                                                    |    4 
 progress.py                                                   |   17 
 repository.py                                                 |   47 
 tests/blackbox/__init__.py                                    |    1 
 tests/blackbox/test_info.py                                   |  169
+++
 tests/blackbox/test_update.py                                 |    2 
 tests/blackbox/test_upgrade.py                                |   73 +
 tests/branch_implementations/test_branch.py                   |    8 
 tests/bzrdir_implementations/test_bzrdir.py                   |   18 
 tests/repository_implementations/test_fileid_involved.py      |    7 
 tests/test_bzrdir.py                                          |   71 +
 tests/test_errors.py                                          |    7 
 tests/test_repository.py                                      |    3 
 tests/test_ui.py                                              |   12 
 tests/workingtree_implementations/__init__.py                 |   41 
 tests/workingtree_implementations/test_is_control_filename.py |   55 +
 tests/workingtree_implementations/test_workingtree.py         |   31 
 transport/__init__.py                                         |    3 
 ui/__init__.py                                                |    2 
 upgrade.py                                                    |  447
---------
 workingtree.py                                                |   27 
 29 files changed, 1060 insertions(+), 546 deletions(-)

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phase3.patch
Type: text/x-patch
Size: 90378 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060216/d07145d5/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/20060216/d07145d5/attachment.pgp 


More information about the bazaar mailing list