From: Petr Baudis Date: Sun, 3 Aug 2008 18:00:25 +0000 (+0200) Subject: tg-summary.sh: Mark branches with missing dependencies by '\!' X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=commitdiff_plain;h=1ff231723670255a258d9fb0fd4e7160b630e190 tg-summary.sh: Mark branches with missing dependencies by '\!' --- diff --git a/README b/README index 82d185f..36316fa 100644 --- a/README +++ b/README @@ -256,6 +256,7 @@ tg summary Show overview of all TopGit-tracked topic branches and their up-to-date status ('0' marks that it introduces no own changes, 'D' marks that it is out-of-date wrt. its dependencies, + '!' marks that it has missing dependencies (even recursively), 'B' marks that it is out-of-date wrt. its base). TODO: Speed up by an order of magnitude diff --git a/tg-summary.sh b/tg-summary.sh index 12b60d8..ac3cdfb 100644 --- a/tg-summary.sh +++ b/tg-summary.sh @@ -17,11 +17,14 @@ fi git for-each-ref refs/top-bases | while read rev name ref; do name="${ref#refs/top-bases/}" + missing_deps= nonempty= ! branch_empty "$name" || nonempty='0' deps_update=' ' needs_update "$name" >/dev/null || deps_update='D' + deps_missing=' ' + [ -z "$missing_deps" ] || deps_missing='!' base_update=' ' branch_contains "$name" "refs/top-bases/$name" || base_update='B' @@ -32,6 +35,6 @@ git for-each-ref refs/top-bases | subject="(No commits)" fi - printf '%s%s%s\t%-31s\t%s\n' "$nonempty" "$deps_update" "$base_update" \ + printf '%s%s%s%s\t%-31s\t%s\n' "$nonempty" "$deps_update" "$deps_missing" "$base_update" \ "$name" "$subject" done