X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=blobdiff_plain;f=tg-info.sh;h=6c00d83b8804c2788665d17cc977ccf42dc556a8;hp=21b69dc488893a4c7f4f2b2cf98f3cf39e6f4f74;hb=cb7fbe721149d70d5f8eb3ca50b46585db07f314;hpb=5b78a37b9c29a106980ffe2f24e0dd6b2b60387c diff --git a/tg-info.sh b/tg-info.sh index 21b69dc..6c00d83 100644 --- a/tg-info.sh +++ b/tg-info.sh @@ -28,7 +28,7 @@ measure="$(measure_branch "$name" "$base_rev")" echo "Topic Branch: $name ($measure)" if [ "$(git rev-parse --short "$name")" = "$base_rev" ]; then - echo "No commits." + echo "* No commits." exit 0 fi @@ -36,12 +36,22 @@ git cat-file blob "$name:.topmsg" | grep ^Subject: echo "Base: $base_rev" branch_contains "$name" "$base_rev" || - echo "Base is newer than head! Please run \`tg update\`." + echo "* Base is newer than head! Please run \`tg update\`." -deps="$(git cat-file blob "$name:.topdeps" | paste -s -d' ')" -echo "Depends: $deps" +if has_remote "$name"; then + echo "Remote Mate: $base_remote/$name" + branch_contains "$base_rev" "refs/remotes/$base_remote/top-bases/$name" || + echo "* Local base is out of date wrt. the remote base." + branch_contains "$name" "refs/remotes/$base_remote/$name" || + echo "* Local head is out of date wrt. the remote head." + branch_contains "refs/remotes/$base_remote/$name" "$name" || + echo "* Local head is ahead of the remote head." +fi + +git cat-file blob "$name:.topdeps" | + sed '1{ s/^/Depends: /; n; }; s/^/ /;' -depcheck="$(mktemp)" +depcheck="$(mktemp -t tg-depcheck.XXXXXX)" missing_deps= needs_update "$name" >"$depcheck" || : if [ -n "$missing_deps" ]; then