url = new URL("http://lively-kernel.org/repository/webwerkstatt/core/apps")
webR = new WebResource(url)
// webR.beAsync();
webR.propfind('infinity')
propfindXML = webR.contentDocument
rawNodes = new Query("/D:multistatus/D:response").findAll(propfindXML.documentElement);
svnVersionInfos = rawNodes.map(function(rawNode) { return SVNVersionInfo.fromPropfindNode(rawNode) });
svnVersionInfos.length
svnVersionInfos[0]
// daniel.hoffmann, 18:06:13 GMT+0100 (CET), Tue Oct 30 2012, Rev. 183069
// who, when, where [what, how much]
forceStringWidth = function(s, n, left) {
return Strings.pad(s.substring(0,n), n - s.length, left)
}
this.get('VersionTable').textString = svnVersionInfos.collect(function(ea) {
var s = ""
s += ea.date.format("yyyy-mm-dd") + " "
s += ea.date.format("HH:MM") + " "
s += forceStringWidth(ea.author, 16) + " "
s += ea.url.replace("/repository/webwerkstatt/",'')
return s
}).join('\n')