Merge lp:~gz/bzr/merge_2.1_to_2.2 into lp:bzr/2.2

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

Commit message

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

Description of the change

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

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

Go !

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-10 04:48:18 +0000
3+++ NEWS 2010-12-16 16:08:30 +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 * Don't probe for a repository from within ``NotBranchError.__repr__``,
12 because this can cause knock-on errors at awkward times.
13 (Andrew Bennetts, #687653)
14@@ -246,6 +249,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 * Skip tests that needs a bzr source tree when there isn't one. This is
22 needed to succesfully run the test suite for installed versions.
23 (Vincent Ladeuil, #644855).
24@@ -375,6 +381,9 @@
25 Bug Fixes
26 *********
27
28+* Avoid UnicodeDecodeError in ``bzr add`` with multiple files under a non-ascii
29+ path on windows from symlink support addition. (Martin [gz], #686611)
30+
31 Improvements
32 ************
33
34
35=== modified file 'bzrlib/mutabletree.py'
36--- bzrlib/mutabletree.py 2010-08-16 03:43:35 +0000
37+++ bzrlib/mutabletree.py 2010-12-16 16:08:30 +0000
38@@ -418,7 +418,9 @@
39
40 # expand any symlinks in the directory part, while leaving the
41 # filename alone
42- file_list = map(osutils.normalizepath, file_list)
43+ # only expanding if symlinks are supported avoids windows path bugs
44+ if osutils.has_symlinks():
45+ file_list = map(osutils.normalizepath, file_list)
46
47 # validate user file paths and convert all paths to tree
48 # relative : it's cheaper to make a tree relative path an abspath
49
50=== modified file 'bzrlib/tests/blackbox/test_add.py'
51--- bzrlib/tests/blackbox/test_add.py 2010-02-23 07:43:11 +0000
52+++ bzrlib/tests/blackbox/test_add.py 2010-12-16 16:08:30 +0000
53@@ -217,3 +217,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(tests.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