Merge lp:~vila/bzr/integration into lp:bzr

Proposed by Vincent Ladeuil
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: no longer in the source branch.
Merged at revision: 6620
Proposed branch: lp:~vila/bzr/integration
Merge into: lp:bzr
Diff against target: 424 lines (+160/-37)
14 files modified
.bzrignore (+1/-0)
MANIFEST.in (+10/-1)
Makefile (+3/-8)
bzr (+1/-1)
bzrlib/__init__.py (+1/-1)
bzrlib/lazy_regex.py (+11/-1)
bzrlib/tests/test_diff.py (+1/-3)
bzrlib/tests/test_http.py (+17/-2)
bzrlib/transport/http/_pycurl.py (+5/-1)
bzrlib/transport/http/_urllib2_wrappers.py (+3/-2)
bzrlib/transport/sftp.py (+3/-2)
doc/developers/releasing.txt (+42/-11)
doc/en/release-notes/bzr-2.7.txt (+59/-0)
doc/en/release-notes/bzr-2.8.txt (+3/-4)
To merge this branch: bzr merge lp:~vila/bzr/integration
Reviewer Review Type Date Requested Status
Vincent Ladeuil Approve
Review via email: mp+314910@code.launchpad.net

Commit message

Merge 2.7 into trunk including fixes for bugs #1622039, #1644003, #1579093 and #1645017.

Description of the change

Merge 2.7 into trunk including fixes for bugs #1644003, #1579093 and #1645017.

To post a comment you must log in.
Revision history for this message
Vincent Ladeuil (vila) wrote :

Re-sync trunk with 2.7.

review: Approve
Revision history for this message
bzr PQM (bzr-pqm) wrote :
Download full text (2.8 MiB)

The attempt to merge lp:~vila/bzr/integration into lp:bzr failed. Below is the output from the failed tests.

python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/en/tutorials/tutorial.txt "doc/en/tutorials/tutorial.html"
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/en/tutorials/using_bazaar_with_launchpad.txt "doc/en/tutorials/using_bazaar_with_launchpad.html"
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/en/tutorials/centralized_workflow.txt "doc/en/tutorials/centralized_workflow.html"
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/ru/tutorials/centralized_workflow.txt "doc/ru/tutorials/centralized_workflow.html"
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/ru/tutorials/using_bazaar_with_launchpad.txt "doc/ru/tutorials/using_bazaar_with_launchpad.html"
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/ru/tutorials/tutorial.txt "doc/ru/tutorials/tutorial.html"
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/ja/tutorials/tutorial.txt "doc/ja/tutorials/tutorial.html"
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/ja/tutorials/using_bazaar_with_launchpad.txt "doc/ja/tutorials/using_bazaar_with_launchpad.html"
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/ja/tutorials/centralized_workflow.txt "doc/ja/tutorials/centralized_workflow.html"
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/en/mini-tutorial/index.txt "doc/en/mini-tutorial/index.html"
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/ja/mini-tutorial/index.txt "doc/ja/mini-tutorial/index.html"
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/ru/mini-tutorial/index.txt "doc/ru/mini-tutorial/index.html"
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/es/mini-tutorial/index.txt "doc/es/mini-tutorial/index.html"
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/en/user-guide/index-plain.txt doc/en/user-guide/index-plain.html
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning --stylesheet=../../default.css doc/ja/user-guide/index-plain.txt "doc/ja/user-guide/index-plain.html"
python tools/rst2html.py --link-stylesheet --footnote-references=superscript --halt=warning ...

Revision history for this message
Vincent Ladeuil (vila) wrote :

15:59:23 O: ======================================================================
15:59:23 O: ERROR: bzrlib.tests.per_transport.TransportTests.test_copy_to(SFTPTransport,SFTPHomeDirServer)
15:59:23 O: ----------------------------------------------------------------------
15:59:23 O: Traceback (most recent call last):
15:59:23 O: testtools.testresult.real._StringException: lost connection during test 'bzrlib.tests.per_transport.TransportTests.test_copy_to(SFTPTransport,SFTPHomeDirServer)'

Progress: on more debian reported test failure :-}

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2012-08-07 06:32:51 +0000
3+++ .bzrignore 2017-01-17 15:27:25 +0000
4@@ -7,6 +7,7 @@
5 CHANGELOG
6 # generated documents
7 bzr.1
8+MANIFEST
9 ./doc/*.html
10 ./doc/*/_build/
11 ./doc/*/Makefile
12
13=== modified file 'MANIFEST.in'
14--- MANIFEST.in 2010-01-13 16:23:07 +0000
15+++ MANIFEST.in 2017-01-17 15:27:25 +0000
16@@ -1,3 +1,12 @@
17-include bzr README setup.py
18+include bzr README setup.py COPYING.txt
19+# FIXME: Not needed, remove after 2.7.0 -- vila 2016-02-07
20+include BRANCH.TODO bzr.ico INSTALL Makefile MANIFEST.in NEWS profile_imports.py README_BDIST_RPM .rsyncexclude .testr.conf TODO tools/bzr_epydoc tools/packaging/lp-upload-release tools/subunit-sum bzrlib/plugins/news_merge/README bzrlib/plugins/po_merge/README bzrlib/tests/ssl_certs/ca.key bzrlib/tests/ssl_certs/server.csr bzrlib/plugins/grep/.bzrignore bzrlib/plugins/grep/NEWS
21+# bzr export still create some empty dirs that need to be removed
22+# bzrlib/plugins/weave_fmt/tests/ bzrlib/store/revision/ doc/ja/_templates/ man1/ man1
23+recursive-include tools/win32 *
24 recursive-include bzrlib *.py *.pyx *.pxd *.txt *.c *.h
25 recursive-include tools *.py *.sh
26+recursive-include apport *
27+recursive-include contrib *
28+recursive-include doc *
29+recursive-include po *
30
31=== modified file 'Makefile'
32--- Makefile 2016-04-03 16:32:31 +0000
33+++ Makefile 2017-01-17 15:27:25 +0000
34@@ -1,4 +1,4 @@
35-# Copyright (C) 2005-2012, 2016 Canonical Ltd
36+# Copyright (C) 2005-2012, 2016, 2017 Canonical Ltd
37 #
38 # This program is free software; you can redistribute it and/or modify
39 # it under the terms of the GNU General Public License as published by
40@@ -454,9 +454,6 @@
41 .PHONY: dist check-dist-tarball
42
43 # build a distribution source tarball
44-#
45-# this method of copying the pyrex generated files is a bit ugly; it would be
46-# nicer to generate it from distutils.
47 dist:
48 version=`./bzr version --short` && \
49 echo Building distribution of bzr $$version && \
50@@ -465,10 +462,8 @@
51 tarball=$$PWD/../bzr-$$version.tar.gz && \
52 $(MAKE) clean && \
53 $(MAKE) && \
54- bzr export $$expdir && \
55- cp bzrlib/*.c bzrlib/*.h $$expdir/bzrlib/. && \
56- tar cfz $$tarball -C $$expbasedir bzr-$$version && \
57- gpg --detach-sign $$tarball && \
58+ $(PYTHON) setup.py sdist -d $$PWD/.. && \
59+ gpg --detach-sign --armor $$tarball && \
60 rm -rf $$expbasedir
61
62 # run all tests in a previously built tarball
63
64=== modified file 'bzr'
65--- bzr 2016-02-01 19:26:41 +0000
66+++ bzr 2017-01-17 15:27:25 +0000
67@@ -1,6 +1,6 @@
68 #! /usr/bin/env python
69
70-# Copyright (C) 2005-2013, 2016 Canonical Ltd
71+# Copyright (C) 2005-2013, 2016, 2017 Canonical Ltd
72 #
73 # This program is free software; you can redistribute it and/or modify
74 # it under the terms of the GNU General Public License as published by
75
76=== modified file 'bzrlib/__init__.py'
77--- bzrlib/__init__.py 2016-02-01 19:26:41 +0000
78+++ bzrlib/__init__.py 2017-01-17 15:27:25 +0000
79@@ -1,4 +1,4 @@
80-# Copyright (C) 2005-2013, 2016 Canonical Ltd
81+# Copyright (C) 2005-2013, 2016, 2017 Canonical Ltd
82 #
83 # This program is free software; you can redistribute it and/or modify
84 # it under the terms of the GNU General Public License as published by
85
86=== modified file 'bzrlib/lazy_regex.py'
87--- bzrlib/lazy_regex.py 2011-12-19 13:23:58 +0000
88+++ bzrlib/lazy_regex.py 2017-01-17 15:27:25 +0000
89@@ -1,4 +1,4 @@
90-# Copyright (C) 2006 Canonical Ltd
91+# Copyright (C) 2006, 2008-2011, 2017 Canonical Ltd
92 #
93 # This program is free software; you can redistribute it and/or modify
94 # it under the terms of the GNU General Public License as published by
95@@ -131,3 +131,13 @@
96 raise AssertionError(
97 "re.compile has already been overridden as lazy_compile, but this would" \
98 " cause infinite recursion")
99+
100+
101+# re.finditer get confused if it receives a LazyRegex
102+if getattr(re, 'finditer', None is not None):
103+ def finditer_public(pattern, string, flags=0):
104+ if isinstance(pattern, LazyRegex):
105+ return pattern.finditer(string)
106+ else:
107+ return _real_re_compile(pattern, flags).finditer(string)
108+re.finditer = finditer_public
109
110=== modified file 'bzrlib/tests/test_diff.py'
111--- bzrlib/tests/test_diff.py 2016-02-01 18:06:32 +0000
112+++ bzrlib/tests/test_diff.py 2017-01-17 15:27:25 +0000
113@@ -1,4 +1,4 @@
114-# Copyright (C) 2005-2012, 2014, 2016 Canonical Ltd
115+# Copyright (C) 2005-2012, 2014, 2016, 2017 Canonical Ltd
116 #
117 # This program is free software; you can redistribute it and/or modify
118 # it under the terms of the GNU General Public License as published by
119@@ -313,8 +313,6 @@
120 pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE,
121 stdin=subprocess.PIPE)
122 out, err = pipe.communicate()
123- # Diff returns '2' on Binary files.
124- self.assertEqual(2, pipe.returncode)
125 # We should output whatever diff tells us, plus a trailing newline
126 self.assertEqual(out.splitlines(True) + ['\n'], lines)
127
128
129=== modified file 'bzrlib/tests/test_http.py'
130--- bzrlib/tests/test_http.py 2016-02-01 18:06:32 +0000
131+++ bzrlib/tests/test_http.py 2017-01-17 15:27:25 +0000
132@@ -1,4 +1,4 @@
133-# Copyright (C) 2005-2012, 2015, 2016 Canonical Ltd
134+# Copyright (C) 2005-2012, 2015, 2016, 2017 Canonical Ltd
135 #
136 # This program is free software; you can redistribute it and/or modify
137 # it under the terms of the GNU General Public License as published by
138@@ -260,6 +260,16 @@
139 self.assertEqual('basic', scheme)
140 self.assertEqual('realm="Thou should not pass"', remainder)
141
142+ def test_build_basic_header_with_long_creds(self):
143+ handler = _urllib2_wrappers.BasicAuthHandler()
144+ user = 'user' * 10 # length 40
145+ password = 'password' * 5 # length 40
146+ header = handler.build_auth_header(
147+ dict(user=user, password=password), None)
148+ # https://bugs.launchpad.net/bzr/+bug/1606203 was caused by incorrectly
149+ # creating a header value with an embedded '\n'
150+ self.assertFalse('\n' in header)
151+
152 def test_basic_extract_realm(self):
153 scheme, remainder = self.parse_header(
154 'Basic realm="Thou should not pass"',
155@@ -1273,6 +1283,8 @@
156 self.no_proxy_host = self.server_host_port
157 # The secondary server is the proxy
158 self.proxy_url = self.get_secondary_url()
159+ if self._testing_pycurl():
160+ self.proxy_url = self.proxy_url.replace('+pycurl', '')
161
162 def _testing_pycurl(self):
163 # TODO: This is duplicated for lots of the classes in this file
164@@ -1853,7 +1865,10 @@
165 ])
166
167 def get_user_transport(self, user, password):
168- self.overrideEnv('all_proxy', self.get_user_url(user, password))
169+ proxy_url = self.get_user_url(user, password)
170+ if self._testing_pycurl():
171+ proxy_url = proxy_url.replace('+pycurl', '')
172+ self.overrideEnv('all_proxy', proxy_url)
173 return TestAuth.get_user_transport(self, user, password)
174
175 def test_empty_pass(self):
176
177=== modified file 'bzrlib/transport/http/_pycurl.py'
178--- bzrlib/transport/http/_pycurl.py 2011-12-19 13:23:58 +0000
179+++ bzrlib/transport/http/_pycurl.py 2017-01-17 15:27:25 +0000
180@@ -1,4 +1,4 @@
181-# Copyright (C) 2006-2010 Canonical Ltd
182+# Copyright (C) 2006-2011, 2017 Canonical Ltd
183 #
184 # This program is free software; you can redistribute it and/or modify
185 # it under the terms of the GNU General Public License as published by
186@@ -85,6 +85,9 @@
187 """
188 return pycurl.__dict__.get(symbol, default)
189
190+# Yes, weird but returned on weird http error (invalid status line)
191+CURLE_FTP_WEIRD_SERVER_REPLY = _get_pycurl_errcode(
192+ 'E_FTP_WEIRD_SERVER_REPLY', 8)
193 CURLE_COULDNT_CONNECT = _get_pycurl_errcode('E_COULDNT_CONNECT', 7)
194 CURLE_COULDNT_RESOLVE_HOST = _get_pycurl_errcode('E_COULDNT_RESOLVE_HOST', 6)
195 CURLE_COULDNT_RESOLVE_PROXY = _get_pycurl_errcode('E_COULDNT_RESOLVE_PROXY', 5)
196@@ -397,6 +400,7 @@
197 if e[0] in (CURLE_COULDNT_RESOLVE_HOST,
198 CURLE_COULDNT_RESOLVE_PROXY,
199 CURLE_COULDNT_CONNECT,
200+ CURLE_FTP_WEIRD_SERVER_REPLY,
201 CURLE_GOT_NOTHING,
202 CURLE_SSL_CACERT,
203 CURLE_SSL_CACERT_BADFILE,
204
205=== modified file 'bzrlib/transport/http/_urllib2_wrappers.py'
206--- bzrlib/transport/http/_urllib2_wrappers.py 2016-01-31 12:55:31 +0000
207+++ bzrlib/transport/http/_urllib2_wrappers.py 2017-01-17 15:27:25 +0000
208@@ -1,4 +1,4 @@
209-# Copyright (C) 2006-2013, 2016 Canonical Ltd
210+# Copyright (C) 2006-2013, 2016, 2017 Canonical Ltd
211 #
212 # This program is free software; you can redistribute it and/or modify
213 # it under the terms of the GNU General Public License as published by
214@@ -48,6 +48,7 @@
215 # actual code more or less do that, tests should be written to
216 # ensure that.
217
218+import base64
219 import errno
220 import httplib
221 import os
222@@ -1491,7 +1492,7 @@
223
224 def build_auth_header(self, auth, request):
225 raw = '%s:%s' % (auth['user'], auth['password'])
226- auth_header = 'Basic ' + raw.encode('base64').strip()
227+ auth_header = 'Basic ' + base64.b64encode(raw)
228 return auth_header
229
230 def extract_realm(self, header_value):
231
232=== modified file 'bzrlib/transport/sftp.py'
233--- bzrlib/transport/sftp.py 2016-01-21 17:48:07 +0000
234+++ bzrlib/transport/sftp.py 2017-01-17 15:27:25 +0000
235@@ -1,4 +1,4 @@
236-# Copyright (C) 2005-2011, 2016 Canonical Ltd
237+# Copyright (C) 2005-2011, 2016, 2017 Canonical Ltd
238 #
239 # This program is free software; you can redistribute it and/or modify
240 # it under the terms of the GNU General Public License as published by
241@@ -410,8 +410,9 @@
242 try:
243 path = self._remote_path(relpath)
244 f = self._get_sftp().file(path, mode='rb')
245+ size = f.stat().st_size
246 if self._do_prefetch and (getattr(f, 'prefetch', None) is not None):
247- f.prefetch()
248+ f.prefetch(size)
249 return f
250 except (IOError, paramiko.SSHException), e:
251 self._translate_io_exception(e, path, ': error retrieving',
252
253=== modified file 'doc/developers/releasing.txt'
254--- doc/developers/releasing.txt 2013-08-05 12:16:25 +0000
255+++ doc/developers/releasing.txt 2017-01-17 15:27:25 +0000
256@@ -513,7 +513,7 @@
257 ----------------------------
258
259 #. Post to the ``bazaar@lists.canonical.com`` and
260- ``bzr-packagers@list.launchpad.net`` lists, saying that the source has
261+ ``bzr-packagers@lists.launchpad.net`` lists, saying that the source has
262 been frozen. Be extra clear that this is only a *source* release targeted
263 at packagers and installer builders (see
264 <https://bugs.launchpad.net/launchpad/+bug/645084>). This is the cue for
265@@ -551,12 +551,12 @@
266 <http://doc.bazaar.canonical.com>. It should be automatically build when
267 the branch is created, by a cron script ``update-bzr-docs`` on
268 ``escudero``. When the first release is created in a new series, a branch
269- needs to be created on zhongshan::
270+ needs to be created on ``escudero``::
271
272- ssh zhongshan.canonical.com
273+ ssh escudero.canonical.com
274 sudo -u bzr-web -s
275 cd /srv/doc.bazaar.canonical.com/
276- bzr branch http://bazaar.launchpad.net/~bzr-pqm/bzr/2.6 bzr/bzr.2.6
277+ bzr branch lp:bzr/2.7 bzr/bzr.2.7
278
279 And the ``bzr/bin/update-bzr-docs`` script needs to refer to it.
280
281@@ -640,17 +640,48 @@
282 #. Update `<http://en.wikipedia.org/wiki/Bazaar_(software)>`_ -- this should
283 be done for the stable and beta releases.
284
285-#. Update the python package index: <http://pypi.python.org/pypi/bzr> - best
286- done by running ::
287-
288- python setup.py register
289+#. Update the python package index: <http://pypi.python.org/pypi/bzr>
290+
291+ From the tarball created and tested earlier ::
292+
293+ twine upload -s ../bzr-2.7.0.tar.gz
294
295 Remember to check the results afterward -- this should be done for
296 stable releases but not for beta releases nor SRUs.
297
298- To be able to register the release you must create an account on
299- <http://pypi.python.org/pypi> and have one of the existing owners of
300- the project add you to the group.
301+ The ``twine`` command is provided by the ``twine`` package on Debian and
302+ Ubuntu.
303+
304+ If in doubt, you can test with <https://testpypi.python.org/pypi> where
305+ you can register yourself, register the bzr project and upload (and then
306+ remove the upload and delete the project so a new release manager can
307+ enjoy the same facilities). If the project already exists, have one of
308+ the existing owners of the project add you to the group.
309+
310+ To use the pypi test site, you need to record your credentials for an
311+ existing user (the registration process is manual and starts at
312+ <https://testpypi.python.org/pypi?%3Aaction=register_form>.
313+
314+ Once registered, you can record your crdentials in your ``~/pypirc`` file
315+ with ::
316+
317+ [testpypi]
318+ username:<login on testpypi>
319+ password:<password on testpypi>
320+ repository = https://testpypi.python.org/pypi
321+
322+ Registering the bzr project if doesn't exist is achieved with::
323+
324+ python setup.py -r https://testpypi.python.org/pypi register
325+
326+ Uploading is done with::
327+
328+ twine upload -r testpypi -s ../bzr-2.7.0.tar.gz
329+
330+ To be able to upload the release you must create an account on
331+ <http://pypi.python.org/pypi> and have one of the existing owners of the
332+ project add you to the group and update your ``[pypi]`` section in your
333+ ``~/pypirc`` file.
334
335
336 Merging the released code back to trunk
337
338=== modified file 'doc/en/release-notes/bzr-2.7.txt'
339--- doc/en/release-notes/bzr-2.7.txt 2016-02-01 18:09:33 +0000
340+++ doc/en/release-notes/bzr-2.7.txt 2017-01-17 15:27:25 +0000
341@@ -5,6 +5,65 @@
342 .. toctree::
343 :maxdepth: 1
344
345+bzr 2.7.1
346+#########
347+
348+:2.7.1: NOT RELEASED YET
349+
350+
351+External Compatibility Breaks
352+*****************************
353+
354+None.
355+
356+New Features
357+************
358+
359+None.
360+
361+Improvements
362+************
363+
364+None.
365+
366+
367+Bug Fixes
368+*********
369+
370+* Complete monkey-patching of re.finditer or LazyRegexps leak.
371+ (Vincent Ladeuil, #1644003)
372+
373+* Cope with paramiko making argument to SFTPFile.prefetch() mandatory.
374+ (Jelmer Vernooij, #1579093)
375+
376+Documentation
377+*************
378+
379+* Clarify pypi uploads for releases. (Vincent Ladeuil, #1542903)
380+
381+API Changes
382+***********
383+
384+None.
385+
386+Internals
387+*********
388+
389+None.
390+
391+Changed Behaviour
392+*****************
393+
394+None.
395+
396+Testing
397+*******
398+
399+* Recent versions of pycurl started being stricter about the proxy url,
400+ using 'http+pycurl:' is not allowed anymore and should just be 'http:'
401+ (Vincent Ladeuil, #1645017).
402+
403+
404 bzr 2.7.0
405 #########
406
407
408=== modified file 'doc/en/release-notes/bzr-2.8.txt'
409--- doc/en/release-notes/bzr-2.8.txt 2016-04-03 16:32:31 +0000
410+++ doc/en/release-notes/bzr-2.8.txt 2017-01-17 15:27:25 +0000
411@@ -56,10 +56,9 @@
412 Testing
413 *******
414
415-.. Fixes and changes that are only relevant to bzr's test framework and
416- suite. This can include new facilities for writing tests, fixes to
417- spurious test failures and changes to the way things should be tested.
418-
419+* POSIX mandates diff to exit with status 1 (was 2 previously), bzr didn't
420+ rely on that feature but one of the tests did.
421+ (Vincent Ladeuil, #1622039)
422
423 ..
424 vim: tw=74 ft=rst ff=unix