diff options
author | Frank Terbeck <bewater@users.sourceforge.net> | 2010-05-10 10:46:48 +0000 |
---|---|---|
committer | Frank Terbeck <bewater@users.sourceforge.net> | 2010-05-10 10:46:48 +0000 |
commit | 0501efc54af2d194f952c2968a7aeeb5bac8fdf4 (patch) | |
tree | 9d632c46950c434594cc46263e35558018912b20 /Functions/VCS_Info/Backends/VCS_INFO_detect_hg | |
parent | 144a06bf958b4e573fd3c78eab30536349d09cff (diff) | |
download | zsh-0501efc54af2d194f952c2968a7aeeb5bac8fdf4.tar.gz zsh-0501efc54af2d194f952c2968a7aeeb5bac8fdf4.tar.xz zsh-0501efc54af2d194f952c2968a7aeeb5bac8fdf4.zip |
Seth House, Simon Ruderich and myself: 27948: various vcs_info changes
Here's a diff-stat: Doc/Zsh/contrib.yo | 506 ++++++++++++++------- Functions/VCS_Info/.distfiles | 1 + Functions/VCS_Info/Backends/VCS_INFO_detect_hg | 14 +- Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 35 +- Functions/VCS_Info/Backends/VCS_INFO_get_data_hg | 295 +++++++++---- Functions/VCS_Info/VCS_INFO_formats | 26 +- Functions/VCS_Info/VCS_INFO_hook | 10 +- Functions/VCS_Info/VCS_INFO_quilt | 190 ++++++++ Functions/VCS_Info/vcs_info | 30 +- Misc/.distfiles | 1 + Misc/vcs_info-examples | 496 ++++++++++++++++++++ 11 files changed, 1303 insertions(+), 301 deletions(-) The major changes are vast improvements for the mercurial (hg) backend (which was done almost entirely by Seth); improved documentation (mostly done by Simon and again Seth); quilt support (as an addon and stand alone, see the manual for details); a number of new hooks and a fair share of bugfixes.
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 |