From d8453cfae1bb2e83b87c9b4500662784932876b7 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Fri, 21 Jun 2013 14:14:58 -0400 Subject: [PATCH] =?utf8?q?Modifi=C3=A9=20options=20de=20base=20d'affichage?= =?utf8?q?=20des=20logs=20pour=20hg=20et=20git?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- scripts/vl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/vl b/scripts/vl index a19a374..a680742 100755 --- a/scripts/vl +++ b/scripts/vl @@ -2,6 +2,9 @@ VCS_SUPPORTED="GIT, Subversion or Mercurial" +GIT_LOG_BASE_OPTS="--oneline" +HG_LOG_BASE_OPTS="--follow" + print_usage() { echo "$(basename $0) -- log for version control (${VCS_SUPPORTED})." @@ -18,14 +21,14 @@ SVN_LOG_SEPARATION_COLOR=$(echo -e '\033[1;32m') # Green NORMAL=$(echo -e '\033[0m') if git diff 1> /dev/null 2>&1; then - git log "$@" + git log ${GIT_LOG_BASE_OPTS} "$@" elif svn diff 1> /dev/null 2>&1; then # Colore les lignes --------- en vert # 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 "$@" + hg glog ${HG_LOG_BASE_OPTS} "$@" else echo "Not a ${VCS_SUPPORTED} repository" exit 1 -- 2.20.1