Rev 5199: (andrew) Merge lp:bzr/2.1 into lp:bzr, including fix for #528041. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon May 3 07:25:47 BST 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5199 [merge]
revision-id: pqm at pqm.ubuntu.com-20100503062546-wn9nc683p0m0angh
parent: pqm at pqm.ubuntu.com-20100503051000-ax5yg7yz7p5ks1da
parent: andrew.bennetts at canonical.com-20100503040850-wm4v7qx6wx3u7ns1
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2010-05-03 07:25:46 +0100
message:
(andrew) Merge lp:bzr/2.1 into lp:bzr, including fix for #528041.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/plugins/news_merge/__init__.py __init__.py-20100113072530-qj0i1em8th5pqhat-3
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
bzrlib/tests/per_repository_reference/test_default_stacking.py test_default_stackin-20090311055345-9ajahgm58oq3wh6h-1
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
doc/en/Makefile makefile-20090722133816-63ik5s6s5gsnz7zy-11
=== modified file 'NEWS'
--- a/NEWS 2010-04-30 07:09:01 +0000
+++ b/NEWS 2010-05-03 04:08:50 +0000
@@ -52,6 +52,10 @@
* Don't mention --no-strict when we just issue the warning about unclean trees.
(Vincent Ladeuil, #401599)
+* Fixed ``AssertionError`` when accessing smart servers running Bazaar
+ versions before 1.6.
+ (Andrew Bennetts, #528041)
+
* Reduce peak memory by one copy of compressed text.
(John Arbash Meinel, #566940)
@@ -95,6 +99,13 @@
Internals
*********
+* ``_remember_remote_is_before`` no longer raises AssertionError when
+ suboptimal network behaviour is noticed; instead it just mutters to the
+ log file (and warns the user if they have set the ``hpss`` debug flag).
+ This was causing unnecessary aborts for performance bugs that are minor
+ at worst.
+ (Andrew Bennetts, #528041)
+
* Permit bzr to run under ``python -OO`` which reduces the size of bytecode
files loaded from disk. To ensure docstrings needed for help are never
stripped, the prefix ``__doc__ =`` should now be used.
@@ -512,6 +523,38 @@
happens, and another warning will be written if the log file could not
be closed after retrying 100 times. (Andrew Bennetts, #531746)
+bzr 2.1.2
+#########
+
+:2.1.2: NOT RELEASED YET
+
+Bug Fixes
+*********
+
+* ``bzr switch`` does not die if a ConfigurableFileMerger is used.
+ (Aaron Bentley, #559436)
+
+* Fixed ``AssertionError`` when accessing smart servers running Bazaar
+ versions before 1.6.
+ (Andrew Bennetts, #528041)
+
+* Reset ``siginterrupt`` flag to False every time we handle a signal
+ installed with ``set_signal_handler(..., restart_syscall=True)`` (from
+ ``bzrlib.osutils``. Reduces the likelihood of "Interrupted System Call"
+ errors after two window resizes.
+ (Andrew Bennetts)
+
+Internals
+*********
+
+* ``_remember_remote_is_before`` no longer raises AssertionError when
+ suboptimal network behaviour is noticed; instead it just mutters to the
+ log file (and warns the user if they have set the ``hpss`` debug flag).
+ This was causing unnecessary aborts for performance bugs that are minor
+ at worst.
+ (Andrew Bennetts, #528041)
+
+
bzr 2.1.1
#########
@@ -545,6 +588,12 @@
problems importing bzrlib from a non-main thread.
(Elliot Murphy, #521989)
+* Repositories accessed via a smart server now reject being stacked on a
+ repository in an incompatible format, as is the case when accessing them
+ via other methods. This was causing fetches from those repositories via
+ a smart server (e.g. using ``bzr branch``) to receive invalid data.
+ (Andrew Bennetts, #562380)
+
* Standardize the error handling when creating a new ``StaticTuple``
(problems will raise TypeError). (Matt Nordhoff, #457979)
=== modified file 'bzrlib/plugins/news_merge/__init__.py'
--- a/bzrlib/plugins/news_merge/__init__.py 2010-04-16 12:59:03 +0000
+++ b/bzrlib/plugins/news_merge/__init__.py 2010-05-03 04:08:50 +0000
@@ -21,7 +21,6 @@
[/home/user/code/bzr]
news_merge_files = NEWS
- news_merge_files:policy = recurse
The news_merge_files config option takes a list of file paths, separated by
commas.
=== modified file 'bzrlib/smart/medium.py'
--- a/bzrlib/smart/medium.py 2010-03-18 23:11:15 +0000
+++ b/bzrlib/smart/medium.py 2010-05-03 04:08:50 +0000
@@ -607,10 +607,16 @@
# which is newer than a previously supplied older-than version.
# This indicates that some smart verb call is not guarded
# appropriately (it should simply not have been tried).
- raise AssertionError(
+ trace.mutter(
"_remember_remote_is_before(%r) called, but "
"_remember_remote_is_before(%r) was called previously."
- % (version_tuple, self._remote_version_is_before))
+ , version_tuple, self._remote_version_is_before)
+ if 'hpss' in debug.debug_flags:
+ ui.ui_factory.show_warning(
+ "_remember_remote_is_before(%r) called, but "
+ "_remember_remote_is_before(%r) was called previously."
+ % (version_tuple, self._remote_version_is_before))
+ return
self._remote_version_is_before = version_tuple
def protocol_version(self):
=== modified file 'bzrlib/tests/per_repository_reference/test_default_stacking.py'
--- a/bzrlib/tests/per_repository_reference/test_default_stacking.py 2010-04-26 13:51:08 +0000
+++ b/bzrlib/tests/per_repository_reference/test_default_stacking.py 2010-05-03 04:08:50 +0000
@@ -15,10 +15,10 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-from bzrlib.tests import per_repository
-
-
-class TestDefaultStackingPolicy(per_repository.TestCaseWithRepository):
+from bzrlib.tests.per_repository import TestCaseWithRepository
+
+
+class TestDefaultStackingPolicy(TestCaseWithRepository):
def test_sprout_to_smart_server_stacking_policy_handling(self):
"""Obey policy where possible, ignore otherwise."""
=== modified file 'bzrlib/tests/test_remote.py'
--- a/bzrlib/tests/test_remote.py 2010-04-20 00:20:00 +0000
+++ b/bzrlib/tests/test_remote.py 2010-05-03 04:08:50 +0000
@@ -418,9 +418,12 @@
# Calling _remember_remote_is_before again with a lower value works.
client_medium._remember_remote_is_before((1, 5))
self.assertTrue(client_medium._is_remote_before((1, 5)))
- # You cannot call _remember_remote_is_before with a larger value.
- self.assertRaises(
- AssertionError, client_medium._remember_remote_is_before, (1, 9))
+ # If you call _remember_remote_is_before with a higher value it logs a
+ # warning, and continues to remember the lower value.
+ self.assertNotContainsRe(self.get_log(), '_remember_remote_is_before')
+ client_medium._remember_remote_is_before((1, 9))
+ self.assertContainsRe(self.get_log(), '_remember_remote_is_before')
+ self.assertTrue(client_medium._is_remote_before((1, 5)))
class TestBzrDirCloningMetaDir(TestRemote):
@@ -528,6 +531,28 @@
self.assertIsInstance(bd, RemoteBzrDir)
self.assertFinished(client)
+ def test_backwards_compat_hpss_v2(self):
+ client, transport = self.make_fake_client_and_transport()
+ # Monkey-patch fake client to simulate real-world behaviour with v2
+ # server: upon first RPC call detect the protocol version, and because
+ # the version is 2 also do _remember_remote_is_before((1, 6)) before
+ # continuing with the RPC.
+ orig_check_call = client._check_call
+ def check_call(method, args):
+ client._medium._protocol_version = 2
+ client._medium._remember_remote_is_before((1, 6))
+ client._check_call = orig_check_call
+ client._check_call(method, args)
+ client._check_call = check_call
+ client.add_expected_call(
+ 'BzrDir.open_2.1', ('quack/',), 'unknown', ('BzrDir.open_2.1',))
+ client.add_expected_call(
+ 'BzrDir.open', ('quack/',), 'success', ('yes',))
+ bd = RemoteBzrDir(transport, remote.RemoteBzrDirFormat(),
+ _client=client, _force_probe=True)
+ self.assertIsInstance(bd, RemoteBzrDir)
+ self.assertFinished(client)
+
class TestBzrDirOpenBranch(TestRemote):
=== modified file 'doc/en/Makefile'
--- a/doc/en/Makefile 2009-09-08 12:33:30 +0000
+++ b/doc/en/Makefile 2010-03-25 10:09:32 +0000
@@ -11,6 +11,22 @@
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# Note that this assumes name of the output dir is same as name of the rule.
+define make_output_dirs
+# Create output directory (only needed for sphinx < 0.5)
+[ -d _build ] || mkdir _build
+[ -d "_build/$@" ] || mkdir "_build/$@"
+# Workaround for a bug in sphinx < 0.5 where it tries to delete
+# nonexistent static dirs and does not catch the exception. This was
+# fixed in svn+ssh://pythondev@svn.python.org/doctools/branches/0.4.x
+# at r65551 and merged as 280b62246342 in hg branch released as 0.5.
+[ -d "_build/$@/_static" ] || mkdir "_build/$@/_static"
+for fn in _static/*; do \
+ [ ! -d "$$fn" ] && continue; \
+ [ -d "_build/$@/$$fn" ] || mkdir "_build/$@/$$fn"; \
+done
+endef
+
.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
help:
@@ -30,32 +46,38 @@
-rm -rf _build/*
html:
+ $(make_output_dirs)
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
@echo
@echo "Build finished. The HTML pages are in _build/html."
dirhtml:
+ $(make_output_dirs)
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
@echo
@echo "Build finished. The HTML pages are in _build/dirhtml."
pickle:
+ $(make_output_dirs)
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
+ $(make_output_dirs)
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
+ $(make_output_dirs)
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in _build/htmlhelp."
qthelp:
+ $(make_output_dirs)
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
@@ -65,6 +87,7 @@
@echo "# assistant -collectionFile _build/qthelp/Bazaar.qhc"
latex:
+ $(make_output_dirs)
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
@echo
@echo "Build finished; the LaTeX files are in _build/latex."
@@ -72,17 +95,20 @@
"run these through (pdf)latex."
changes:
+ $(make_output_dirs)
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
@echo
@echo "The overview file is in _build/changes."
linkcheck:
+ $(make_output_dirs)
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in _build/linkcheck/output.txt."
doctest:
+ $(make_output_dirs)
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in _build/doctest/output.txt."
More information about the bazaar-commits
mailing list