2006-09-15 [colin] 2.4.0cvs189
[claws.git] / commitHelper
index 71a6a9f8e7a67e189442780bc1927f3338cc155d..260c3b1c5d43e837641ee1f6e377b845adeb9bd0 100644 (file)
@@ -37,8 +37,7 @@ log=""
 files=`cvs diff -uN $@ 2>$tmpfile |grep ^Index`
 if [ "$files" == "" ]; then
        echo Nothing to commit\!
-       if [ -s $tmpfile ]
-       then
+       if [ -s $tmpfile ]; then
                echo See possible reason below:
                cat $tmpfile
        fi
@@ -80,18 +79,25 @@ for line in $files; do
        
        log="$log\t* $file\n"
        if [ "$version" != "0" ]; then
-       patchset="$patchset cvs diff -u -r $version -r $nextversion $file; "
+               patchset="$patchset cvs diff -u -r $version -r $nextversion $file; "
        else
-       patchset="$patchset diff -u /dev/null $file; "
+               patchset="$patchset diff -u /dev/null $file; "
        fi
 done;
 patchset="$patchset ) > $nextsversion.patchset"
 
-if [ "$EDITOR" == "" ]; then
-       EDITOR=vi
+if [ "$CVSEDITOR" == "" ]; then
+       if [ "$EDITOR" == "" ]; then
+               if [ "$VISUAL" != "" ]; then
+                       EDITOR=$VISUAL
+               else
+                       EDITOR=vi
+               fi;
+       fi;
+else
+       EDITOR=$CVSEDITOR
 fi;
 
-
 echo -e "#please complete the changelog entry below" > /tmp/logentry
 echo -e -n $log >> /tmp/logentry