# HG changeset patch # User Steve Losh # Date 1265561685 18000 # Node ID 4a58a0d747d8a2a20c0d047fec57ee136301812b # Parent 91c9468268f912d41645648278a50d71883b378b Add tms. diff -r 91c9468268f9 -r 4a58a0d747d8 zsh/mercurial.zsh --- a/zsh/mercurial.zsh Tue Feb 02 09:24:40 2010 -0500 +++ b/zsh/mercurial.zsh Sun Feb 07 11:54:45 2010 -0500 @@ -2,6 +2,9 @@ alias mq='hg -R $(hg root)/.hg/patches' alias tmd="hg tmd -X '**fixtures**' | mate" +function tms () { + hg show $1 | sed -E -e "s/\[([0-9]{1,3}((;[0-9]{1,3})*)?)?[m|K]//g" | mate +} alias calctime="sed -e 's/{t: *\([0-9]*\)*.*/\1/' | python -c 'import sys; print sum(map(int, sys.stdin.readlines())) / 60.0, \"hours\"'" alias hgt='hg log -vd "`date -j \"+%Y-%m-%d\"`" -u steve | grep "{t:" | calctime'