Merge lp://staging/~jelmer/bzr-loom/default-format into lp://staging/bzr-loom

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: no longer in the source branch.
Merged at revision: 128
Proposed branch: lp://staging/~jelmer/bzr-loom/default-format
Merge into: lp://staging/bzr-loom
Diff against target: 22 lines (+8/-4)
1 file modified
branch.py (+8/-4)
To merge this branch: bzr merge lp://staging/~jelmer/bzr-loom/default-format
Reviewer Review Type Date Requested Status
Vincent Ladeuil Approve
Review via email: mp+50927@code.staging.launchpad.net

Commit message

Use bzrlib.branch.format_registry.get_default(), if available.

Description of the change

Use the new public method to get the default format, if available.

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) :
review: Approve
128. By Jelmer Vernooij

Merge use of default branch format method, if available.

Revision history for this message
Vincent Ladeuil (vila) wrote :

Err, wait, there is an additional tweak required:

=== modified file 'formats.py'
--- formats.py 2010-06-18 04:44:52 +0000
+++ formats.py 2011-02-23 15:54:08 +0000
@@ -54,7 +54,13 @@
             branch.BzrBranchLoomFormat6(),
             branch.BzrBranchLoomFormat7(),
             ]
- map(_mod_branch.BranchFormat.register_format, branch_formats)
+ try:
+ format_registry = getattr(_mod_branch, 'format_registry')
+ register = format_registry.register
+ except AttributeError: # bzr < 2.4
+ register = _mod_branch.BranchFormat.register_format
+
+ map(register, branch_formats)

I'll add it and land.

@jelmer: You intend to deploy the lazy registration for plugins later right ?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches