Rev 6598: (vila) Bzr config should save the changes explicitly when needed (Vincent in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

Patch Queue Manager pqm at pqm.ubuntu.com
Fri Jun 20 15:24:38 UTC 2014


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

------------------------------------------------------------
revno: 6598 [merge]
revision-id: pqm at pqm.ubuntu.com-20140620152437-lrczj6lnsbp1gpsl
parent: pqm at pqm.ubuntu.com-20140508025629-de62pqrditrp349y
parent: v.ladeuil+lp at free.fr-20140619094208-a7snh4yvweznkwds
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2014-06-20 15:24:37 +0000
message:
  (vila) Bzr config should save the changes explicitly when needed (Vincent
   Ladeuil)
modified:
  bzrlib/config.py               config.py-20051011043216-070c74f4e9e338e8
  doc/en/release-notes/bzr-2.7.txt bzr2.7.txt-20130727124539-wnx897hy9l2h9f7x-1
=== modified file 'bzrlib/config.py'
--- a/bzrlib/config.py	2014-02-14 10:29:49 +0000
+++ b/bzrlib/config.py	2014-06-19 09:42:08 +0000
@@ -3559,7 +3559,6 @@
         """
         location_parts = self.location.rstrip('/').split('/')
         store = self.store
-        sections = []
         # Later sections are more specific, they should be returned first
         for _, section in reversed(list(store.get_sections())):
             if section.id is None:
@@ -4246,6 +4245,8 @@
     def _set_config_option(self, name, value, directory, scope):
         conf = self._get_stack(directory, scope, write_access=True)
         conf.set(name, value)
+        # Explicitly save the changes
+        conf.store.save_changes()
 
     def _remove_config_option(self, name, directory, scope):
         if name is None:
@@ -4254,6 +4255,8 @@
         conf = self._get_stack(directory, scope, write_access=True)
         try:
             conf.remove(name)
+            # Explicitly save the changes
+            conf.store.save_changes()
         except KeyError:
             raise errors.NoSuchConfigOption(name)
 

=== modified file 'doc/en/release-notes/bzr-2.7.txt'
--- a/doc/en/release-notes/bzr-2.7.txt	2014-05-07 22:20:27 +0000
+++ b/doc/en/release-notes/bzr-2.7.txt	2014-06-19 09:42:08 +0000
@@ -72,6 +72,11 @@
    suite.  This can include new facilities for writing tests, fixes to 
    spurious test failures and changes to the way things should be tested.
 
+* Fix warnings on stderr caused by the atexit handler triggering for the
+  wrong reason: the 'config' command should explicitly save the changes when
+  modifying or removing an option and not rely on the atexit
+  handler. (Vincent Ladeuil, #1331999)
+
 * Handle (minor) incompatible change in python 2.7.6 leading to test
   failures. Only tests are affected. (Vincent Ladeuil, #1303879)
 




More information about the bazaar-commits mailing list