Rev 4933: (jam) merge stable, including fix #495023, update codename in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Jan 5 04:53:50 GMT 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4933 [merge]
revision-id: pqm at pqm.ubuntu.com-20100105045349-91sjr8vmex9iy8ex
parent: pqm at pqm.ubuntu.com-20100105004911-i582o8sqfqt7t7bn
parent: john at arbash-meinel.com-20100105040835-sq0zrv5dte8sqqib
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2010-01-05 04:53:49 +0000
message:
(jam) merge stable, including fix #495023, update codename
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/_dirstate_helpers_pyx.pyx dirstate_helpers.pyx-20070503201057-u425eni465q4idwn-3
bzrlib/tests/test__dirstate_helpers.py test_dirstate_helper-20070504035751-jsbn00xodv0y1eve-2
=== modified file 'NEWS'
--- a/NEWS 2010-01-04 05:40:01 +0000
+++ b/NEWS 2010-01-05 04:08:35 +0000
@@ -8,7 +8,7 @@
bzr 2.1.0rc1 (not released yet)
###############################
-:Codename: mysterioso
+:Codename: the 'new' stable
:2.1.0rc1: 2009-01-06 (expected)
Compatibility Breaks
@@ -127,7 +127,7 @@
############################
:Codename:
-:2.0.4: ???
+:2.0.4: smooth sailing
Compatibility Breaks
********************
@@ -160,6 +160,10 @@
changed underneath it (like another autopack). Now concurrent
autopackers will properly succeed. (John Arbash Meinel, #495000)
+* ``_update_current_block`` no longer suppresses exceptions, so ^C at just
+ the right time will get propagated, rather than silently failing to move
+ the block pointer. (John Arbash Meinel, Gareth White, #495023)
+
Improvements
************
=== modified file 'bzrlib/_dirstate_helpers_pyx.pyx'
--- a/bzrlib/_dirstate_helpers_pyx.pyx 2009-10-02 05:43:41 +0000
+++ b/bzrlib/_dirstate_helpers_pyx.pyx 2010-01-05 04:08:35 +0000
@@ -1392,7 +1392,7 @@
# provide.
self.search_specific_file_parents.add('')
- cdef void _update_current_block(self):
+ cdef int _update_current_block(self) except -1:
if (self.block_index < len(self.state._dirblocks) and
osutils.is_inside(self.current_root, self.state._dirblocks[self.block_index][0])):
self.current_block = self.state._dirblocks[self.block_index]
@@ -1401,6 +1401,7 @@
else:
self.current_block = None
self.current_block_list = None
+ return 0
def __next__(self):
# Simple thunk to allow tail recursion without pyrex confusion
=== modified file 'bzrlib/tests/test__dirstate_helpers.py'
--- a/bzrlib/tests/test__dirstate_helpers.py 2009-12-22 15:50:40 +0000
+++ b/bzrlib/tests/test__dirstate_helpers.py 2010-01-05 04:08:35 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2008 Canonical Ltd
+# Copyright (C) 2007, 2008, 2009 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
@@ -1293,6 +1293,25 @@
tree.unlock()
self.assertEqual(sorted(expected), sorted(file_ids))
+ def test_exceptions_raised(self):
+ # This is a direct test of bug #495023, it relies on osutils.is_inside
+ # getting called in an inner function. Which makes it a bit brittle,
+ # but at least it does reproduce the bug.
+ def is_inside_raises(*args, **kwargs):
+ raise RuntimeError('stop this')
+ tree = self.make_branch_and_tree('tree')
+ self.build_tree(['tree/file', 'tree/dir/', 'tree/dir/sub',
+ 'tree/dir2/', 'tree/dir2/sub2'])
+ tree.add(['file', 'dir', 'dir/sub', 'dir2', 'dir2/sub2'])
+ tree.commit('first commit')
+ tree.lock_read()
+ self.addCleanup(tree.unlock)
+ basis_tree = tree.basis_tree()
+ orig = osutils.is_inside
+ self.addCleanup(setattr, osutils, 'is_inside', orig)
+ osutils.is_inside = is_inside_raises
+ self.assertListRaises(RuntimeError, tree.iter_changes, basis_tree)
+
def test_simple_changes(self):
tree = self.make_branch_and_tree('tree')
self.build_tree(['tree/file'])
More information about the bazaar-commits
mailing list