Show More
@@ -961,6 +961,7 b' class svnsubrepo(abstractsubrepo):' | |||
|
961 | 961 | universal_newlines=True, |
|
962 | 962 | env=procutil.tonativeenv(env), **extrakw) |
|
963 | 963 | stdout, stderr = p.communicate() |
|
964 | stdout, stderr = pycompat.fsencode(stdout), pycompat.fsencode(stderr) | |
|
964 | 965 | stderr = stderr.strip() |
|
965 | 966 | if not failok: |
|
966 | 967 | if p.returncode: |
@@ -987,13 +988,14 b' class svnsubrepo(abstractsubrepo):' | |||
|
987 | 988 | # both. We used to store the working directory one. |
|
988 | 989 | output, err = self._svncommand(['info', '--xml']) |
|
989 | 990 | doc = xml.dom.minidom.parseString(output) |
|
990 | entries = doc.getElementsByTagName('entry') | |
|
991 | entries = doc.getElementsByTagName(r'entry') | |
|
991 | 992 | lastrev, rev = '0', '0' |
|
992 | 993 | if entries: |
|
993 | rev = str(entries[0].getAttribute('revision')) or '0' | |
|
994 | commits = entries[0].getElementsByTagName('commit') | |
|
994 | rev = pycompat.bytestr(entries[0].getAttribute(r'revision')) or '0' | |
|
995 | commits = entries[0].getElementsByTagName(r'commit') | |
|
995 | 996 | if commits: |
|
996 | lastrev = str(commits[0].getAttribute('revision')) or '0' | |
|
997 | lastrev = pycompat.bytestr( | |
|
998 | commits[0].getAttribute(r'revision')) or '0' | |
|
997 | 999 | return (lastrev, rev) |
|
998 | 1000 | |
|
999 | 1001 | def _wcrev(self): |
@@ -1008,19 +1010,19 b' class svnsubrepo(abstractsubrepo):' | |||
|
1008 | 1010 | output, err = self._svncommand(['status', '--xml']) |
|
1009 | 1011 | externals, changes, missing = [], [], [] |
|
1010 | 1012 | doc = xml.dom.minidom.parseString(output) |
|
1011 | for e in doc.getElementsByTagName('entry'): | |
|
1012 | s = e.getElementsByTagName('wc-status') | |
|
1013 | for e in doc.getElementsByTagName(r'entry'): | |
|
1014 | s = e.getElementsByTagName(r'wc-status') | |
|
1013 | 1015 | if not s: |
|
1014 | 1016 | continue |
|
1015 | item = s[0].getAttribute('item') | |
|
1016 | props = s[0].getAttribute('props') | |
|
1017 | path = e.getAttribute('path') | |
|
1018 | if item == 'external': | |
|
1017 | item = s[0].getAttribute(r'item') | |
|
1018 | props = s[0].getAttribute(r'props') | |
|
1019 | path = e.getAttribute(r'path').encode('utf8') | |
|
1020 | if item == r'external': | |
|
1019 | 1021 | externals.append(path) |
|
1020 | elif item == 'missing': | |
|
1022 | elif item == r'missing': | |
|
1021 | 1023 | missing.append(path) |
|
1022 | if (item not in ('', 'normal', 'unversioned', 'external') | |
|
1023 | or props not in ('', 'none', 'normal')): | |
|
1024 | if (item not in (r'', r'normal', r'unversioned', r'external') | |
|
1025 | or props not in (r'', r'none', r'normal')): | |
|
1024 | 1026 | changes.append(path) |
|
1025 | 1027 | for path in changes: |
|
1026 | 1028 | for ext in externals: |
@@ -1141,14 +1143,14 b' class svnsubrepo(abstractsubrepo):' | |||
|
1141 | 1143 | output = self._svncommand(['list', '--recursive', '--xml'])[0] |
|
1142 | 1144 | doc = xml.dom.minidom.parseString(output) |
|
1143 | 1145 | paths = [] |
|
1144 | for e in doc.getElementsByTagName('entry'): | |
|
1145 | kind = pycompat.bytestr(e.getAttribute('kind')) | |
|
1146 | for e in doc.getElementsByTagName(r'entry'): | |
|
1147 | kind = pycompat.bytestr(e.getAttribute(r'kind')) | |
|
1146 | 1148 | if kind != 'file': |
|
1147 | 1149 | continue |
|
1148 | name = ''.join(c.data for c | |
|
1149 | in e.getElementsByTagName('name')[0].childNodes | |
|
1150 | name = r''.join(c.data for c | |
|
1151 | in e.getElementsByTagName(r'name')[0].childNodes | |
|
1150 | 1152 | if c.nodeType == c.TEXT_NODE) |
|
1151 |
paths.append(name.encode('utf |
|
|
1153 | paths.append(name.encode('utf8')) | |
|
1152 | 1154 | return paths |
|
1153 | 1155 | |
|
1154 | 1156 | def filedata(self, name, decode): |
General Comments 0
You need to be logged in to leave comments.
Login now