diff options
Diffstat (limited to 'Functions/VCS_Info/Backends/VCS_INFO_detect_hg')
-rw-r--r-- | Functions/VCS_Info/Backends/VCS_INFO_detect_hg | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_detect_hg b/Functions/VCS_Info/Backends/VCS_INFO_detect_hg index 36078b7a7..e2866afd5 100644 --- a/Functions/VCS_Info/Backends/VCS_INFO_detect_hg +++ b/Functions/VCS_Info/Backends/VCS_INFO_detect_hg @@ -4,9 +4,17 @@ setopt localoptions NO_shwordsplit -[[ $1 == '--flavours' ]] && return 1 +[[ $1 == '--flavours' ]] && { print -l hg-git hg-hgsubversion hg-hgsvn; return 0 } VCS_INFO_check_com ${vcs_comm[cmd]} || return 1 vcs_comm[detect_need_file]=store -VCS_INFO_bydir_detect '.hg' -return $? +VCS_INFO_bydir_detect '.hg' || return 1 + +if [[ -d ${vcs_comm[basedir]}/.hg/svn ]] ; then + vcs_comm[overwrite_name]='hg-hgsubversion' +elif [[ -d ${vcs_comm[basedir]}/.hgsvn ]] ; then + vcs_comm[overwrite_name]='hg-hgsvn' +elif [[ -e ${vcs_comm[basedir]}/.hg/git-mapfile ]] ; then + vcs_comm[overwrite_name]='hg-git' +fi +return 0 |