| author | Tomas Zeman <tzeman@volny.cz> |
| Tue, 09 Jan 2018 12:28:15 +0100 | |
| changeset 52 | c0d94e64d89a |
| parent 40 | 7b691c3bba6c |
| permissions | -rwxr-xr-x |
|
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 |
|
40
7b691c3bba6c
svn: open diff in second buffer
Tomas Zeman <tzeman@volny.cz>
parents:
39
diff
changeset
|
11 |
TEMPLATE=`mktemp --tmpdir svn-ci.XXXXXXX` |
|
39
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 |