[csw-devel] SF.net SVN: opencsw:[329] gar-wrapper/mgar

skayser at users.sourceforge.net skayser at users.sourceforge.net
Thu Feb 24 11:03:25 CET 2011


Revision: 329
          http://opencsw.svn.sourceforge.net/opencsw/?rev=329&view=rev
Author:   skayser
Date:     2011-02-24 10:03:25 +0000 (Thu, 24 Feb 2011)

Log Message:
-----------
mgar: in commit mode without -m, add the path prefix to the commit msg EDITOR buffer

Modified Paths:
--------------
    gar-wrapper/mgar

Modified: gar-wrapper/mgar
===================================================================
--- gar-wrapper/mgar	2011-02-24 00:04:53 UTC (rev 328)
+++ gar-wrapper/mgar	2011-02-24 10:03:25 UTC (rev 329)
@@ -15,13 +15,12 @@
 # ----------------------------------------------------------------------------
 #
 # Todos:
+# * Integrate the creation of a new package (with sanity check whether
+#   package already exists). Use per-directory Makefile.template files.
 # * When packaging mgar, shield mgar up --self so that it won't override
 #   the package binary, but place it somewhere else.
-# * In commit mode, if (msg -eq ""): Fire up $EDITOR (with prepoulated msg)
 # * In commit mode, if (pwd.endswith('trunk') and svn.rev -eq 0) commit ..
 # * Recipes: Move from svn:externals to GARTYPE
-# * Integrate the creation of a new package (with sanity check whether
-#   package already exists). Use per-directory Makefile.template files.
 # * Improve errors messages when buildsys can't be found
 #
 # Bugs:
@@ -250,12 +249,19 @@
   shift $((OPTIND-1))
 
   # prefix the commitmsg with a pkg path prefix unless a prefix is given
+  __prefix=$( pwd | sed "s,^$BUILDTREE/,," )
   if [ -n "${__logmsg:-}" ]; then
     if ! echo "$__logmsg" | ggrep -qE '^\S+:'; then
-      __prefix=$( pwd | sed "s,^$BUILDTREE/,," )
       __logmsg="$__prefix: $__logmsg"
     fi
     __log_args=( "-m" "$__logmsg" )
+  else
+    case $EDITOR in
+      vi*) insert_prefix="`echo -e \"a\n$__prefix: \n.\"`"
+           EDITOR="$EDITOR -c \"$insert_prefix\""
+           ;;
+      *)   ;;
+    esac
   fi
 
   __untracked=`svn status | grep \? || :`


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list