Merge lp:~gz/bzr/merge_2.0_to_2.1 into lp:bzr/2.1

Proposed by Martin Packman
Status: Merged
Approved by: Vincent Ladeuil
Approved revision: no longer in the source branch.
Merged at revision: 4873
Proposed branch: lp:~gz/bzr/merge_2.0_to_2.1
Merge into: lp:bzr/2.1
Diff against target: 65 lines (+20/-2)
3 files modified
NEWS (+6/-0)
bzrlib/mutabletree.py (+3/-1)
bzrlib/tests/blackbox/test_add.py (+11/-1)
To merge this branch: bzr merge lp:~gz/bzr/merge_2.0_to_2.1
Reviewer Review Type Date Requested Status
Vincent Ladeuil Approve
Review via email: mp+43913@code.launchpad.net

Commit message

Merge 2.0 into 2.1 to pick up fix for lp:686611

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

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2010-12-02 09:20:16 +0000
3+++ NEWS 2010-12-16 15:03:09 +0000
4@@ -25,6 +25,9 @@
5 Bug Fixes
6 *********
7
8+* Avoid UnicodeDecodeError in ``bzr add`` with multiple files under a non-ascii
9+ path on windows from symlink support addition. (Martin [gz], #686611)
10+
11 * Skip tests that needs a bzr source tree when there isn't one. This is
12 needed to succesfully run the test suite for installed versions.
13 (Vincent Ladeuil, #644855).
14@@ -154,6 +157,9 @@
15 Bug Fixes
16 *********
17
18+* Avoid UnicodeDecodeError in ``bzr add`` with multiple files under a non-ascii
19+ path on windows from symlink support addition. (Martin [gz], #686611)
20+
21 Improvements
22 ************
23
24
25=== modified file 'bzrlib/mutabletree.py'
26--- bzrlib/mutabletree.py 2010-08-16 01:50:12 +0000
27+++ bzrlib/mutabletree.py 2010-12-16 15:03:09 +0000
28@@ -395,7 +395,9 @@
29
30 # expand any symlinks in the directory part, while leaving the
31 # filename alone
32- file_list = map(osutils.normalizepath, file_list)
33+ # only expanding if symlinks are supported avoids windows path bugs
34+ if osutils.has_symlinks():
35+ file_list = map(osutils.normalizepath, file_list)
36
37 # validate user file paths and convert all paths to tree
38 # relative : it's cheaper to make a tree relative path an abspath
39
40=== modified file 'bzrlib/tests/blackbox/test_add.py'
41--- bzrlib/tests/blackbox/test_add.py 2010-02-17 17:11:16 +0000
42+++ bzrlib/tests/blackbox/test_add.py 2010-12-16 15:03:09 +0000
43@@ -24,7 +24,8 @@
44 condition_isinstance,
45 split_suite_by_condition,
46 multiply_tests,
47- SymlinkFeature
48+ SymlinkFeature,
49+ UnicodeFilename,
50 )
51 from bzrlib.tests.blackbox import ExternalBase
52
53@@ -224,3 +225,12 @@
54 os.symlink(osutils.abspath('target'), 'tree/link')
55 out = self.run_bzr(['add', 'tree/link'])[0]
56 self.assertEquals(out, 'adding link\n')
57+
58+ def test_add_multiple_files_in_unicode_cwd(self):
59+ """Adding multiple files in a non-ascii cwd, see lp:686611"""
60+ self.requireFeature(UnicodeFilename)
61+ self.make_branch_and_tree(u"\xA7")
62+ self.build_tree([u"\xA7/a", u"\xA7/b"])
63+ out, err = self.run_bzr(["add", "a", "b"], working_dir=u"\xA7")
64+ self.assertEquals(out, "adding a\n" "adding b\n")
65+ self.assertEquals(err, "")

Subscribers

People subscribed via source and target branches