Rev 5471: Merge bzr.dev again in file:///home/vila/src/bzr/reviews/609186-shortcuts/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Oct 11 19:10:28 BST 2010
At file:///home/vila/src/bzr/reviews/609186-shortcuts/
------------------------------------------------------------
revno: 5471 [merge]
revision-id: v.ladeuil+lp at free.fr-20101011181027-6g7tnei0f3hnqft4
parent: v.ladeuil+lp at free.fr-20101011141059-obpwdvfdomp7sjo9
parent: pqm at pqm.ubuntu.com-20101011155334-d7g4ro1ofnjiyfbd
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 609186-shortcuts
timestamp: Mon 2010-10-11 20:10:27 +0200
message:
Merge bzr.dev again
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/help_topics/en/configuration.txt configuration.txt-20060314161707-868350809502af01
bzrlib/tests/blackbox/test_init.py test_init.py-20060309032856-a292116204d86eb7
bzrlib/tests/blackbox/test_tags.py test_tags.py-20070116132048-5h4qak2cm22jlb9e-1
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2010-10-11 14:10:59 +0000
+++ b/NEWS 2010-10-11 18:10:27 +0000
@@ -23,12 +23,18 @@
for project ``foo`` in Debian Lenny.
(Barry Warsaw, #609186)
+* Provide a configuration option "default_format" that controls the
+ default format for new branches created with ``bzr init``.
+ (Neil Martinsen-Burrell, #484101)
+
Bug Fixes
*********
* Don't force openssh to use protocol=2, since that is now the default.
(Neil Martinsen-Burrell, #561061)
+* Make ``bzr tag --quiet`` really quiet. (Neil Martinsen-Burrell, #239523)
+
Improvements
************
@@ -98,8 +104,8 @@
(Toshio Kuratomi, #612096)
* Print junk rather than throwing a UnicodeDecodeError from ``bzr version-info``
- when using the rio format (with non-ascii information) on a non-utf-8 terminal.
- (Andrej A Antonov, #518609)
+ when using the rio format (with non-ascii information) on a non-utf-8
+ terminal. (Andrej A Antonov, #518609)
* Skip tests that needs a bzr source tree when there isn't one. This is
needed to succesfully run the test suite for installed versions.
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2010-10-11 11:41:47 +0000
+++ b/bzrlib/builtins.py 2010-10-11 15:18:38 +0000
@@ -5377,7 +5377,7 @@
if tag_name is None:
raise errors.BzrCommandError("No tag specified to delete.")
branch.tags.delete_tag(tag_name)
- self.outf.write('Deleted tag %s.\n' % tag_name)
+ note('Deleted tag %s.' % tag_name)
else:
if revision:
if len(revision) != 1:
@@ -5395,7 +5395,7 @@
if (not force) and branch.tags.has_tag(tag_name):
raise errors.TagAlreadyExists(tag_name)
branch.tags.set_tag(tag_name, revision_id)
- self.outf.write('Created tag %s.\n' % tag_name)
+ note('Created tag %s.' % tag_name)
class cmd_tags(Command):
=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py 2010-09-10 09:46:15 +0000
+++ b/bzrlib/bzrdir.py 2010-09-29 05:35:26 +0000
@@ -3345,7 +3345,11 @@
help='Same as 2a.')
# The current format that is made on 'bzr init'.
-controldir.format_registry.set_default('2a')
+format_name = config.GlobalConfig().get_user_option('default_format')
+if format_name is None:
+ controldir.format_registry.set_default('2a')
+else:
+ controldir.format_registry.set_default(format_name)
# XXX 2010-08-20 JRV: There is still a lot of code relying on
# bzrlib.bzrdir.format_registry existing. When BzrDir.create/BzrDir.open/etc
=== modified file 'bzrlib/help_topics/en/configuration.txt'
--- a/bzrlib/help_topics/en/configuration.txt 2010-07-06 01:26:59 +0000
+++ b/bzrlib/help_topics/en/configuration.txt 2010-09-29 05:35:26 +0000
@@ -504,6 +504,12 @@
whether the format deprecation warning is shown on repositories that are
using deprecated formats.
+default_format
+~~~~~~~~~~~~~~
+
+A format name for the default format used when creating branches. See ``bzr
+help formats`` for possible values.
+
Unicode options
---------------
=== modified file 'bzrlib/tests/blackbox/test_init.py'
--- a/bzrlib/tests/blackbox/test_init.py 2010-06-11 07:32:12 +0000
+++ b/bzrlib/tests/blackbox/test_init.py 2010-10-11 14:28:19 +0000
@@ -22,6 +22,7 @@
from bzrlib import (
branch as _mod_branch,
+ config as _mod_config,
osutils,
urlutils,
)
@@ -163,6 +164,15 @@
self.run_bzr('init ../new/tree --create-prefix', working_dir='tree')
self.failUnlessExists('new/tree/.bzr')
+ def test_init_default_format_option(self):
+ """bzr init should read default format from option default_format"""
+ conf = _mod_config.GlobalConfig.from_string('''
+[DEFAULT]
+default_format = 1.9
+''', save=True)
+ out, err = self.run_bzr_subprocess('init')
+ self.assertContainsRe(out, '1.9')
+
class TestSFTPInit(TestCaseWithSFTPServer):
=== modified file 'bzrlib/tests/blackbox/test_tags.py'
--- a/bzrlib/tests/blackbox/test_tags.py 2010-10-03 05:08:21 +0000
+++ b/bzrlib/tests/blackbox/test_tags.py 2010-10-11 15:18:38 +0000
@@ -60,7 +60,7 @@
Branch.hooks.install_named_hook('automatic_tag_name',
get_tag_name, 'get tag name')
out, err = self.run_bzr('tag -d branch')
- self.assertContainsRe(out, 'Created tag mytag.')
+ self.assertContainsRe(err, 'Created tag mytag.')
def test_tag_current_rev(self):
t = self.make_branch_and_tree('branch')
@@ -68,7 +68,7 @@
rev_id='first-revid')
# make a tag through the command line
out, err = self.run_bzr('tag -d branch NEWTAG')
- self.assertContainsRe(out, 'Created tag NEWTAG.')
+ self.assertContainsRe(err, 'Created tag NEWTAG.')
# tag should be observable through the api
self.assertEquals(t.branch.tags.get_tag_dict(),
dict(NEWTAG='first-revid'))
@@ -247,3 +247,17 @@
## out, err = self.run_bzr('merge -d one two', encoding='utf-8')
## self.assertContainsRe(out,
## 'Conflicting tags:\n.*' + tagname.encode('utf-8'))
+
+ def test_tag_quiet(self):
+ t1 = self.make_branch_and_tree('')
+ out, err = self.run_bzr('tag --quiet test1')
+ self.assertEqual('', out)
+ self.assertEqual('', err)
+
+ def test_tag_delete_quiet(self):
+ t1 = self.make_branch_and_tree('')
+ self.run_bzr('tag test1')
+ out, err = self.run_bzr('tag --delete --quiet test1')
+ self.assertEqual('', out)
+ self.assertEqual('', err)
+
More information about the bazaar-commits
mailing list