--- trunk/pts/www/bin/sources_to_xml.py 2006/09/24 09:10:34 1426 +++ trunk/pts/www/bin/sources_to_xml.py 2006/09/24 09:13:54 1427 @@ -109,14 +109,19 @@ text = doc.createTextNode(m[tag]) child.appendChild(text) # now compute derived information and store it in the xml - if tag[:6] == 'x-vcs-': # add 'parsed' version of VCS info - # e.g. tag[6:] would be 'svn' for 'x-vcs-svn' - if vcs_table.has_key(tag[6:]): + # add 'parsed' version of VCS info + if tag[:6] == 'x-vcs-' or tag[:4] == 'vcs': + if tag[0] == 'x': + prefix_len = 6 + else: + prefix_len = 4 + # e.g. tag[prefix_len:] would be 'svn' for 'x-vcs-svn'/'vcs-svn' + if vcs_table.has_key(tag[prefix_len:]): repos_elt = doc.createElement('repository') root.appendChild(repos_elt) kind_elt = doc.createElement('kind') repos_elt.appendChild(kind_elt) - (name, vcsurl) = vcs_table[tag[6:]] + (name, vcsurl) = vcs_table[tag[prefix_len:]] kind_elt.setAttribute('href', vcsurl) name_txt = doc.createTextNode(name) kind_elt.appendChild(name_txt)