[MERGE][#164626] Preserve repository format when branching from HPSS

Martin Pool mbp at canonical.com
Fri Nov 30 03:12:54 GMT 2007


Martin Pool has voted tweak.
Status is now: Conditionally approved
Comment:
It does seem like this ought to be applied across all formats (bzrdir,
branch, wt even) rather than just for the repository.  (Or is that
already done in some other way?  I doubt it.)  So, unless this is 
already done, please mark this bug as closed and open a medium-priority 
one about the others.

+        try:
+            dest_repo = 
self._real_repository._format.initialize(to_bzrdir,
+ 
shared=False)

(query)
I wonder if that should be separated out into a ._real_format() method 
on
all the Remote objects?

+        except errors.UninitializableFormat:
+            dest_repo = to_bzrdir.open_repository()

(tweak)
I'm not totally sure this is a good way to distinguish all-in-one 
bzrdirs
from otherwise uninitializable formats, but I can't think of anything 
much
better, and I guess we're not very likely to hit either of them on this
path.  Especially because you say below that you can't read all in one
formats over hpss.  So is the except block needed at all?

+        if self.repository_format == RepositoryFormat7():
+            raise KnownFailure(
+                "Cannot fetch weaves over smart protocol.")

(tweak) These seem more like TestSkipped: the test didn't fail, rather 
we can't run it yet.

With those tweaks, this is still an improvement, please merge it.

For details, see: 
http://bundlebuggy.aaronbentley.com/request/%3C20071130023654.GA23810%40steerpike.home.puzzling.org%3E



More information about the bazaar mailing list