#!/bin/bash

vcs_id() {
    dir="$1"
    ( cd "$dir" ;
	if [ -d .hg ]; then
	    hg id | awk '{ print $1; }'
	elif [ -d .git ]; then
	    git rev-parse --short HEAD
	elif [ -d .svn ]; then
	    svn info | grep ^Revision | awk '{ print $2; }'
	else
	    echo "unknown"
	fi
    )
}

