From: Hugo Villeneuve Date: Thu, 16 May 2013 02:22:10 +0000 (-0400) Subject: Ajout Mercurial X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=79d4bc8fa7a701164b00fb3f1f5d04e916041fd4;p=hvlinux.git Ajout Mercurial --- diff --git a/config/packages-list b/config/packages-list index cce03e1..39c64ea 100644 --- a/config/packages-list +++ b/config/packages-list @@ -255,6 +255,7 @@ LYNX="lynx2.8.8dev.10" MAKE_PACKAGE="make-3.82" MAN_DB="man-db-2.6.2" MANPAGES="man-pages-3.41" +MERCURIAL="mercurial-2.5.4" MFOUR="m4-1.4.16" MIDORI="midori-0.4.6" MILTER_GREYLIST="milter-greylist-4.0" diff --git a/stage2/hv-utilities/vd b/stage2/hv-utilities/vd index 07aa62f..9eb09a5 100755 --- a/stage2/hv-utilities/vd +++ b/stage2/hv-utilities/vd @@ -1,8 +1,10 @@ #!/bin/bash +VCS_SUPPORTED="GIT, Subversion or Mercurial" + print_usage() { - echo "$(basename $0) -- diff for version control (svn or git) with color output." + echo "$(basename $0) -- diff for version control (${VCS_SUPPORTED}) with color output." echo "Usage: $(basename $0) [OPTIONS...]" } @@ -15,7 +17,9 @@ if git diff 1> /dev/null 2>&1; then git diff "$@" elif svn diff 1> /dev/null 2>&1; then svn diff --diff-cmd colordiff -x "-u -w -p" "$@" | less -RFX +elif hg status 1> /dev/null 2>&1; then + hg diff "$@" else - echo "Not a GIT or Subversion repository" + echo "Not a ${VCS_SUPPORTED} repository" exit 1 fi diff --git a/stage2/hv-utilities/vl b/stage2/hv-utilities/vl index 8e22a64..a19a374 100755 --- a/stage2/hv-utilities/vl +++ b/stage2/hv-utilities/vl @@ -1,8 +1,10 @@ #!/bin/bash +VCS_SUPPORTED="GIT, Subversion or Mercurial" + print_usage() { - echo "$(basename $0) -- log for version control (svn or git)." + echo "$(basename $0) -- log for version control (${VCS_SUPPORTED})." echo "Usage: $(basename $0) [OPTIONS...]" } @@ -22,7 +24,9 @@ elif svn diff 1> /dev/null 2>&1; then # Colore en rouge les infos de la révision svn log "$@" | sed -e "s/^-\+$/${SVN_LOG_SEPARATION_COLOR}\0${NORMAL}/" \ -e "s/^r[0-9]\+.\+$/${SVN_LOG_REV_INFO_COLOR}\0${NORMAL}/" | less -RFX +elif hg status 1> /dev/null 2>&1; then + hg glog "$@" else - echo "Not a GIT or Subversion repository" + echo "Not a ${VCS_SUPPORTED} repository" exit 1 fi diff --git a/stage2/hv-utilities/vs b/stage2/hv-utilities/vs index b5312b1..6719db1 100755 --- a/stage2/hv-utilities/vs +++ b/stage2/hv-utilities/vs @@ -1,8 +1,10 @@ #!/bin/bash +VCS_SUPPORTED="GIT, Subversion or Mercurial" + print_usage() { - echo "$(basename $0) -- status for version control (svn or git)." + echo "$(basename $0) -- status for version control (${VCS_SUPPORTED})." echo "Usage: $(basename $0) [OPTIONS...]" } @@ -27,7 +29,9 @@ elif svn diff 1> /dev/null 2>&1; then -e "s/^A.*$/${SVN_ST_ADDED_COLOR}\0${NORMAL}/" \ -e "s/^M.*$/${SVN_ST_MODIFIED_COLOR}\0${NORMAL}/" \ -e "s/^D.*$/${SVN_ST_DELETED_COLOR}\0${NORMAL}/" +elif hg status 1> /dev/null 2>&1; then + hg status "$@" else - echo "Not a GIT or Subversion repository" + echo "Not a ${VCS_SUPPORTED} repository" exit 1 fi diff --git a/stage3/hv-install-1 b/stage3/hv-install-1 index 69a8de0..960bded 100755 --- a/stage3/hv-install-1 +++ b/stage3/hv-install-1 @@ -99,6 +99,7 @@ ipkg -m noac ${COLORDIFF} ipkg ${INTLTOOL} ipkg -m acnb ${GIT} "--libexecdir=/usr/lib --with-gitconfig=/etc/gitconfig" +ipkg -m noac ${MERCURIAL} ipkg ${DIALOG} diff --git a/stage3/misc/hgrc b/stage3/misc/hgrc new file mode 100644 index 0000000..bf75b93 --- /dev/null +++ b/stage3/misc/hgrc @@ -0,0 +1,16 @@ +[extensions] +color = +rebase = + +# extension do display log in graphical way +graphlog = +pager = + +# extension for paging mercurial output +[pager] +pager = LESS='FSRX' less +attend = annotate, cat, diff, export, log, glog + +[alias] +# Give log output similar to git +glog = log --template '\033[0;33mcommit {node} [r{rev}]\n\033[0mAuthor: {author}\nDate: {date|rfc822date}\n\n\t{desc|strip|fill68|tabindent}\n\n' diff --git a/stage3/packages-update b/stage3/packages-update index e68143d..9856cc2 100755 --- a/stage3/packages-update +++ b/stage3/packages-update @@ -74,6 +74,7 @@ fpkg -e "tar.gz" ${DOSFSTOOLS} "http://fossies.org/linux/misc" fpkg -e "tar.gz" ${GIT} "http://git-core.googlecode.com/files" fpkg -e "tar.gz" "git-manpages-$(get_pkg_ver ${GIT})" \ "http://git-core.googlecode.com/files" +fpkg -e "tar.gz" ${MERCURIAL} "http://mercurial.selenic.com/release" fpkg -e "tar.gz" ${DIALOG} "ftp://ftp.us.debian.org/debian/pool/main/d/dialog" diff --git a/stage3/pkg/mercurial b/stage3/pkg/mercurial new file mode 100644 index 0000000..22dbcde --- /dev/null +++ b/stage3/pkg/mercurial @@ -0,0 +1,15 @@ +#!/bin/bash + +hvbuild() +{ + cd ${LFS_TMP}/${PACKAGE} + + make build + make PREFIX=/usr install-bin +} + +hvbuild_post() +{ + install -dv /etc/mercurial + install -v -m644 ${SCRDIR}/misc/hgrc /etc/mercurial +}