Commit 168d3356 authored by Pierre-antoine Comby's avatar Pierre-antoine Comby
Browse files

[bashrc] remove useless CVS detection

parent 601812bf
......@@ -144,13 +144,6 @@ git_detect(){
return 1
}
# Mercurial isn't
hg_detect(){
check_command hg || return 1
vcs_comm[detect_need_file]=store
detect_by_dir '.hg'
return $?
}
# .svn in each directories
svn_detect() {
......@@ -159,34 +152,6 @@ svn_detect() {
return 1
}
bzr_detect(){
check_command bzr || return 1
vcs_comm[detect_need_file]=branch/format
detect_by_dir '.bzr'
return $?
}
cdv_detect(){
check_command cdv || return 1
vcs_comm[detect_need_file]=format
detect_by_dir '.cdv'
return $?
}
cvs_detect(){
check_command svn || return 1
[[ -d "./CVS" ]] && [[ -r "./CVS/Repository" ]] && return 0
return 1
}
darcs_detect(){
check_command darcs || return 1
# darcs diff seems a good choice since big diff is not the
# common state
darcs diff 2> /dev/null 1>&2 || return 1
vcs_comm[basedir]=$(darcs show repo |awk '{if($1 == "Root:") print $2}')
return 0
}
# Find git's branch
git_getbranch (){
......@@ -309,18 +274,6 @@ git_get_data(){
return 0
}
hg_get_data(){
local hgbranch hgbase file
hgbase=${vcs_comm[basedir]}
# Check if hg branch is efficient
hgbranch=$(hg branch)
vcs_formats '' "${hgbranch}" "${hgbase}" ''
return 0
}
svn_get_data(){
local svnbase svnbranch
local -a svninfo
......@@ -337,51 +290,7 @@ svn_get_data(){
return 0
}
bzr_get_data(){
local bzrbase bzrrev bzrbranch bzrinfo
bzrbase=$(bzr info|awk '{if ($1 == "branch" && $2 == "root:") print $3}')
bzrbase="$(vcs_realpath ${bzrbase})"
bzrinfo=$(bzr version-info|awk '{if ($1 == "branch-nick:"||$1 == "revno:") print $2}')
bzrrev=$(echo $bzrinfo|awk '{print $1}')
bzrbranch=$(echo $bzrinfo|awk '{print $2}')
vcs_formats '' "${bzrbranch}" "${bzrbase}" "${bzrrev}"
return 0
}
cdv_get_data(){
local cdvbase
cdvbase=${vcs_comm[basedir]}
vcs_formats '' "${cdvbase/*\/}" "${cdvbase}" ''
return 0
}
cvs_get_data(){
local cvsbranch cvsbase basename
cvsbase="."
while [[ -d "${cvsbase}/../CVS" ]]; do
cvsbase="${cvsbase}/.."
done
cvsbase="$(vcs_realpath ${cvsbase})"
cvsbranch=$(< ./CVS/Repository)
basename=${cvsbase/*\/}
cvsbranch=${cvsbranch#${basename}/}
[[ -z ${cvsbranch} ]] && cvsbranch=${basename}
vcs_formats '' "${cvsbranch}" "${cvsbase}" ''
return 0
}
darcs_get_data(){
local darcsbase
darcsbase=${vcs_comm[basedir]}
vcs_formats '' "${darcsbase/*\/}" "${darcsbase}" ''
return 0
}
vcs_info(){
local -i found
......@@ -392,7 +301,7 @@ vcs_info(){
local -A disabled
vcs="init"
vcss=(git hg darcs svn bzr cvs cdv)
vcss=(git svn )
disabled[cdv]=1
disabled[cvs]=1
disabled[bzr]=1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment