changeset 17441:cb12d3ce5607 stable

subrepo: encode unicode path names (issue3610) Subversion 1.7 changes its XML output to include an explicit encoding tag: <?xml version="1.0" encoding="UTF-8"?> This triggers xml.dom.minidom to always return unicode strings, causing other parts of the code to explode. We unconditionally encode path names before handing them back, which works with both str (actually a no-op) and unicode values.
author Bryan O'Sullivan <bryano@fb.com>
date Tue, 04 Sep 2012 15:46:04 -0700
parents 0cec762790ed
children b9698f19b929
files mercurial/subrepo.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/subrepo.py	Wed Aug 15 16:31:25 2012 -0700
+++ b/mercurial/subrepo.py	Tue Sep 04 15:46:04 2012 -0700
@@ -838,7 +838,7 @@
             name = ''.join(c.data for c
                            in e.getElementsByTagName('name')[0].childNodes
                            if c.nodeType == c.TEXT_NODE)
-            paths.append(name)
+            paths.append(name.encode('utf-8'))
         return paths
 
     def filedata(self, name):