mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
5acee3bbd7
If the temporary directory is longer than /tmp then it's possible that the Subject line will get wrapped by the headencode function.
44 lines
807 B
Bash
Executable File
44 lines
807 B
Bash
Executable File
#!/bin/sh
|
|
|
|
cat <<EOF >> $HGRCPATH
|
|
[extensions]
|
|
notify=
|
|
|
|
[hooks]
|
|
changegroup.notify = python:hgext.notify.hook
|
|
|
|
[notify]
|
|
sources = push
|
|
diffstat = False
|
|
maxsubject = 10
|
|
|
|
[usersubs]
|
|
foo@bar = *
|
|
|
|
[reposubs]
|
|
* = baz
|
|
EOF
|
|
|
|
hg init a
|
|
|
|
echo % clone
|
|
hg --traceback clone a b
|
|
|
|
echo a > b/a
|
|
echo % commit
|
|
hg --traceback --cwd b commit -Ama
|
|
|
|
echo a >> b/a
|
|
echo % commit
|
|
hg --traceback --cwd b commit -Amb
|
|
|
|
echo % push
|
|
hg --traceback --cwd b push ../a 2>&1 |
|
|
python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
|
|
sed -e 's/\(Message-Id:\).*/\1/' \
|
|
-e 's/changeset \([0-9a-f]* *\)in .*test-notif/changeset \1in test-notif/' \
|
|
-e 's/^Subject: .*/Subject: test-notify-changegroup/' \
|
|
-e 's/^details: .*test-notify/details: test-notify/' \
|
|
-e 's/^Date:.*/Date:/'
|
|
|