echo "${ref#refs/heads/}"
}
+__hg_get_reporoot()
+{
+ hg root
+}
+
+__hg_get_branch()
+{
+ echo "hg:$(hg branch)"
+}
+
__vcs_get_repo_type()
{
# return the type of the closest repository in the path hierarchy
branch="$(__git_get_branch)" ||
{ error "could not determine git branch"; return 1 }
;;
+ hg)
+ reporoot="$(__hg_get_reporoot)" ||
+ { error "could not determine hg repository root"; return 1 }
+ branch="$(__hg_get_branch)" ||
+ { error "could not determine hg branch"; return 1 }
+ ;;
*)
case "$repotype" in
NONE) :;;