view contrib/tcsh_completion_build.sh @ 27396:64c584070fc7

run-tests: show scheduling with --showchannels This gives one line of output per second with one column per -j level that allows analyzing test scheduling problems. First 24 seconds of output at -j 30 looks like this: 0 . 1 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = s. 2 c c o c r l g r s s = c p = c h c a h c g c h c b c c l l c ss 3 h o b o e a e u u u c o a h o e o c g o l h g h u o = a o = s 4 e n s n b r n n b b m t g n l n l w n o e w e n n e r g i . 5 c t o = a g d - r r = m c w v p v . e v g c e c d v x g . m 6 k r l r s e o t e e b a h e e . e . b e . k b k l e t e . p 7 - i e e e f c e p p u n b b r . r . - r . - - - e r e f . o . 8 p b t v - i . s o o n d o d t . t . c t . c s = 2 t n i . r 9 y - e s c l . t - . d - m i - . - . o - . o y r - - s l . t 10 3 p - e h e . s s . l t b r s . s . m s . d m e f s i e . . 11 - e c t e s . . v . e e . . v . v . m v . e r n o v o s . . 12 c r h . c - . . n . 2 m . . n . n . a n . . e a r n n . . . 13 o f e . k u . . . . - p . . - . - . n - . . v m m - . . . . 14 m . c . - p . . . . e l . . s . m . d s . . . e a e . . . . 15 p . k . r d . . . . x a . . i . o . s o . . . - t n . . . . 16 a . h . e a . . . . c t . . n . v . . u . . . m . c . . . . 17 t . e . s t . . . . h e . . k . e . . r . . . e . o . . . . 18 . . a . t e . . . . a . . . . . . . . c . . . r . d . . . . 19 . . d . o . . . . . n . . . . . . . . e . . . g . i . . . . 20 . . s . r . . . . . g . . . . . . . . . . . . e . n . . . . 21 . . . . e . . . . . e . . . . . . . . . . . . 2 . g . . . . 22 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 . . . . . . . . . . . . . . . . . . . . . . . . . = . . . . ^C Test names read off vertically, beginning with '='. Idle time (not shown) appears as blank space.
author Matt Mackall <mpm@selenic.com>
date Mon, 07 Dec 2015 16:16:06 -0600
parents 2616325766e3
children
line wrap: on
line source

#!/bin/sh

#
# tcsh_completion_build.sh - script to generate tcsh completion
#
#
# Copyright (C) 2005 TK Soh.
#
# This is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
#
# Description
# -----------
# This script generates a tcsh source file to support completion
# of Mercurial commands and options.
#
# Instruction:
# -----------
# Run this script to generate the tcsh source file, and source
# the file to add command completion support for Mercurial.
#
#    tcsh% tcsh_completion.sh FILE
#    tcsh% source FILE
#
# If FILE is not specified, tcsh_completion will be generated.
#
# Bugs:
# ----
# 1. command specific options are not supported
# 2. hg commands must be specified immediately after 'hg'.
#

tcsh_file=${1-tcsh_completion}

hg_commands=`hg --debug help | \
        sed -e '1,/^list of commands:/d' \
            -e '/^enabled extensions:/,$d' \
            -e '/^additional help topics:/,$d' \
            -e '/^ [^ ]/!d; s/[,:]//g;' | \
        xargs -n5 | \
        sed -e '$!s/$/ \\\\/g; 2,$s/^ */    /g'`

hg_global_options=`hg -v help | \
        sed -e '1,/global/d;/^ *-/!d; s/ [^- ].*//' | \
        sed -e 's/ *$//; $!s/$/ \\\\/g; 2,$s/^ */    /g'`

hg_version=`hg version | sed -e '1q'`

script_name=`basename $0`

cat > $tcsh_file <<END
#
# tcsh completion for Mercurial
#
# This file has been auto-generated by $script_name for
# $hg_version
#
# Copyright (C) 2005 TK Soh.
#
# This is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#

complete hg \\
  'n/--cwd/d/' 'n/-R/d/' 'n/--repository/d/' \\
  'C/-/($hg_global_options)/' \\
  'p/1/($hg_commands)/'

END