1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-12-02 16:40:53 +01:00

Mike Meyer: 28956, 28957: Add fossil support to vcs_info.

This commit is contained in:
Frank Terbeck 2011-03-30 20:07:05 +00:00
parent c9b0a25bb7
commit ae6fb299f3
4 changed files with 50 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2011-03-20 Frank Terbeck <ft@bewatermyfriend.org>
* Mike Meyer: 28956, 28957:
Functions/VCS_Info/Backends/VCS_INFO_detect_fossil,
Functions/VCS_Info/Backends/VCS_INFO_get_data_fossil,
Doc/Zsh/contrib.yo: Add fossil support to vcs_info.
2011-03-29 Mikael Magnusson <mikachu@gmail.com>
* unposted: Completion/Unix/Command/_vim: Fix typo in
@ -14387,5 +14394,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.5233 $
* $Revision: 1.5234 $
*****************************************************

View file

@ -600,6 +600,7 @@ sitem(Bazaar (tt(bzr)))(http://bazaar-vcs.org/)
sitem(Codeville (tt(cdv)))(http://codeville.org/)
sitem(Concurrent Versioning System (tt(cvs)))(http://www.nongnu.org/cvs/)
sitem(Darcs (tt(darcs)))(http://darcs.net/)
sitem(Fossil (tt(fossil)))(http://fossil-scm.org/)
sitem(Git (tt(git)))(http://git-scm.com/)
sitem(GNU arch (tt(tla)))(http://www.gnu.org/software/gnu-arch/)
sitem(Mercurial (tt(hg)))(http://mercurial.selenic.com/)
@ -649,6 +650,7 @@ bzr
cdv
cvs
darcs
fossil
git
hg
mtn
@ -692,8 +694,9 @@ example(:vcs_info:<vcs-string>:<user-context>:<repo-root-name>)
startitem()
item(tt(<vcs-string>))(
is one of: git, git-svn, git-p4, hg, hg-git, hg-hgsubversion, hg-hgsvn,
darcs, bzr, cdv, mtn, svn, cvs, svk, tla or p4. When hooks are active the
hooks name is added after a `+'. (See tt(Hooks in vcs_info) below.)
darcs, bzr, cdv, mtn, svn, cvs, svk, tla, p4 or fossil. When hooks are
active the hooks name is added after a `+'. (See tt(Hooks in vcs_info)
below.)
)
item(tt(<user-context>))(
is a freely configurable string, assignable by

View file

@ -0,0 +1,13 @@
## vim:ft=zsh
## fossil support by: Mike Meyer <mwm@mired.org>
## Distributed under the same BSD-ish license as zsh itself.
setopt localoptions NO_shwordsplit
[[ $1 == '--flavours' ]] && return 1
VCS_INFO_check_com ${vcs_comm[cmd]} || return 1
vcs_comm[detect_need_file]=_FOSSIL_
VCS_INFO_bydir_detect . || return 1
return 0

View file

@ -0,0 +1,24 @@
## vim:ft=zsh
## fossil support by: Mike Meyer (mwm@mired.org)
## Distributed under the same BSD-ish license as zsh itself.
setopt localoptions extendedglob
local a b
local -A fsinfo
local fshash fsbranch changed merging action
${vcs_comm[cmd]} status |
while IFS=: read a b; do
fsinfo[${a//-/_}]="${b## #}"
done
fshash=${fsinfo[checkout]%% *}
fsbranch=${fsinfo[tags]%%, *}
changed=${(Mk)fsinfo:#(ADDED|EDITED|DELETED|UPDATED)*}
merging=${(Mk)fsinfo:#*_BY_MERGE*}
if [ -n "$merging" ]; then
action="merging"
fi
VCS_INFO_formats "$action" "${fsbranch}" "${fsinfo[local_root]}" '' "$changed" "${fshash}" "${fsinfo[repository]}"
return 0