scripts/svn
author Tomas Zeman <tzeman@volny.cz>
Wed, 18 Dec 2013 09:20:53 +0100
changeset 39 1fc1aab8014b
child 40 7b691c3bba6c
permissions -rwxr-xr-x
svn commit helper (displays diff); diff must be manually deleted before committing the changes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     1
#!/bin/sh
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     2
# See: http://push.cx/2007/seeing-subversion-diffs-for-commit-messages
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     3
#
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     4
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     5
REALSVN=/usr/bin/svn
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     6
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     7
ARGS="$@"
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     8
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
     9
if [ "$1" = "commit" -o "$1" = "ci" ]; then
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    10
    shift # pop off $1 for diff
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    11
    TEMPLATE=`mktemp svn-ci.XXXXXXX`
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    12
    $REALSVN diff "$@" > "$TEMPLATE"
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    13
    $REALSVN $ARGS --editor-cmd="$HOME/bin/svn-diff-editor '$TEMPLATE'"
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    14
else
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    15
    $REALSVN $ARGS
1fc1aab8014b svn commit helper (displays diff); diff must be manually deleted before committing the changes
Tomas Zeman <tzeman@volny.cz>
parents:
diff changeset
    16
fi