def svn_report(report, url, maxdepth=-1): dirstack = [(url, 0)] while dirstack: url, curdepth = dirstack.pop() content = getcontent(url) for file in content.files: report.add(file) if curdepth == maxdepth: continue nextdepth = curdepth + 1 for directory in content.directories: nexturl = url + "/" + directory.href dirstack.append((nexturl, nextdepth))
Comments