Merge lp://staging/~jelmer/bzr/2a-repo-supports-nested-trees into lp://staging/bzr
Status: | Rejected |
---|---|
Rejected by: | Jelmer Vernooij |
Proposed branch: | lp://staging/~jelmer/bzr/2a-repo-supports-nested-trees |
Merge into: | lp://staging/bzr |
Diff against target: |
322 lines (+91/-20) 10 files modified
bzrlib/bzrdir.py (+3/-3) bzrlib/commit.py (+0/-1) bzrlib/repofmt/groupcompress_repo.py (+1/-1) bzrlib/tests/per_pack_repository.py (+11/-2) bzrlib/tests/per_tree/test_path_content_summary.py (+1/-1) bzrlib/tests/test_merge.py (+2/-2) bzrlib/tests/test_smart.py (+1/-1) bzrlib/workingtree.py (+12/-1) bzrlib/workingtree_4.py (+55/-8) doc/en/release-notes/bzr-2.6.txt (+5/-0) |
To merge this branch: | bzr merge lp://staging/~jelmer/bzr/2a-repo-supports-nested-trees |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vincent Ladeuil | Needs Information | ||
Review via email: mp+89919@code.staging.launchpad.net |
Description of the change
Enable support for nested trees in the '2a' repository format.
Support for storing 'tree-reference' inventory entries has always
been present in the '2a' repository format, just never been officially
supported by the format. The actual change (a new inventory entry kind
'tree-reference') is small and non-controversial.
Instead, this marks working tree formats 4-6 as not actually supporting
nested trees. Previously it would claim to support nested trees
depending on whether the associated repository supported nested trees.
In practice the current wt implementation doesn't properly support nested trees:
* There is no cheap way to iterate over all nested trees, so every
working tree that supports nested trees (even if there are none) pays
the penalty of scanning the entire working tree for nested trees
every time it is accessed.
* There are various bugs around the current implementation that
make it impossible to use it with nested trees. Just checking out
a containing tree shows the kind of the nested trees of having changed
from nested tree to regular directory
This adds an experimental 'Working Tree Format 7' which does claim to support
nested trees and is used by development-
do whatever is necessary to properly handle tree references and then
potentially merge it back into the other working tree formats with a
feature flag.
This change is sufficient for bzr-git to allow importing
git repositories with submodules somewhere in their history (launchpad bug
#402814), although not yet sufficient to allow checking out trees with
submodules. We'd need working tree support for the latter, of course.
280 + return "Working tree format 6"
Really ?
Apart from that I don't quite see how your cover letter relates to this
proposal:
> The actual change (a new inventory entry kind 'tree-reference') is small
and non-controversial.
There is nothing about that in your proposal, are you just referring to the
initial introduction of the tree-reference entry kind bak in the days ?
Ot is the actual change really:
51 + supports_ tree_reference = True
and
59 - supports_ tree_reference = True
If that's the case, I'm surprised there is no fallouts from activating tree
references support in 2a (line 51) !?! Not a single test failing ?
Also, what's the plan for RepositoryForma t2aSubtree ? Keeping it this way is
likely to get it forgotten, we at least need a bug to track its removal
describing some plan (since it's an experimental one, I think the plan can
be reduced to: delete it, users knew).
> Instead, this marks working tree formats 4-6 as not actually supporting
nested trees.
So *this* part is uncontroversial and can be landed IMHO.
69 + if repo._format. supports_ chks: format_ name = '2a' format_ name = 'pack-0.92-subtree'
70 + matching_
71 + else:
72 + matching_
81 + if repo.supports_ rich_root( ): supports_ chks: format_ name = '2a' format_ name = 'pack-0.92-subtree' format_ name = 'dirstate-subtree'
82 + if repo._format.
83 + matching_
84 + else:
85 + matching_
86 + else:
87 + matching_
Urgh, these tests were already confusing, now they are almost undecipherable
:-(
Can't you abstract the logic here so we get a clearer view of what we are
tested ? Since these tests are about stacking, I'd really prefer them to be
easier to grasp, especially regarding the compatibility between the various
formats. There is also a hint that it's time to address:
# TODO: Possibly this should be run per-repository- format and raise
# TestNotApplicable on formats that don't support stacking. -- mbp
# 20080729
100 + if not tree.supports_ tree_reference( ):
Why is that a method for working trees (or is it wt formats) and an
attribute for repos ?
Highly confusing :-/
> This change is sufficient for bzr-git to allow importing (launchpad bug
#402814), although not yet sufficient to allow checking out trees with
submodules. We'd need working tree support for the latter, of course.
Meh, can you elaborate on that ? How does bzr-git uses this change ? By
using wt format 7 ? And how do you allow checking out such trees ? Or is
this proposal incomplete in this respect ?
We add a discussion in Budapest where you mentioned a list of limitations
(which I agreed with) to allow experimenting with subtrees. It would be nice
to formalize them so we a get some understanding on where this proposal
stands on the roadmap ;)
Failing that, I don't know how to review this proposal or if it needs to
be split into several parts that would be easier to understand.