738 def push(self, opts): |
738 def push(self, opts): |
739 # push is a no-op for SVN |
739 # push is a no-op for SVN |
740 return True |
740 return True |
741 |
741 |
742 def files(self): |
742 def files(self): |
743 output = self._svncommand(['list']) |
743 output = self._svncommand(['list', '--recursive', '--xml'])[0] |
744 # This works because svn forbids \n in filenames. |
744 doc = xml.dom.minidom.parseString(output) |
745 return output.splitlines() |
745 paths = [] |
|
746 for e in doc.getElementsByTagName('entry'): |
|
747 kind = str(e.getAttribute('kind')) |
|
748 if kind != 'file': |
|
749 continue |
|
750 name = ''.join(c.data for c |
|
751 in e.getElementsByTagName('name')[0].childNodes |
|
752 if c.nodeType == c.TEXT_NODE) |
|
753 paths.append(name) |
|
754 return paths |
746 |
755 |
747 def filedata(self, name): |
756 def filedata(self, name): |
748 return self._svncommand(['cat'], name) |
757 return self._svncommand(['cat'], name)[0] |
749 |
758 |
750 |
759 |
751 class gitsubrepo(abstractsubrepo): |
760 class gitsubrepo(abstractsubrepo): |
752 def __init__(self, ctx, path, state): |
761 def __init__(self, ctx, path, state): |
753 # TODO add git version check. |
762 # TODO add git version check. |