view contrib/git-viz/hg-viz @ 707:116b2d3f4554

Changed command synopsises to match style of common UNIX tools. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Changed command synopsises to match style of common UNIX tools. manifest hash: cf62235e46f5c06ac5a3c88cb61e9b57d35fe222 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC13YhW7P1GVgWeRoRAnSOAKCOtrYHZ2XMTjpphY/G2UZHcJcZeQCdFsgv D5Hu+s9ahVX8hns2ZbQpriI= =g6NW -----END PGP SIGNATURE-----
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 15 Jul 2005 09:38:57 +0100
parents d8abb687d501
children
line wrap: on
line source

#!/bin/sh

set -e

if test x"$1" != x ; then
  cd $1
fi

if [ ! -d ".hg" ]; then
    echo "${1:-.} is not a mercurial repository" 1>&2
    echo "Aborting" 1>&2
    exit 1
fi
if [ ! -d ".git" ]; then
    mkdir -v ".git"
fi
if [ -e ".git/HEAD" ]; then
    if [ ! -e ".git/HEAD.hg-viz-save" ]; then
        mv -v ".git/HEAD" ".git/HEAD.hg-viz-save"
    else
        rm -vf ".git/HEAD"
    fi
fi
hg history | head -1 | awk -F: '{print $3}' > .git/HEAD
git-viz