Rev 5754: Use a name less likely to be reused. in file:///home/vila/src/bzr/experimental/config/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Fri Apr 8 14:11:11 UTC 2011
At file:///home/vila/src/bzr/experimental/config/
------------------------------------------------------------
revno: 5754
revision-id: v.ladeuil+lp at free.fr-20110408141111-84ypaqkii5vgsd0c
parent: v.ladeuil+lp at free.fr-20110408132750-k4gkyium5hz8e8sg
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: config-section
timestamp: Fri 2011-04-08 16:11:11 +0200
message:
Use a name less likely to be reused.
-------------- next part --------------
=== modified file 'bzrlib/config.py'
--- a/bzrlib/config.py 2011-04-08 13:27:50 +0000
+++ b/bzrlib/config.py 2011-04-08 14:11:11 +0000
@@ -2112,7 +2112,7 @@
return self.options.get(name, default)
-_Created = object()
+_NewlyCreatedOption = object()
"""Was the option created during the MutableSection lifetime"""
@@ -2126,7 +2126,7 @@
def set(self, name, value):
if name not in self.options:
# This is a new option
- self.orig[name] = _Created
+ self.orig[name] = _NewlyCreatedOption
elif name not in self.orig:
self.orig[name] = self.get(name, None)
self.options[name] = value
=== modified file 'bzrlib/tests/test_config.py'
--- a/bzrlib/tests/test_config.py 2011-04-07 07:44:46 +0000
+++ b/bzrlib/tests/test_config.py 2011-04-08 14:11:11 +0000
@@ -1887,7 +1887,7 @@
# The option didn't exist initially so it we need to keep track of it
# with a special value
self.assertTrue('foo' in section.orig)
- self.assertEquals(config._Created, section.orig['foo'])
+ self.assertEquals(config._NewlyCreatedOption, section.orig['foo'])
class TestConfigGetOptions(tests.TestCaseWithTransport, TestOptionsMixin):
More information about the bazaar-commits
mailing list