#!/usr/bin/env splrun load "system"; var url = "http://localhost.localnet:3054/"; foreach[] txt (system("curl -s '$url?patch_status_dump=1'") =~ /^(?=\[)/Smg) { if (txt ~== "") continue; if (txt !~ /^\[(?P\d+)\]\n(?P.*?)\n(?P.*)/Is) panic "Can't parse patch status $pid."; if (status =~ /^\-|^\+ pattern:(?!user-)/m) continue; if (desc =~ /svn/) { write("# WARNING: Patch $pid has the word 'svn' in the description text!\n"); continue; } write("smap $pid\n"); }