From 02a89b367b7e915a8729bcf123c42546ab1d8aa4 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 8 Oct 2008 10:43:33 +0200 Subject: Removed mercurial support --- bin/pkg | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'bin/pkg') diff --git a/bin/pkg b/bin/pkg index c8550a4..97ae36a 100755 --- a/bin/pkg +++ b/bin/pkg @@ -25,7 +25,7 @@ check_installed () { } check_valid () { - [[ -d $PDIR/$1/.hg || -d $PDIR/$1/.git ]] || die "Not a valid package name: '$1'\n" + [[ -d $PDIR/$1/.git ]] || die "Not a valid package name: '$1'\n" } clear_line () { @@ -143,15 +143,11 @@ progress () { ## VCS Wrappers vcs_to_list () { - if [[ -d $1/.hg ]] { - echo -n "$1 hg " - hg -R $1 log | fgrep changeset | head -n 1 | cut -d ' ' -f 4 - } elif [[ -d $1/.git ]] { + if [[ -d $1/.git ]] { echo -n "$1 git " git --git-dir=$1/.git log | fgrep commit | head -n 1 | cut -d ' ' -f 2 } else { - echo -n "$i plain " >> .list - ls -ablR $i | md5sum | cut -d ' ' -f 1 >> .list + warn "Unsupported or no repository: $1\n" } } @@ -159,28 +155,24 @@ vcs_add () { cd $PDIR case $(list_type $1) in git) git clone "$PKG_ROOT/$1" ;; - hg) hg clone "$PKG_ROOT/$1" ;; - *) die "Cannot handle repository format '$1'\n" ;; + *) die "$1: Cannot handle repository format '$(list_type $1)'\n" ;; esac } vcs_log () { - [[ -d .hg ]] && {hg glog | less ; return} - [[ -d .git ]] && {git log ; return} + git log } vcs_upgrade () { - [[ -d .hg ]] && {hg pull --update $PKG_ROOT/$PWD:t; return} - [[ -d .git ]] && {git pull $PKG_ROOT/$PWD:t master ; return} + git pull $PKG_ROOT/${PWD:t} master } vcs_push () { - [[ -d .hg ]] && {hg push $PKG_ROOT/$PWD:t ; return} - [[ -d .git ]] && {git push $PKG_ROOT/$PWD:t master; return} + git push $PKG_ROOT/${PWD:t} master } vcs_status () { - $(list_type $1) status + git status } ## List stuff -- cgit v1.2.3