summaryrefslogtreecommitdiff
path: root/zshfunc/vcs-info/VCS_INFO_hg_get_data
blob: 314d34309577d93df964d1f7208a3142c30013aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
VCS_INFO_hg_get_data () { # {{{
    local hgbranch hgbase file

    hgbase=${vcs_comm[basedir]}

    file="${hgbase}/.hg/branch"
    if [[ -r ${file} ]] ; then
        hgbranch=$(< ${file})
    else
        hgbranch='default'
    fi

    VCS_INFO_formats '' "${hgbranch}" "${hgbase}"
    return 0
}