Patchwork D5664: convert: use raw strings for XML strings

login
register
mail settings
Submitter phabricator
Date Jan. 24, 2019, 2:26 a.m.
Message ID <c92822510bec2f2f418ff74ff0aff984@localhost.localdomain>
Download mbox | patch
Permalink /patch/37947/
State Not Applicable
Headers show

Comments

phabricator - Jan. 24, 2019, 2:26 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG1281b2265ff5: convert: use raw strings for XML strings (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5664?vs=13376&id=13384

REVISION DETAIL
  https://phab.mercurial-scm.org/D5664

AFFECTED FILES
  hgext/convert/subversion.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py
--- a/hgext/convert/subversion.py
+++ b/hgext/convert/subversion.py
@@ -1183,12 +1183,12 @@ 
         m = set()
         output = self.run0('ls', recursive=True, xml=True)
         doc = xml.dom.minidom.parseString(output)
-        for e in doc.getElementsByTagName('entry'):
+        for e in doc.getElementsByTagName(r'entry'):
             for n in e.childNodes:
-                if n.nodeType != n.ELEMENT_NODE or n.tagName != 'name':
+                if n.nodeType != n.ELEMENT_NODE or n.tagName != r'name':
                     continue
-                name = ''.join(c.data for c in n.childNodes
-                               if c.nodeType == c.TEXT_NODE)
+                name = r''.join(c.data for c in n.childNodes
+                                if c.nodeType == c.TEXT_NODE)
                 # Entries are compared with names coming from
                 # mercurial, so bytes with undefined encoding. Our
                 # best bet is to assume they are in local