summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_detect_hg2
-rw-r--r--Functions/VCS_Info/Backends/VCS_INFO_get_data_hg2
-rw-r--r--Functions/VCS_Info/VCS_INFO_bydir_detect10
4 files changed, 17 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 48e4f531a..b5e23d523 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-02-19 Frank Terbeck <ft@bewatermyfriend.org>
+
+ * 28776: Functions/VCS_Info/VCS_INFO_bydir_detect,
+ Functions/VCS_Info/Backends/VCS_INFO_detect_hg,
+ Functions/VCS_Info/Backends/VCS_INFO_get_data_hg: Let
+ vcs_info detect very old mercurial repositories.
+
+
2011-02-18 Peter Stephenson <p.w.stephenson@ntlworld.com>
* 28773, Doc/Zsh/zle.yo, Src/zle_hist.c: add
@@ -14225,5 +14233,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5202 $
+* $Revision: 1.5203 $
*****************************************************
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_detect_hg b/Functions/VCS_Info/Backends/VCS_INFO_detect_hg
index e2866afd5..a22c1ee0f 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_detect_hg
+++ b/Functions/VCS_Info/Backends/VCS_INFO_detect_hg
@@ -7,7 +7,7 @@ setopt localoptions NO_shwordsplit
[[ $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_comm[detect_need_file]="store data"
VCS_INFO_bydir_detect '.hg' || return 1
if [[ -d ${vcs_comm[basedir]}/.hg/svn ]] ; then
diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
index 8e91d2651..a1b87f59e 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_hg
@@ -50,7 +50,7 @@ if zstyle -t ":vcs_info:${vcs}:${usercontext}:${rrn}" get-revision ; then
"check-for-changes" || hgid_args+=( -r. )
local HGRCPATH
- HGRCPATH="/dev/null" ${vcs_comm[cmd]} ${(z)hgid_args} \
+ HGRCPATH="/dev/null" ${vcs_comm[cmd]} ${(z)hgid_args} 2> /dev/null \
| read -r r_csetid r_lrev r_branch
fi
fi
diff --git a/Functions/VCS_Info/VCS_INFO_bydir_detect b/Functions/VCS_Info/VCS_INFO_bydir_detect
index 0b5996fd8..70b0fb6fa 100644
--- a/Functions/VCS_Info/VCS_INFO_bydir_detect
+++ b/Functions/VCS_Info/VCS_INFO_bydir_detect
@@ -4,15 +4,17 @@
setopt localoptions NO_shwordsplit
local dirname=$1
-local basedir="." realbasedir
+local basedir="." realbasedir file
realbasedir="$(VCS_INFO_realpath ${basedir})"
while [[ ${realbasedir} != '/' ]]; do
[[ -r ${realbasedir} ]] || return 1
if [[ -n ${vcs_comm[detect_need_file]} ]] ; then
- [[ -d ${basedir}/${dirname} ]] && \
- [[ -e ${basedir}/${dirname}/${vcs_comm[detect_need_file]} ]] && \
- break
+ [[ -d ${basedir}/${dirname} ]] && {
+ for file in ${(s: :)${vcs_comm[detect_need_file]}}; do
+ [[ -e ${basedir}/${dirname}/${file} ]] && break 2
+ done
+ }
else
[[ -d ${basedir}/${dirname} ]] && break
fi