Commits

Wez Furlong  committed 7fc97ca

fix for an issue with symlinks. Ensure that we handle unicode props.

  • Participants
  • Parent commits 895a1b8

Comments (0)

Files changed (1)

File svn2hg/SvnImporter.py

     return None
   if name in props:
     v = props[name]
-#    if isinstance(v, unicode):
-#      return v.encode("utf-8")
-#    return v.decode("utf-8").encode("utf-8")
-    return v
+    if isinstance(v, unicode):
+      return v.encode("utf-8")
+    return v.decode("utf-8").encode("utf-8")
+#    return v
   return None
 
 """rdata is the constructed object from match_rule; this contains
       # hg doesn't version directories, so we need to perform some
       # translation
       if skind == svn_node_dir:
+        # there may be a symlink where we want to place this dir;
+        # speculatively synthesize a remove for it, otherwise we will not
+        # be able to check out this revision or its descendants
+        files[iname] = ('D', None, None)
         if copysname and (action == 'R' or action == 'A') and not branch_create:
           # Now additions for those from svn
           for f, ent in self.svn_ls(sname, srev.rev).iteritems():