hgext/convert/subversion.py
changeset 43506 9f70512ae2cf
parent 43117 8ff1ecfadcd1
child 44022 c1ccefb513e4
equal deleted inserted replaced
43505:47fac1692ede 43506:9f70512ae2cf
  1357         # already tracked entries, so we have to track and filter them
  1357         # already tracked entries, so we have to track and filter them
  1358         # ourselves.
  1358         # ourselves.
  1359         m = set()
  1359         m = set()
  1360         output = self.run0(b'ls', recursive=True, xml=True)
  1360         output = self.run0(b'ls', recursive=True, xml=True)
  1361         doc = xml.dom.minidom.parseString(output)
  1361         doc = xml.dom.minidom.parseString(output)
  1362         for e in doc.getElementsByTagName(r'entry'):
  1362         for e in doc.getElementsByTagName('entry'):
  1363             for n in e.childNodes:
  1363             for n in e.childNodes:
  1364                 if n.nodeType != n.ELEMENT_NODE or n.tagName != r'name':
  1364                 if n.nodeType != n.ELEMENT_NODE or n.tagName != 'name':
  1365                     continue
  1365                     continue
  1366                 name = r''.join(
  1366                 name = ''.join(
  1367                     c.data for c in n.childNodes if c.nodeType == c.TEXT_NODE
  1367                     c.data for c in n.childNodes if c.nodeType == c.TEXT_NODE
  1368                 )
  1368                 )
  1369                 # Entries are compared with names coming from
  1369                 # Entries are compared with names coming from
  1370                 # mercurial, so bytes with undefined encoding. Our
  1370                 # mercurial, so bytes with undefined encoding. Our
  1371                 # best bet is to assume they are in local
  1371                 # best bet is to assume they are in local
  1500         if self.setexec:
  1500         if self.setexec:
  1501             self.xargs(self.setexec, b'propset', b'svn:executable', b'*')
  1501             self.xargs(self.setexec, b'propset', b'svn:executable', b'*')
  1502             self.setexec = []
  1502             self.setexec = []
  1503 
  1503 
  1504         fd, messagefile = pycompat.mkstemp(prefix=b'hg-convert-')
  1504         fd, messagefile = pycompat.mkstemp(prefix=b'hg-convert-')
  1505         fp = os.fdopen(fd, r'wb')
  1505         fp = os.fdopen(fd, 'wb')
  1506         fp.write(util.tonativeeol(commit.desc))
  1506         fp.write(util.tonativeeol(commit.desc))
  1507         fp.close()
  1507         fp.close()
  1508         try:
  1508         try:
  1509             output = self.run0(
  1509             output = self.run0(
  1510                 b'commit',
  1510                 b'commit',