Rev 1377: Merge encoding fixes from Martin. in http://people.samba.org/bzr/jelmer/bzr-svn/0.4

Jelmer Vernooij jelmer at samba.org
Sun Jun 29 04:57:29 BST 2008


At http://people.samba.org/bzr/jelmer/bzr-svn/0.4

------------------------------------------------------------
revno: 1377
revision-id: jelmer at samba.org-20080629035727-vnkhndfi2p6ha9o1
parent: jelmer at samba.org-20080629032007-ufv3bon4atf0tah6
parent: martin.vgagern at gmx.net-20080610092407-zbbi3mb6gmp3prru
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Sun 2008-06-29 05:57:27 +0200
message:
  Merge encoding fixes from Martin.
modified:
  fileids.py                     fileids.py-20060714013623-u5iiyqqnko11grcf-1
  tree.py                        tree.py-20060624222557-dudlwqcmkf22lt2s-1
  workingtree.py                 workingtree.py-20060306120941-b083cb0fdd4a69de
    ------------------------------------------------------------
    revno: 1217.1.2
    revision-id: martin.vgagern at gmx.net-20080610092407-zbbi3mb6gmp3prru
    parent: martin.vgagern at gmx.net-20080608152338-p562hg8a8u931a6v
    committer: Martin von Gagern <Martin.vGagern at gmx.net>
    branch nick: bug128496
    timestamp: Tue 2008-06-10 11:24:07 +0200
    message:
      Untested attempt to solve issue from comment 16.
    modified:
      tree.py                        tree.py-20060624222557-dudlwqcmkf22lt2s-1
    ------------------------------------------------------------
    revno: 1217.1.1
    revision-id: martin.vgagern at gmx.net-20080608152338-p562hg8a8u931a6v
    parent: jelmer at samba.org-20080606173419-y24f9lfhl7aowj76
    committer: Martin von Gagern <Martin.vGagern at gmx.net>
    branch nick: bug128496
    timestamp: Sun 2008-06-08 17:23:38 +0200
    message:
      Use utf-8 for map keys in two places.
    modified:
      fileids.py                     fileids.py-20060714013623-u5iiyqqnko11grcf-1
      workingtree.py                 workingtree.py-20060306120941-b083cb0fdd4a69de
=== modified file 'fileids.py'
--- a/fileids.py	2008-06-28 01:53:01 +0000
+++ b/fileids.py	2008-06-29 03:57:27 +0000
@@ -225,7 +225,7 @@
         for ((create_revid,), line) in self.idmap_knit.annotate((revid,)):
             (filename, id, create_revid) = line.rstrip("\n").split("\t", 3)
             map[urllib.unquote(filename).decode("utf-8")] = (urllib.unquote(id), urllib.unquote(create_revid))
-            assert isinstance(map[urllib.unquote(filename)][0], str)
+            assert isinstance(map[urllib.unquote(filename).decode("utf-8")][0], str)
 
         return map
 

=== modified file 'tree.py'
--- a/tree.py	2008-06-27 00:08:44 +0000
+++ b/tree.py	2008-06-29 03:57:27 +0000
@@ -311,7 +311,7 @@
                 
                 if entry.kind == core.NODE_DIR:
                     subwc = wc.WorkingCopy(adm, 
-                            self.workingtree.abspath(subrelpath))
+                            self.workingtree.abspath(subrelpath).encode("utf-8"))
                     try:
                         add_dir_to_inv(subrelpath, subwc, id)
                     finally:

=== modified file 'workingtree.py'
--- a/workingtree.py	2008-06-26 16:34:37 +0000
+++ b/workingtree.py	2008-06-29 03:57:27 +0000
@@ -218,7 +218,7 @@
         assert isinstance(path, str)
 
         rp = self.branch.unprefix(path)
-        entry = self.basis_tree().id_map[rp]
+        entry = self.basis_tree().id_map[rp.decode("utf-8")]
         assert entry[0] is not None
         assert isinstance(entry[0], str), "fileid %r for %r is not a string" % (entry[0], path)
         return entry




More information about the bazaar-commits mailing list