##// END OF EJS Templates
Make "hg incoming -r revision_number" work for remote repos (issue566)...
Make "hg incoming -r revision_number" work for remote repos (issue566) Uses the remote repository's lookup method as pull does and only transfers what is needed to calculate incoming changesets. One minor problem: As only the needed changesets are transfered and stored in a local bundle repository, the tip tag of this bundle is shows despite not being the tip changeset of the remote repository. (see "+tag: tip" in tests/test-incoming-outgoing.out in this patch)

File last commit:

r4157:bfeff6dc default
r4451:671158f0 default
Show More
test-notify
54 lines | 1.0 KiB | text/plain | TextLexer
#!/bin/sh
cat <<EOF >> $HGRCPATH
[extensions]
notify=
[hooks]
incoming.notify = python:hgext.notify.hook
[notify]
sources = pull
diffstat = False
[usersubs]
foo@bar = *
[reposubs]
* = baz
EOF
hg help notify
hg init a
echo a > a/a
echo % commit
hg --traceback --cwd a commit -Ama -d '0 0'
echo % clone
hg --traceback clone a b
echo a >> a/a
echo % commit
hg --traceback --cwd a commit -Amb -d '1 0'
echo '% pull (minimal config)'
hg --traceback --cwd b pull ../a 2>&1 | sed -e 's/\(Message-Id:\).*/\1/' \
-e 's/changeset \([0-9a-f]* *\)in .*test-notif/changeset \1in test-notif/' \
-e 's/^details: .*test-notify/details: test-notify/'
cat <<EOF >> $HGRCPATH
[notify]
config = $HGTMP/.notify.conf
domain = test.com
strip = 3
template = Subject: {desc|firstline|strip}\nFrom: {author}\n\nchangeset {node|short} in {webroot}\ndescription:\n\t{desc|tabindent|strip}
[web]
baseurl = http://test/
EOF
echo % pull
hg --cwd b rollback
hg --traceback --cwd b pull ../a 2>&1 | sed -e 's/\(Message-Id:\).*/\1/' \
-e 's/changeset \([0-9a-f]*\) in .*/changeset \1/'