/[qa]/trunk/pts/www/bin/sources_to_xml.py
ViewVC logotype

Diff of /trunk/pts/www/bin/sources_to_xml.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1426 by hertzog, Fri Sep 8 07:41:08 2006 UTC revision 1427 by hertzog, Sun Sep 24 09:13:54 2006 UTC
# Line 109  def update_sources_info(m, dist): Line 109  def update_sources_info(m, dist):
109              text = doc.createTextNode(m[tag])              text = doc.createTextNode(m[tag])
110              child.appendChild(text)              child.appendChild(text)
111          # now compute derived information and store it in the xml          # now compute derived information and store it in the xml
112          if tag[:6] == 'x-vcs-': # add 'parsed' version of VCS info              # add 'parsed' version of VCS info
113              # e.g. tag[6:] would be 'svn' for 'x-vcs-svn'          if tag[:6] == 'x-vcs-' or tag[:4] == 'vcs':
114              if vcs_table.has_key(tag[6:]):              if tag[0] == 'x':
115                    prefix_len = 6
116                else:
117                    prefix_len = 4
118                # e.g. tag[prefix_len:] would be 'svn' for 'x-vcs-svn'/'vcs-svn'
119                if vcs_table.has_key(tag[prefix_len:]):
120                  repos_elt = doc.createElement('repository')                  repos_elt = doc.createElement('repository')
121                  root.appendChild(repos_elt)                  root.appendChild(repos_elt)
122                  kind_elt = doc.createElement('kind')                  kind_elt = doc.createElement('kind')
123                  repos_elt.appendChild(kind_elt)                  repos_elt.appendChild(kind_elt)
124                  (name, vcsurl) = vcs_table[tag[6:]]                  (name, vcsurl) = vcs_table[tag[prefix_len:]]
125                  kind_elt.setAttribute('href', vcsurl)                  kind_elt.setAttribute('href', vcsurl)
126                  name_txt = doc.createTextNode(name)                  name_txt = doc.createTextNode(name)
127                  kind_elt.appendChild(name_txt)                  kind_elt.appendChild(name_txt)

Legend:
Removed from v.1426  
changed lines
  Added in v.1427

  ViewVC Help
Powered by ViewVC 1.1.5