Rev 5761: (spiv) Fix accidental mutation of _DEFAULT_REQUEST_PARAMS in in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Apr 6 04:04:57 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5761 [merge]
revision-id: pqm at pqm.ubuntu.com-20110406040454-pqkw8sh6n4r3ffys
parent: pqm at pqm.ubuntu.com-20110406023617-nwz8liiss94qiejb
parent: andrew.bennetts at canonical.com-20110406020355-liklykl0wxf3yboh
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2011-04-06 04:04:54 +0000
message:
  (spiv) Fix accidental mutation of _DEFAULT_REQUEST_PARAMS in
   bzrlib.log._apply_log_request_defaults (Andrew Bennetts)
modified:
  bzrlib/log.py                  log.py-20050505065812-c40ce11702fe5fb1
  doc/en/release-notes/bzr-2.4.txt bzr2.4.txt-20110114053217-k7ym9jfz243fddjm-1
=== modified file 'bzrlib/log.py'
--- a/bzrlib/log.py	2011-04-05 01:12:15 +0000
+++ b/bzrlib/log.py	2011-04-06 04:04:54 +0000
@@ -297,7 +297,7 @@
 
 def _apply_log_request_defaults(rqst):
     """Apply default values to a request dictionary."""
-    result = _DEFAULT_REQUEST_PARAMS
+    result = _DEFAULT_REQUEST_PARAMS.copy()
     if rqst:
         result.update(rqst)
     return result

=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- a/doc/en/release-notes/bzr-2.4.txt	2011-04-06 01:37:40 +0000
+++ b/doc/en/release-notes/bzr-2.4.txt	2011-04-06 04:04:54 +0000
@@ -42,6 +42,11 @@
 .. Fixes for situations where bzr would previously crash or give incorrect
    or undesirable results.
 
+ * ``bzrlib.log._DEFAULT_REQUEST_PARAMS`` is no longer accidentally
+   mutated by ``bzrlib.log._apply_log_request_defaults``.  In practice
+   these default values aren't relied on very often so this probably
+   wasn't causing any trouble.  (Andrew Bennetts)
+
  * Lazy hooks are now reset between test runs. (Jelmer Vernooij, #745566)
 
 * Standalone bzr.exe installation on Windows: user can put additional python 




More information about the bazaar-commits mailing list