Rev 4546: Don't double-decode directory names in dirstate delta applications. in http://bazaar.launchpad.net/~lifeless/bzr/apply-inventory-delta

Robert Collins robertc at robertcollins.net
Mon Jul 20 05:43:09 BST 2009


At http://bazaar.launchpad.net/~lifeless/bzr/apply-inventory-delta

------------------------------------------------------------
revno: 4546
revision-id: robertc at robertcollins.net-20090720044306-hx9ah6m9b93035l6
parent: robertc at robertcollins.net-20090720044236-936coobxl3hsdg28
committer: Robert Collins <robertc at robertcollins.net>
branch nick: apply-inventory-delta
timestamp: Mon 2009-07-20 14:43:06 +1000
message:
  Don't double-decode directory names in dirstate delta applications.
=== modified file 'bzrlib/dirstate.py'
--- a/bzrlib/dirstate.py	2009-07-17 02:16:43 +0000
+++ b/bzrlib/dirstate.py	2009-07-20 04:43:06 +0000
@@ -1317,11 +1317,10 @@
                     raise errors.InconsistentDelta(new_path, file_id,
                         "new_path with no entry")
                 new_path = new_path.encode('utf-8')
-                dirname, basename = osutils.split(new_path)
-                dirname_utf8 = encode(dirname)
+                dirname_utf8, basename = osutils.split(new_path)
                 if basename:
                     parents.add((dirname_utf8, inv_entry.parent_id))
-                key = (dirname, basename, file_id)
+                key = (dirname_utf8, basename, file_id)
                 minikind = DirState._kind_to_minikind[inv_entry.kind]
                 if minikind == 't':
                     fingerprint = inv_entry.reference_revision




More information about the bazaar-commits mailing list