Merge lp:~n142857/bzr-fastimport/unicode-symlinks into lp:bzr-fastimport

Proposed by Daniel Clemente on 2010-01-05
Status: Merged
Merge reported by: Jelmer Vernooij
Merged at revision: not available
Proposed branch: lp:~n142857/bzr-fastimport/unicode-symlinks
Merge into: lp:bzr-fastimport
Diff against target: 45 lines (+7/-6)
2 files modified
bzr_commit_handler.py (+5/-5)
commands.py (+2/-1)
To merge this branch: bzr merge lp:~n142857/bzr-fastimport/unicode-symlinks
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) code 2010-01-05 Approve on 2010-12-11
Review via email: mp+16882@code.launchpad.net
To post a comment you must log in.
Jelmer Vernooij (jelmer) wrote :

Thanks, merged (with some tweaks).

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzr_commit_handler.py'
2--- bzr_commit_handler.py 2009-12-11 14:55:04 +0000
3+++ bzr_commit_handler.py 2010-01-05 22:54:14 +0000
4@@ -302,7 +302,7 @@
5 # make sure the cache used by get_lines knows that
6 self.data_for_commit[file_id] = ''
7 elif kind == 'symlink':
8- ie.symlink_target = data.encode('utf8')
9+ ie.symlink_target = data.decode('utf8')
10 # There are no lines stored for a symlink so
11 # make sure the cache used by get_lines knows that
12 self.data_for_commit[file_id] = ''
13@@ -839,14 +839,14 @@
14 self._delete_item(filecmd.path, self.basis_inventory)
15
16 def copy_handler(self, filecmd):
17- src_path = filecmd.src_path
18- dest_path = filecmd.dest_path
19+ src_path = filecmd.src_path.decode("utf8")
20+ dest_path = filecmd.dest_path.decode("utf8")
21 self.debug("copying %s to %s", src_path, dest_path)
22 self._copy_item(src_path, dest_path, self.basis_inventory)
23
24 def rename_handler(self, filecmd):
25- old_path = filecmd.old_path
26- new_path = filecmd.new_path
27+ old_path = filecmd.old_path.decode("utf8")
28+ new_path = filecmd.new_path.decode("utf8")
29 self.debug("renaming %s to %s", old_path, new_path)
30 self._rename_item(old_path, new_path, self.basis_inventory)
31
32
33=== modified file 'commands.py'
34--- commands.py 2009-08-28 11:48:47 +0000
35+++ commands.py 2010-01-05 22:54:14 +0000
36@@ -331,7 +331,8 @@
37 elif self.dataref is None:
38 dataref = "inline"
39 if include_file_contents:
40- datastr = "\ndata %d\n%s" % (len(self.data), self.data)
41+ dataencoded = self.data.encode("utf8")
42+ datastr = "\ndata %d\n%s" % (len(dataencoded), dataencoded)
43 else:
44 dataref = "%s" % (self.dataref,)
45 path = format_path(self.path)

Subscribers

People subscribed via source and target branches