This is the script used to generate the upstream patch status pages.

Invoke it as

env EDITOR=update-upstream-patches-table editmoin URL

update-upstream-patches-table:

gawk '
/^\/\* LP_BRANCH/ {
  lp_branch = $3
  first_rev = $4 + 1
  rev = $4

  while (("bzr log -r" first_rev ".. --line --forward " lp_branch | getline) > 0) {
    rev = $1
    sub (/:/, "", rev)

    rev_url = lp_branch "/revision/" rev
    sub (/lp:/, "http://bazaar.launchpad.net/", rev_url)

    word = 2
    name = ""
    while ($(word) !~ /^20/) {
      name = name " " $(word)
      word += 1
    }
    
    word += 1
    comment = $0
    sub (/^[^ ]* +[^0-9]*[0-9-]* /, "", comment)

    print "||<rowbgcolor=\"pink\"> [[" rev_url "|r" rev "]] ||" name " || '\'\''" comment "'\'\'' ||"

  }
  close ("bzr log -r" first_rev ".. --line --forward")

  print "/* LP_BRANCH " lp_branch " " rev " (This comment is meta-data for the update script) */"

  next
}

/.*/ { print }
' "$1" > "$1".tmp

mv "$1".tmp "$1"

WorkingGroups/ToolChain/UpstreamPatchScript (last modified 2010-07-15 11:09:46)