Mercurial > hg
diff hgext/convert/subversion.py @ 6491:2bdd43246c95
convert: check svn branches are directories
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 07 Apr 2008 11:59:20 +0200 |
parents | c237b27e1350 |
children | 43d14cbd69b7 c19c26718d22 |
line wrap: on
line diff
--- a/hgext/convert/subversion.py Mon Apr 07 09:02:26 2008 +0200 +++ b/hgext/convert/subversion.py Mon Apr 07 11:59:20 2008 +0200 @@ -247,6 +247,10 @@ def getheads(self): + def isdir(path, revnum): + kind = svn.ra.check_path(self.ra, path, revnum) + return kind == svn.core.svn_node_dir + def getcfgpath(name, rev): cfgpath = self.ui.config('convert', 'svn.' + name) if cfgpath is not None and cfgpath.strip() == '': @@ -288,6 +292,8 @@ self.ctx) for branch in branchnames.keys(): module = '%s/%s/%s' % (oldmodule, branches, branch) + if not isdir(module, self.last_changed): + continue brevid = self.latest(module, self.last_changed) if not brevid: self.ui.note(_('ignoring empty branch %s\n') %