Rev 6402: (vila) bzr config displays [DEFAULT] for bazaar.conf (Vincent Ladeuil) in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

Patch Queue Manager pqm at pqm.ubuntu.com
Wed Dec 21 21:56:31 UTC 2011


At file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 6402 [merge]
revision-id: pqm at pqm.ubuntu.com-20111221215631-coxvalt3phw8jaza
parent: pqm at pqm.ubuntu.com-20111221212734-aea6s92gkpux3fky
parent: v.ladeuil+lp at free.fr-20111221213103-u1mryflkcb6q0v1c
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2011-12-21 21:56:31 +0000
message:
  (vila) bzr config displays [DEFAULT] for bazaar.conf (Vincent Ladeuil)
modified:
  bzrlib/config.py               config.py-20051011043216-070c74f4e9e338e8
  bzrlib/tests/blackbox/test_config.py test_config.py-20100927150753-x6rf54uibd08r636-1
  doc/en/release-notes/bzr-2.5.txt bzr2.5.txt-20110708125756-587p0hpw7oke4h05-1
=== modified file 'bzrlib/config.py'
--- a/bzrlib/config.py	2011-12-21 20:55:19 +0000
+++ b/bzrlib/config.py	2011-12-21 21:31:03 +0000
@@ -3909,10 +3909,10 @@
                             self.outf.write('%s:\n' % (store.id,))
                             cur_store_id = store.id
                             cur_section = None
-                        if (section.id not in (None, 'DEFAULT')
+                        if (section.id is not None
                             and cur_section != section.id):
-                            # Display the section if it's not the default (or
-                            # only) one.
+                            # Display the section id as it appears in the store
+                            # (None doesn't appear by definition)
                             self.outf.write('  [%s]\n' % (section.id,))
                             cur_section = section.id
                         value = section.get(oname, expand=False)

=== modified file 'bzrlib/tests/blackbox/test_config.py'
--- a/bzrlib/tests/blackbox/test_config.py	2011-12-21 08:52:41 +0000
+++ b/bzrlib/tests/blackbox/test_config.py	2011-12-21 10:55:43 +0000
@@ -79,6 +79,7 @@
         script.run_script(self, '''\
             $ bzr config -d tree
             bazaar:
+              [DEFAULT]
               multiline = """1
             2
             """
@@ -101,6 +102,7 @@
         script.run_script(self, '''\
             $ bzr config -d tree
             bazaar:
+              [DEFAULT]
               list = 1, a, "with, a comma"
             ''')
 
@@ -118,6 +120,7 @@
         script.run_script(self, '''\
             $ bzr config -d tree
             bazaar:
+              [DEFAULT]
               hello = world
             ''')
 
@@ -139,6 +142,7 @@
         script.run_script(self, '''\
             $ bzr config
             bazaar:
+              [DEFAULT]
               hello = world
             ''')
 
@@ -214,6 +218,7 @@
             $ bzr config --scope bazaar hello=world
             $ bzr config -d tree --all hello
             bazaar:
+              [DEFAULT]
               hello = world
             ''')
 
@@ -222,6 +227,7 @@
             $ bzr config -d tree --scope bazaar hello=world
             $ bzr config -d tree --all hello
             bazaar:
+              [DEFAULT]
               hello = world
             ''')
 
@@ -290,6 +296,7 @@
             branch:
               file = branch
             bazaar:
+              [DEFAULT]
               file = bazaar
             ''')
 
@@ -300,12 +307,14 @@
             branch:
               file = branch
             bazaar:
+              [DEFAULT]
               file = bazaar
             ''')
         script.run_script(self, '''\
             $ bzr config -d tree --remove file
             $ bzr config -d tree --all file
             bazaar:
+              [DEFAULT]
               file = bazaar
             ''')
 
@@ -317,12 +326,14 @@
               [.../work/tree]
               file = locations
             bazaar:
+              [DEFAULT]
               file = bazaar
             ''')
         script.run_script(self, '''\
             $ bzr config -d tree --scope locations --remove file
             $ bzr config -d tree --all file
             bazaar:
+              [DEFAULT]
               file = bazaar
             ''')
 

=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- a/doc/en/release-notes/bzr-2.5.txt	2011-12-21 20:32:50 +0000
+++ b/doc/en/release-notes/bzr-2.5.txt	2011-12-21 21:31:03 +0000
@@ -64,6 +64,9 @@
 * Allow configuration option default value to be a python callable at
   registration. (Vincent Ladeuil, #832064)
 
+* ``bzr config`` will now display the section ``[DEFAULT]`` used in
+  ``bazaar.conf``. (Vincent Ladeuil, #907268)
+
 * Configuration stores can now provides a specific quoting mechanism. This
   is required to workaround ``configobj`` conflating quoting and list values
   automatic conversion. (Vincent Ladeuil, #906897)




More information about the bazaar-commits mailing list