Rev 5243: (lifeless) Merge 2.1 into trunk with a number of fixes including pyrex 0.9.9 in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu May 20 10:28:00 BST 2010
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5243 [merge]
revision-id: pqm at pqm.ubuntu.com-20100520092748-oa7knubtqio8l2rc
parent: pqm at pqm.ubuntu.com-20100520054344-xrqni611g1280mgb
parent: robertc at robertcollins.net-20100520080820-em0ud486vjuqamzp
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2010-05-20 10:27:48 +0100
message:
(lifeless) Merge 2.1 into trunk with a number of fixes including pyrex 0.9.9
support. (Robert Collins)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/_dirstate_helpers_pyx.pyx dirstate_helpers.pyx-20070503201057-u425eni465q4idwn-3
bzrlib/tests/features.py features.py-20090820042958-jglgza3wrn03ha9e-1
bzrlib/tests/test_cmdline.py bzrlibteststest_cmdl-20100202043522-83yorxx3tcigi7ap-2
bzrlib/tests/test_diff.py testdiff.py-20050727164403-d1a3496ebb12e339
bzrlib/tests/test_win32utils.py test_win32utils.py-20070713181630-8xsrjymd3e8mgw23-108
=== modified file 'NEWS'
--- a/NEWS 2010-05-20 03:20:04 +0000
+++ b/NEWS 2010-05-20 09:27:48 +0000
@@ -126,6 +126,9 @@
more comprehensible.
(Martin Pool, #491763)
+* Support Pyrex 0.9.9, required changing how we handle exceptions in Pyrex.
+ (John Arbash Meinel, #582656)
+
* Unicode characters in aliases are now handled correctly and do not cause
UnicodeEncodeError exception. (Parth Malwankar, #529930)
@@ -643,6 +646,10 @@
Bug Fixes
*********
+* ``bzr clean-tree`` should not delete nested bzrdirs. Required for proper
+ support of bzr-externals and scmproj plugins.
+ (Alexander Belchenko, bug #572098)
+
* ``bzr switch`` does not die if a ConfigurableFileMerger is used.
(Aaron Bentley, #559436)
@@ -656,6 +663,12 @@
errors after two window resizes.
(Andrew Bennetts)
+* Reduce peak memory by one copy of compressed text.
+ (John Arbash Meinel, #566940)
+
+* Support Pyrex 0.9.9, required changing how we handle exceptions in Pyrex.
+ (John Arbash Meinel, #582656)
+
Internals
*********
@@ -1105,12 +1118,20 @@
permissions as ``.bzr`` directory on a POSIX OS.
(Parth Malwankar, #262450)
+* Reduce peak memory by one copy of compressed text.
+ (John Arbash Meinel, #566940)
+
* 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)
+* Selftest with versions of subunit that support ``stopTestRun`` will no longer
+ error. This error was caused by 2.0 not being updated when upstream
+ python merged the end of run patch, which chose ``stopTestRun`` rather than
+ ``done``. (Robert Collins, #571437)
+
bzr 2.0.5
#########
=== modified file 'bzrlib/_dirstate_helpers_pyx.pyx'
--- a/bzrlib/_dirstate_helpers_pyx.pyx 2010-02-23 07:43:11 +0000
+++ b/bzrlib/_dirstate_helpers_pyx.pyx 2010-05-20 02:57:52 +0000
@@ -1219,7 +1219,7 @@
else:
try:
source_parent_id = self.old_dirname_to_file_id[old_dirname]
- except KeyError:
+ except KeyError, _:
source_parent_entry = self.state._get_entry(self.source_index,
path_utf8=old_dirname)
source_parent_id = source_parent_entry[0][2]
@@ -1236,7 +1236,7 @@
else:
try:
target_parent_id = self.new_dirname_to_file_id[new_dirname]
- except KeyError:
+ except KeyError, _:
# TODO: We don't always need to do the lookup, because the
# parent entry will be the same as the source entry.
target_parent_entry = self.state._get_entry(self.target_index,
@@ -1478,7 +1478,7 @@
# interface doesn't require it.
try:
self.current_root = self.search_specific_files.pop()
- except KeyError:
+ except KeyError, _:
raise StopIteration()
self.searched_specific_files.add(self.current_root)
# process the entries for this containing directory: the rest will be
@@ -1567,7 +1567,7 @@
# and e.winerror == ERROR_DIRECTORY
try:
e_winerror = e.winerror
- except AttributeError:
+ except AttributeError, _:
e_winerror = None
win_errors = (ERROR_DIRECTORY, ERROR_PATH_NOT_FOUND)
if (e.errno in win_errors or e_winerror in win_errors):
@@ -1656,7 +1656,7 @@
try:
self.current_dir_info = self.dir_iterator.next()
self.current_dir_list = self.current_dir_info[1]
- except StopIteration:
+ except StopIteration, _:
self.current_dir_info = None
else: #(dircmp > 0)
# We have a dirblock entry for this location, but there
@@ -1803,7 +1803,7 @@
and stat.S_IEXEC & current_path_info[3].st_mode)
try:
relpath_unicode = self.utf8_decode(current_path_info[0])[0]
- except UnicodeDecodeError:
+ except UnicodeDecodeError, _:
raise errors.BadFilenameEncoding(
current_path_info[0], osutils._fs_enc)
if changed is not None:
@@ -1851,7 +1851,7 @@
try:
self.current_dir_info = self.dir_iterator.next()
self.current_dir_list = self.current_dir_info[1]
- except StopIteration:
+ except StopIteration, _:
self.current_dir_info = None
cdef object _next_consistent_entries(self):
=== modified file 'bzrlib/tests/features.py'
--- a/bzrlib/tests/features.py 2010-03-18 06:25:23 +0000
+++ b/bzrlib/tests/features.py 2010-05-20 02:57:52 +0000
@@ -14,6 +14,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+"""A collection of commonly used 'Features' which bzrlib uses to skip tests."""
+
import os
import stat
@@ -27,6 +29,22 @@
subunit = tests.ModuleAvailableFeature('subunit')
+class _BackslashDirSeparatorFeature(tests.Feature):
+
+ def _probe(self):
+ try:
+ os.lstat(os.getcwd() + '\\')
+ except OSError:
+ return False
+ else:
+ return True
+
+ def feature_name(self):
+ return "Filesystem treats '\\' as a directory separator."
+
+backslashdir_feature = _BackslashDirSeparatorFeature()
+
+
class _PosixPermissionsFeature(tests.Feature):
def _probe(self):
=== modified file 'bzrlib/tests/test_cmdline.py'
--- a/bzrlib/tests/test_cmdline.py 2010-03-01 09:02:18 +0000
+++ b/bzrlib/tests/test_cmdline.py 2010-05-20 02:57:52 +0000
@@ -17,7 +17,9 @@
from bzrlib import (
cmdline,
- tests)
+ tests,
+ )
+from bzrlib.tests.features import backslashdir_feature
class TestSplitter(tests.TestCase):
@@ -91,3 +93,24 @@
u'"x x" "y y"')
self.assertAsTokens([(True, u'x x'), (True, u'y y')],
u'"x x" \'y y\'', single_quotes_allowed=True)
+
+ def test_n_backslashes_handling(self):
+ # https://bugs.launchpad.net/bzr/+bug/528944
+ # actually we care about the doubled backslashes when they're
+ # represents UNC paths.
+ # But in fact there is too much weird corner cases
+ # (see https://bugs.launchpad.net/tortoisebzr/+bug/569050)
+ # so to reproduce every bit of windows command-line handling
+ # could be not worth of efforts?
+ self.requireFeature(backslashdir_feature)
+ self.assertAsTokens([(True, r'\\host\path')], r'"\\host\path"')
+ self.assertAsTokens([(False, r'\\host\path')], r'\\host\path')
+ # handling of " after the 2n and 2n+1 backslashes
+ # inside and outside the quoted string
+ self.assertAsTokens([(True, r'\\'), (False, r'*.py')], r'"\\\\" *.py')
+ self.assertAsTokens([(True, r'\\" *.py')], r'"\\\\\" *.py"')
+ self.assertAsTokens([(True, r'\\ *.py')], r'\\\\" *.py"')
+ self.assertAsTokens([(False, r'\\"'), (False, r'*.py')],
+ r'\\\\\" *.py')
+ self.assertAsTokens([(True, u'\\\\')], u'"\\\\')
+
=== modified file 'bzrlib/tests/test_diff.py'
--- a/bzrlib/tests/test_diff.py 2010-04-20 14:04:54 +0000
+++ b/bzrlib/tests/test_diff.py 2010-05-20 08:08:20 +0000
@@ -33,7 +33,7 @@
transform,
)
from bzrlib.symbol_versioning import deprecated_in
-from bzrlib.tests import test_win32utils
+from bzrlib.tests import features
class _AttribFeature(tests.Feature):
@@ -1298,7 +1298,7 @@
diff_obj._get_command('old-path', 'new-path'))
def test_from_string_path_with_backslashes(self):
- self.requireFeature(test_win32utils.BackslashDirSeparatorFeature)
+ self.requireFeature(features.backslashdir_feature)
tool = 'C:\\Tools\\Diff.exe'
diff_obj = diff.DiffFromTool.from_string(tool, None, None, None)
self.addCleanup(diff_obj.finish)
=== modified file 'bzrlib/tests/test_win32utils.py'
--- a/bzrlib/tests/test_win32utils.py 2010-02-23 07:43:11 +0000
+++ b/bzrlib/tests/test_win32utils.py 2010-05-20 02:57:52 +0000
@@ -14,6 +14,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+"""Tests for win32utils."""
+
import os
import sys
@@ -29,25 +31,10 @@
TestSkipped,
UnicodeFilenameFeature,
)
+from bzrlib.tests.features import backslashdir_feature
from bzrlib.win32utils import glob_expand, get_app_path
-class _BackslashDirSeparatorFeature(tests.Feature):
-
- def _probe(self):
- try:
- os.lstat(os.getcwd() + '\\')
- except OSError:
- return False
- else:
- return True
-
- def feature_name(self):
- return "Filesystem treats '\\' as a directory separator."
-
-BackslashDirSeparatorFeature = _BackslashDirSeparatorFeature()
-
-
class _RequiredModuleFeature(Feature):
def __init__(self, mod_name):
@@ -121,7 +108,7 @@
])
def test_backslash_globbing(self):
- self.requireFeature(BackslashDirSeparatorFeature)
+ self.requireFeature(backslashdir_feature)
self.build_ascii_tree()
self._run_testset([
[[u'd\\'], [u'd/']],
@@ -164,7 +151,7 @@
])
def test_unicode_backslashes(self):
- self.requireFeature(BackslashDirSeparatorFeature)
+ self.requireFeature(backslashdir_feature)
self.build_unicode_tree()
self._run_testset([
# no wildcards
@@ -287,8 +274,6 @@
win32utils.set_file_attr_hidden(path)
-
-
class Test_CommandLineToArgv(tests.TestCaseInTempDir):
def assertCommandLine(self, expected, line, single_quotes_allowed=False):
@@ -338,6 +323,6 @@
self.assertCommandLine([u'A/b.c'], 'A/B*')
def test_backslashes(self):
- self.requireFeature(BackslashDirSeparatorFeature)
+ self.requireFeature(backslashdir_feature)
self.build_tree(['a/', 'a/b.c', 'a/c.c', 'a/c.h'])
self.assertCommandLine([u'a/b.c'], 'a\\b*')
More information about the bazaar-commits
mailing list