Rev 5069: (vila) Merge 2.1 into trunk including fixes for #331095, #507557, in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Mar 2 10:54:01 GMT 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5069 [merge]
revision-id: pqm at pqm.ubuntu.com-20100302105359-p9p4afvov2gsn1zx
parent: pqm at pqm.ubuntu.com-20100302084907-z4r0yoa4ldspjz82
parent: v.ladeuil+lp at free.fr-20100302102139-b5cba7h6xu13mekg
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2010-03-02 10:53:59 +0000
message:
(vila) Merge 2.1 into trunk including fixes for #331095, #507557,
#185103, #524184 and #369501
added:
NEWS-template.txt newstemplate.txt-20100219053124-f4a3zo3ujiyawh7n-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/lockdir.py lockdir.py-20060220222025-98258adf27fbdda3
bzrlib/tests/test_lockdir.py test_lockdir.py-20060220222025-33d4221569a3d600
doc/developers/_templates/layout.html layout.html-20090907074245-4b4pm5q3bjw2pt27-1
doc/en/_templates/index.html index.html-20090722133849-lus2rzwsmlhpgqhv-1
doc/en/_templates/layout.html layout.html-20090722133849-lus2rzwsmlhpgqhv-2
doc/en/admin-guide/hooks-plugins.txt hooksplugins.txt-20091205144603-lgpl0e0z6lzk2rdw-5
doc/es/_templates/layout.html layout.html-20090907060608-h0yq9dbax4xt09v5-1
doc/ru/_templates/layout.html layout.html-20090908150437-pppigv0c2cky3qbk-1
=== modified file 'NEWS'
--- a/NEWS 2010-03-02 08:17:39 +0000
+++ b/NEWS 2010-03-02 10:21:39 +0000
@@ -168,8 +168,13 @@
Documentation
*************
+* Added a link to the Desktop Guide. (Ian Clatworthy)
+
* Added What's New in Bazaar 2.1 document. (Ian Clatworthy)
+* Drop Google Analytics from the core docs as they caused problems
+ in the CHM files. (Ian Clatworthy, #502010)
+
bzr 2.1.0
#########
@@ -531,14 +536,32 @@
############################
:Codename:
-:2.0.5:
+:2.0.5: NOT RELEASED YET
Bug Fixes
*********
+* Avoid ``malloc(0)`` in ``patiencediff``, which is non-portable.
+ (Martin Pool, #331095)
+
+* Concurrent autopacking is more resilient to already-renamed pack files.
+ If we find that a file we are about to obsolete is already obsoleted, we
+ do not try to rename it, and we leave the file in ``obsolete_packs``.
+ The code is also fault tolerant if a file goes missing, assuming that
+ another process already removed the file.
+ (John Arbash Meinel, Gareth White, #507557)
+
+* Cope with the lockdir ``held/info`` file being empty, which seems to
+ happen fairly often if the process is suddenly interrupted while taking
+ a lock.
+ (Martin Pool, #185103)
+
* Handle renames correctly when there are files or directories that
differ only in case. (Chris Jones, Martin Pool, #368931)
+* Fixed CHM generation by moving the NEWS section template into
+ a separate file. (Ian Clatworthy, #524184)
+
* If ``bzr push --create-prefix`` triggers an unexpected ``NoSuchFile``
error, report that error rather than failing with an unhelpful
``UnboundLocalError``.
@@ -12034,37 +12057,5 @@
diff, status, etc.
-bzr ?.?.? (not released yet)
-############################
-
-:Codename: template
-:2.0.2: ???
-
-Compatibility Breaks
-********************
-
-New Features
-************
-
-Bug Fixes
-*********
-
-Improvements
-************
-
-Documentation
-*************
-
-API Changes
-***********
-
-Internals
-*********
-
-Testing
-*******
-
-
-
..
vim: tw=74 ft=rst ff=unix encoding=utf-8
=== added file 'NEWS-template.txt'
--- a/NEWS-template.txt 1970-01-01 00:00:00 +0000
+++ b/NEWS-template.txt 2010-02-19 07:13:45 +0000
@@ -0,0 +1,31 @@
+bzr ?.?.?
+#########
+
+:Codename: Nirvana
+:2.x.y: NOT RELEASED YET
+
+Compatibility Breaks
+********************
+
+New Features
+************
+
+Bug Fixes
+*********
+
+Improvements
+************
+
+Documentation
+*************
+
+API Changes
+***********
+
+Internals
+*********
+
+Testing
+*******
+
+
=== modified file 'bzrlib/lockdir.py'
--- a/bzrlib/lockdir.py 2010-02-17 17:11:16 +0000
+++ b/bzrlib/lockdir.py 2010-03-01 21:51:57 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2010 Canonical Ltd
+# Copyright (C) 2006, 2007, 2008, 2010 Canonical Ltd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -252,7 +252,7 @@
if info is None:
raise LockFailed(self, "lock was renamed into place, but "
"now is missing!")
- if info['nonce'] != self.nonce:
+ if info.get('nonce') != self.nonce:
self._trace("rename succeeded, "
"but lock is still held by someone else")
raise LockContention(self)
@@ -430,7 +430,7 @@
def peek(self):
"""Check if the lock is held by anyone.
- If it is held, this returns the lock info structure as a rio Stanza,
+ If it is held, this returns the lock info structure as a dict
which contains some information about the current lock holder.
Otherwise returns None.
"""
@@ -459,8 +459,14 @@
return s.to_string()
def _parse_info(self, info_bytes):
- # TODO: Handle if info_bytes is empty
- return rio.read_stanza(osutils.split_lines(info_bytes)).as_dict()
+ stanza = rio.read_stanza(osutils.split_lines(info_bytes))
+ if stanza is None:
+ # see bug 185013; we fairly often end up with the info file being
+ # empty after an interruption; we could log a message here but
+ # there may not be much we can say
+ return {}
+ else:
+ return stanza.as_dict()
def attempt_lock(self):
"""Take the lock; fail if it's already held.
@@ -611,11 +617,16 @@
def _format_lock_info(self, info):
"""Turn the contents of peek() into something for the user"""
lock_url = self.transport.abspath(self.path)
- delta = time.time() - int(info['start_time'])
+ start_time = info.get('start_time')
+ if start_time is None:
+ time_ago = '(unknown)'
+ else:
+ time_ago = format_delta(time.time() - int(info['start_time']))
return [
'lock %s' % (lock_url,),
- 'held by %(user)s on host %(hostname)s [process #%(pid)s]' % info,
- 'locked %s' % (format_delta(delta),),
+ 'held by %s on host %s [process #%s]' %
+ tuple([info.get(x, '<unknown>') for x in ['user', 'hostname', 'pid']]),
+ 'locked %s' % (time_ago,),
]
def validate_token(self, token):
=== modified file 'bzrlib/tests/test_lockdir.py'
--- a/bzrlib/tests/test_lockdir.py 2010-02-17 17:11:16 +0000
+++ b/bzrlib/tests/test_lockdir.py 2010-03-01 21:51:57 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2010 Canonical Ltd
+# Copyright (C) 2006, 2007, 2008, 2010 Canonical Ltd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -666,6 +666,25 @@
# no kibble
check_dir(['held'])
+ def test_no_lockdir_info(self):
+ """We can cope with empty info files."""
+ # This seems like a fairly common failure case - see
+ # <https://bugs.edge.launchpad.net/bzr/+bug/185103> and all its dupes.
+ # Processes are often interrupted after opening the file
+ # before the actual contents are committed.
+ t = self.get_transport()
+ t.mkdir('test_lock')
+ t.mkdir('test_lock/held')
+ t.put_bytes('test_lock/held/info', '')
+ lf = LockDir(t, 'test_lock')
+ info = lf.peek()
+ formatted_info = lf._format_lock_info(info)
+ self.assertEquals(
+ ['lock %s' % t.abspath('test_lock'),
+ 'held by <unknown> on host <unknown> [process #<unknown>]',
+ 'locked (unknown)'],
+ formatted_info)
+
class TestLockDirHooks(TestCaseWithTransport):
=== modified file 'doc/developers/_templates/layout.html'
--- a/doc/developers/_templates/layout.html 2010-01-29 10:36:23 +0000
+++ b/doc/developers/_templates/layout.html 2010-03-02 10:21:39 +0000
@@ -11,22 +11,3 @@
<a href="http://doc.bazaar.canonical.com/en/">Documentation</a> | </li>
{{ super() }}
{% endblock %}
-
-{% block document %}
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- try{
- var pageTracker = _gat._getTracker("UA-1018242-1");
- pageTracker._trackPageview();
- } catch(err) {}
- try {
- /* bazaar team tracker */
- var pageTracker = _gat._getTracker("UA-11329411-2");
- pageTracker._trackPageview();
- } catch(err) {}
-</script>
-{{ super() }}
-{% endblock %}
=== modified file 'doc/en/_templates/index.html'
--- a/doc/en/_templates/index.html 2010-02-23 07:43:11 +0000
+++ b/doc/en/_templates/index.html 2010-03-02 10:21:39 +0000
@@ -11,7 +11,7 @@
<span class="linkdescr">what's new in this release</span>
</p>
<p class="biglink"><a class="biglink" href="{{ pathto("user-guide/index") }}">User Guide</a><br/>
- <span class="linkdescr">how to use Bazaar effectively</span>
+ <span class="linkdescr">how to use the command line client</span>
</p>
<p class="biglink"><a class="biglink" href="{{ pathto("tutorials/index") }}">Tutorials</a><br/>
<span class="linkdescr">brief introductions</span>
@@ -39,17 +39,20 @@
<table class="contentstable" align="center" style="margin-left: 30px"><tr>
<td width="50%">
+ <p class="biglink"><a class="biglink" href="http://doc.bazaar.canonical.com/explorer/en/guide/">Desktop Guide</a><br/>
+ <span class="linkdescr">how to use our GUI applications</span>
+ </p>
<p class="biglink"><a class="biglink" href="https://answers.launchpad.net/bzr/+faqs">FAQ</a><br/>
<span class="linkdescr">frequently asked questions</span>
</p>
<p class="biglink"><a class="biglink" href="http://bazaar.canonical.com/BzrGlossary/">Glossary</a><br/>
<span class="linkdescr">help with terminology</span>
</p>
+ </td>
+ <td width="50%">
<p class="biglink"><a class="biglink" href="../developers/">Developer Docs</a><br/>
<span class="linkdescr">improving and extending bzr</span>
</p>
- </td>
- <td width="50%">
<p class="biglink"><a class="biglink" href="http://doc.bazaar.canonical.com/migration/en/">Migration Docs</a><br/>
<span class="linkdescr">for refugees of other tools</span>
</p>
=== modified file 'doc/en/_templates/layout.html'
--- a/doc/en/_templates/layout.html 2010-01-29 10:36:23 +0000
+++ b/doc/en/_templates/layout.html 2010-03-02 10:21:39 +0000
@@ -6,22 +6,3 @@
<a href="http://doc.bazaar.canonical.com/en/">Documentation</a> | </li>
{{ super() }}
{% endblock %}
-
-{% block document %}
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- try{
- var pageTracker = _gat._getTracker("UA-1018242-1");
- pageTracker._trackPageview();
- } catch(err) {}
- try {
- /* bazaar team tracker */
- var pageTracker = _gat._getTracker("UA-11329411-2");
- pageTracker._trackPageview();
- } catch(err) {}
-</script>
-{{ super() }}
-{% endblock %}
=== modified file 'doc/en/admin-guide/hooks-plugins.txt'
--- a/doc/en/admin-guide/hooks-plugins.txt 2009-12-11 15:04:15 +0000
+++ b/doc/en/admin-guide/hooks-plugins.txt 2010-03-01 05:15:11 +0000
@@ -22,7 +22,7 @@
purposes, as well as for backups and mirroring.
Information on the whole range of Bazaar plugins is available at
-http://doc.bazaar-vcs.org/en/plugin-guide. For purposes of installation,
+http://doc.bazaar.canonical.com/plugins/en/. For purposes of installation,
plugins are simply python packages. They can be installed alongside Bazaar in
the ``bzrlib.plugins`` package using each plugin's ``setup.py``. They can
also be installed in the plugin path which is the user's ``~/.bazaar/plugins``
=== modified file 'doc/es/_templates/layout.html'
--- a/doc/es/_templates/layout.html 2010-01-29 14:10:05 +0000
+++ b/doc/es/_templates/layout.html 2010-03-02 10:21:39 +0000
@@ -6,22 +6,3 @@
<a href="http://doc.bazaar.canonical.com/">Documentación</a> | </li>
{{ super() }}
{% endblock %}
-
-{% block document %}
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- try{
- var pageTracker = _gat._getTracker("UA-1018242-1");
- pageTracker._trackPageview();
- } catch(err) {}
- try {
- /* bazaar team tracker */
- var pageTracker = _gat._getTracker("UA-11329411-2");
- pageTracker._trackPageview();
- } catch(err) {}
-</script>
-{{ super() }}
-{% endblock %}
=== modified file 'doc/ru/_templates/layout.html'
--- a/doc/ru/_templates/layout.html 2010-01-29 10:36:23 +0000
+++ b/doc/ru/_templates/layout.html 2010-03-02 10:21:39 +0000
@@ -6,22 +6,3 @@
<a href="http://doc.bazaar.canonical.com/ru/">ÐокÑменÑаÑиÑ</a> | </li>
{{ super() }}
{% endblock %}
-
-{% block document %}
- <script type="text/javascript">
- var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
- document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
- </script>
- <script type="text/javascript">
- try{
- var pageTracker = _gat._getTracker("UA-1018242-1");
- pageTracker._trackPageview();
- } catch(err) {}
- try {
- /* bazaar team tracker */
- var pageTracker = _gat._getTracker("UA-11329411-2");
- pageTracker._trackPageview();
- } catch(err) {}
-</script>
-{{ super() }}
-{% endblock %}
More information about the bazaar-commits
mailing list