tests/test-bookmarks-strip
author Jim Hague <jim.hague@acm.org>
Fri, 09 Jan 2009 22:15:08 +0000
changeset 7618 6c89dd0a7797
parent 7316 9737041646bc
child 11200 12e5149cafca
permissions -rwxr-xr-x
Bugzilla 2.18 and on use contrib/sendbugmail.pl, not processmail. During 2.17, Bugzilla ditched the old 'processmail' script. With 2.18 contrib/sendbugmail.pl arrived in its place. For notification emails to work properly, sendbugmail.pl requires as its second parameter the Bugzilla user who made the commit. Otherwise the user will not be recognised as the committer, and will receive notification emails about the commit regardless of their preference about being notified on their own commits. This parameter should be given to processmail also, but wasn't for historical reasons. Add new config with the local Bugzilla install directory, and provide defaults for the notify string which should work for most setups. Still permit notify string to be specified, and for backwards compatibility with any extant notify strings try first interpolating notify string with old-style single bug ID argument. Add new 2.18 support version to introduce sendbugmail.pl. In other words, this update should be backwards-compatible with existing installations, but offers simplified setup in most cases. And as a bonus Bugzilla notification emails will be dispatched correctly; notifiers will not receive an email unless configured to do so.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7316
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     1
#!/bin/sh
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     2
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     3
echo "[extensions]" >> $HGRCPATH
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     4
echo "bookmarks=" >> $HGRCPATH
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     5
echo "mq=" >> $HGRCPATH
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     6
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     7
hg init
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     8
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
     9
echo qqq>qqq.txt
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    10
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    11
echo % add file
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    12
hg add
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    13
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    14
echo % commit first revision
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    15
hg ci -m 1 -u user -d "1 0"
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    16
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    17
echo % set bookmark
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    18
hg book test
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    19
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    20
echo www>>qqq.txt
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    21
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    22
echo % commit second revision
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    23
hg ci -m 2 -u usr -d "1 0"
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    24
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    25
echo % set bookmark
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    26
hg book test2
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    27
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    28
echo % update to -2
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    29
hg update -r -2
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    30
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    31
echo eee>>qqq.txt
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    32
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    33
echo % commit new head
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    34
hg ci -m 3 -u user -d "1 0"
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    35
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    36
echo % bookmarks updated?
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    37
hg book
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    38
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    39
echo % strip to revision 1
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    40
hg strip 1 2>&1 | sed 's/\(saving bundle to \).*/\1/'
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    41
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    42
echo % list bookmarks
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    43
hg book
9737041646bc bookmarks: Use dirstate to determine the current node in addchangegroup
David Soria Parra <dsp@php.net>
parents:
diff changeset
    44