# usage: tb-list [<patch-spec>]
# lists all patches matching <patch-spec> and other criteria
+xxx needs updating for new metadata and new theory
+
use warnings;
use strict;
our %patches;
foreach_patch($relatedto || $leaves || !$spec ? { } : $spec,
+xxx new api for foreach_patch
$deleted || $deleted_only,
[0, !!$leaves, 0, $toposort || !!$relatedto],
sub {