Merge lp:~hid-iwata/bzr-svn/fix-795994 into lp:bzr-svn/1.1

Proposed by IWATA Hidetaka
Status: Merged
Merged at revision: 3788
Proposed branch: lp:~hid-iwata/bzr-svn/fix-795994
Merge into: lp:bzr-svn/1.1
Diff against target: 44 lines (+18/-1)
2 files modified
commit.py (+1/-1)
tests/test_commit.py (+17/-0)
To merge this branch: bzr merge lp:~hid-iwata/bzr-svn/fix-795994
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) Approve
Review via email: mp+70211@code.launchpad.net

Description of the change

test and fix for #795994

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Thanks! Nice work.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'commit.py'
2--- commit.py 2011-07-22 21:53:07 +0000
3+++ commit.py 2011-08-02 19:36:36 +0000
4@@ -365,7 +365,7 @@
5 child_base = (base_tree, base_url, base_revnum)
6 # open if they existed at the same location and
7 # the directory was touched
8- elif new_child_path in visit_dirs:
9+ elif new_child_path.decode('utf-8') in visit_dirs:
10 trace.mutter('open dir %r', new_child_path)
11
12 child_editor = dir_editor.open_directory(
13
14=== modified file 'tests/test_commit.py'
15--- tests/test_commit.py 2011-07-30 12:52:04 +0000
16+++ tests/test_commit.py 2011-08-02 19:36:36 +0000
17@@ -374,6 +374,22 @@
18 self.assertEqual(2, result.old_revno)
19 self.assertEquals(3, result.new_revno)
20
21+ def test_add_file_to_unicode_folder(self):
22+ self.requireFeature(UnicodeFilenameFeature)
23+ self.build_tree({u'dc/I²C/': None})
24+ wt = self.newdir.open_workingtree()
25+ wt.add(u'I²C')
26+ wt.commit(message="Commit from Bzr")
27+ self.build_tree({u'dc/I²C/file': 'data'})
28+ wt.add(u'I²C/file')
29+ wt.commit(message="Commit from Bzr2")
30+ result = self.olddir.open_branch().pull(self.newdir.open_branch())
31+ self.assertEquals(2, result.old_revno)
32+ self.assertEquals(4, result.new_revno)
33+ owt = self.olddir.open_workingtree()
34+ owt.update()
35+ self.assertTrue(owt.has_filename(u'I²C/file'))
36+
37 def test_rename_from_unicode_filename(self):
38 self.requireFeature(UnicodeFilenameFeature)
39 self.build_tree({u'dc/I²C': 'other data'})
40@@ -802,3 +818,4 @@
41 editor = SendPropChangesTests.RecordingFileEditor()
42 file_editor_send_prop_changes(ie1, ie2, editor)
43 self.assertEquals(editor._props, {})
44+

Subscribers

People subscribed via source and target branches