I believe you provide this against bzr 2.3 which Martin already
approved. Is that correct? If so, I think it is fine to apply it to
2.2, and merge-forward from there.
I believe the official policy is that we will only focus on
maintaining 1 stable branch, which is now bzr-2.3. However, if you
want it against 2.2, we can certainly do so.
Did we get a patch for this sent to upstream configobj?
merge: approve
John
=:->
On Sun, Feb 20, 2011 at 7:59 AM, Alexander Belchenko <<email address hidden>
<mailto:<email address hidden>>> wrote:
+* Fixed bug in the bundled copy of ConfigObj with quoting of
triple quotes
+ in the value string. Fix suggested by ConfigObj's author
Michael Foord.
+ (Alexander Belchenko, #710410)
+
Testing
*******
+ def test_triple_quotes(self):
+ # Bug #710410: if the value string has triple quotes
+ # then ConfigObj versions up to 4.7.2 will quote them wrong
+ # and won't able to read them back
+ triple_quotes_value = '''spam
+""" that's my spam """
+eggs'''
+ co = config.ConfigObj()
+ co['test'] = triple_quotes_value
+ # another bug in ConfigObj:
+ # method co.write() without arguments produces list of lines
+ # one option per line, and multiline values are not split
+ # across multiple lines,
+ # and that breaks the parsing these lines back by ConfigObj
+ outfile = StringIO()
+ co.write(outfile=outfile)
+ lines = outfile.getvalue().splitlines()
+ # now we're trying to read it back
+ co2 = config.ConfigObj(lines)
+ self.assertEquals(triple_quotes_value, co2['test'])
+
erroneous_config = """[section] # line 1
good=good # line 2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I believe you provide this against bzr 2.3 which Martin already
approved. Is that correct? If so, I think it is fine to apply it to
2.2, and merge-forward from there.
I believe the official policy is that we will only focus on
maintaining 1 stable branch, which is now bzr-2.3. However, if you
want it against 2.2, we can certainly do so.
Did we get a patch for this sent to upstream configobj?
merge: approve
John
=:->
On Sun, Feb 20, 2011 at 7:59 AM, Alexander Belchenko <<email address hidden>
<mailto:<email address hidden>>> wrote:
Alexander Belchenko has proposed merging
lp:~bialix/bzr/2.2-configobj into lp:bzr/2.2.
Requested reviews:
bzr-core (bzr-core)
For more details, see: /code.launchpad .net/~bialix/ bzr/2.2- configobj/ +merge/ 50507 /code.launchpad .net/%7Ebialix/ bzr/2.2- configobj/ +merge/ 50507>
https:/
<https:/
Fixed bug in the bundled copy of ConfigObj with quoting of triple
quotes
in the value string. Fix suggested by ConfigObj's author Michael
Foord.
This patch provides the fix to 2.2 series, should I provide the /code.launchpad .net/~bialix/ bzr/2.2- configobj/ +merge/ 50507 /code.launchpad .net/%7Ebialix/ bzr/2.2- configobj/ +merge/ 50507>
similar patches for 2.3 and bzr.dev, or it will be merged to other
series by some integration process?
--
https:/
<https:/
Your team bzr-core is requested to review the proposed merge of
lp:~bialix/bzr/2.2-configobj into lp:bzr/2.2.
=== modified file 'NEWS'
--- NEWS 2011-02-09 04:16:55 +0000
+++ NEWS 2011-02-20 13:59:00 +0000
@@ -36,6 +36,10 @@
Internals
*********
+* Fixed bug in the bundled copy of ConfigObj with quoting of
triple quotes
+ in the value string. Fix suggested by ConfigObj's author
Michael Foord.
+ (Alexander Belchenko, #710410)
+
Testing
*******
=== modified file 'bzrlib/ tests/test_ config. py' tests/test_ config. py 2010-07-21 03:07:02 +0000 tests/test_ config. py 2011-02-20 13:59:00 +0000 ConfigObj( lines)
self. assertEqual( co2['test' ], 'foo#bar')
--- bzrlib/
+++ bzrlib/
@@ -246,6 +246,27 @@
co2 = config.
+ def test_triple_ quotes( self): outfile= outfile) getvalue( ).splitlines( ) ConfigObj( lines) ls(triple_ quotes_ value, co2['test'])
+ # Bug #710410: if the value string has triple quotes
+ # then ConfigObj versions up to 4.7.2 will quote them wrong
+ # and won't able to read them back
+ triple_quotes_value = '''spam
+""" that's my spam """
+eggs'''
+ co = config.ConfigObj()
+ co['test'] = triple_quotes_value
+ # another bug in ConfigObj:
+ # method co.write() without arguments produces list of lines
+ # one option per line, and multiline values are not split
+ # across multiple lines,
+ # and that breaks the parsing these lines back by ConfigObj
+ outfile = StringIO()
+ co.write(
+ lines = outfile.
+ # now we're trying to read it back
+ co2 = config.
+ self.assertEqua
+
erroneous_ config = """[section] # line 1
good=good # line 2
=== modified file 'bzrlib/ util/configobj/ configobj. py' util/configobj/ configobj. py 2009-04-17 22:24:54 +0000 util/configobj/ configobj. py 2011-02-20 13:59:00 +0000
raise ConfigObjError( 'Value "%s" cannot be safely
quot = tdquot
--- bzrlib/
+++ bzrlib/
@@ -1795,9 +1795,9 @@
if (value.find('"""') != -1) and (value.find("'''") != -1):
quoted.' % value)
if value.find('"""') == -1:
+ quot = tsquot
+ else:
- else:
- quot = tsquot
return quot
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
mlPIACgkQJdeBCY SNAAPwVACdHShRF 1lQH3pPK8ZEt9CT c6X1 arbuTaiIEbeHOeL dw
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk1
uTIAoLOIc9KGYKJ
=Zu0e
-----END PGP SIGNATURE-----