Merge lp://staging/~nmb/bzr/484101-default-format into lp://staging/bzr

Proposed by Neil Martinsen-Burrell
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: no longer in the source branch.
Merged at revision: 5481
Proposed branch: lp://staging/~nmb/bzr/484101-default-format
Merge into: lp://staging/bzr
Diff against target: 82 lines (+30/-1)
4 files modified
NEWS (+5/-0)
bzrlib/bzrdir.py (+5/-1)
bzrlib/help_topics/en/configuration.txt (+6/-0)
bzrlib/tests/blackbox/test_init.py (+14/-0)
To merge this branch: bzr merge lp://staging/~nmb/bzr/484101-default-format
Reviewer Review Type Date Requested Status
Martin Pool Approve
Review via email: mp+36952@code.staging.launchpad.net

Commit message

Add a ``default_format`` configuration option.

Description of the change

This branch fixes bug 484101 by creating a "default_format" option that can be set in bazaar.conf. When given a format name, this option makes that format the default for any new branches that are created. Tests are provided for "bzr init" and one particular format.

To post a comment you must log in.
Revision history for this message
Alexander Belchenko (bialix) wrote :

Neil Martinsen-Burrell пишет:
> This branch fixes bug 484101 by creating a "default_format" option that can be set in bazaar.conf. When given a format name, this option makes that format the default for any new branches that are created. Tests are provided for "bzr init" and one particular format.

God bless you! Thank you for this.

Revision history for this message
Martin Pool (mbp) wrote :

I think ideally it would be able to be configured by location, but this is a huge improvement. Thanks.

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

sent to pqm by email

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

@Neil: Just noticed while landing:

68 + def _restore_config(self):
69 + conf = _mod_config.GlobalConfig.from_string('', save=True)
70 +

77 + self.addCleanup(self._restore_config)

This is exactly how it should be done.
But it's useless :)

Your test class is already using TestCaseWithTransport and is executed in a temporary directory with BZR_HOME pointing there.

So you start with no config file and they will be deleted after the test.

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.