--- a/hgext/convert/subversion.py Fri Jul 25 20:37:41 2008 +0200
+++ b/hgext/convert/subversion.py Fri Jul 25 20:43:41 2008 +0200
@@ -251,7 +251,7 @@
def getheads(self):
def isdir(path, revnum):
- kind = svn.ra.check_path(self.ra, path, revnum)
+ kind = self._checkpath(path, revnum)
return kind == svn.core.svn_node_dir
def getcfgpath(name, rev):
@@ -559,7 +559,7 @@
entrypath = self.getrelpath(path)
entry = entrypath.decode(self.encoding)
- kind = svn.ra.check_path(self.ra, entrypath, revnum)
+ kind = self._checkpath(entrypath, revnum)
if kind == svn.core.svn_node_file:
entries.append(self.recode(entry))
if not ent.copyfrom_path or not parents:
@@ -678,7 +678,7 @@
# print child, self.module, entrypath
if entrypath:
# Need to filter out directories here...
- kind = svn.ra.check_path(self.ra, entrypath, revnum)
+ kind = self._checkpath(entrypath, revnum)
if kind != svn.core.svn_node_dir:
entries.append(self.recode(entrypath))
@@ -907,6 +907,11 @@
self.ui.debug('%r is not under %r, ignoring\n' % (path, module))
return None
+ def _checkpath(self, path, revnum):
+ # ra.check_path does not like leading slashes very much, it leads
+ # to PROPFIND subversion errors
+ return svn.ra.check_path(self.ra, path.strip('/'), revnum)
+
pre_revprop_change = '''#!/bin/sh
REPOS="$1"