Mercurial > hg
view tests/test-notify @ 5239:8860f29447c1
imerge: fix ancestor calculation
If wctx already has two parents, ancestor calculation is wrong.
Normally merge is called before wctx gets the second parent, so
we simulate this in imerge by temporarily popping the second parent
before calling filemerge. Highly dirty.
This patch also handles the ParseError move from cmdutil to dispatch.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Thu, 23 Aug 2007 19:51:59 -0700 |
parents | 5371a213b0f4 |
children | 25e74cd3f023 |
line wrap: on
line source
#!/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/' \ -e 's/^Date:.*/Date:/' 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 % fail for config file is missing hg --cwd b rollback hg --cwd b pull ../a 2>&1 | grep 'unable to open.*\.notify\.conf' > /dev/null && echo pull failed touch "$HGTMP/.notify.conf" 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/' \ -e 's/^Date:.*/Date:/'