comparison mercurial/subrepo.py @ 36742:390d16ea7c76

py3: use pycompat.bytestr instead of str Differential Revision: https://phab.mercurial-scm.org/D2648
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 04 Mar 2018 22:33:59 +0530
parents b529e640015d
children 45bfcd16f27e
comparison
equal deleted inserted replaced
36741:59802fa590db 36742:390d16ea7c76
1121 def files(self): 1121 def files(self):
1122 output = self._svncommand(['list', '--recursive', '--xml'])[0] 1122 output = self._svncommand(['list', '--recursive', '--xml'])[0]
1123 doc = xml.dom.minidom.parseString(output) 1123 doc = xml.dom.minidom.parseString(output)
1124 paths = [] 1124 paths = []
1125 for e in doc.getElementsByTagName('entry'): 1125 for e in doc.getElementsByTagName('entry'):
1126 kind = str(e.getAttribute('kind')) 1126 kind = pycompat.bytestr(e.getAttribute('kind'))
1127 if kind != 'file': 1127 if kind != 'file':
1128 continue 1128 continue
1129 name = ''.join(c.data for c 1129 name = ''.join(c.data for c
1130 in e.getElementsByTagName('name')[0].childNodes 1130 in e.getElementsByTagName('name')[0].childNodes
1131 if c.nodeType == c.TEXT_NODE) 1131 if c.nodeType == c.TEXT_NODE)