tests/test-merge7
author Jim Hague <jim.hague@acm.org>
Fri, 09 Jan 2009 22:15:08 +0000
changeset 7618 6c89dd0a7797
parent 6888 7c36a4fb05a3
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:
1351
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     1
#!/bin/sh
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     2
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     3
# initial
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     4
hg init test-a
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     5
cd test-a
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     6
cat >test.txt <<"EOF"
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     7
1
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     8
2
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     9
3
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    10
EOF
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    11
hg add test.txt
1933
7544700fd931 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1352
diff changeset
    12
hg commit -m "Initial" -d "1000000 0"
1351
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    13
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    14
# clone
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    15
cd ..
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    16
hg clone test-a test-b
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    17
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    18
# change test-a
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    19
cd test-a
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    20
cat >test.txt <<"EOF"
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    21
one
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    22
two
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    23
three
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    24
EOF
1933
7544700fd931 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1352
diff changeset
    25
hg commit -m "Numbers as words" -d "1000000 0"
1351
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    26
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    27
# change test-b
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    28
cd ../test-b
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    29
cat >test.txt <<"EOF"
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    30
1
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    31
2.5
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    32
3
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    33
EOF
1933
7544700fd931 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1352
diff changeset
    34
hg commit -m "2 -> 2.5" -d "1000000 0"
1351
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    35
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    36
# now pull and merge from test-a
1352
bf6c91cb816f Make test-merge7 repeatable
Matt Mackall <mpm@selenic.com>
parents: 1351
diff changeset
    37
hg pull ../test-a
4365
46280c004f22 change tests to use simplemerge by default
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3853
diff changeset
    38
hg merge
1351
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    39
# resolve conflict
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    40
cat >test.txt <<"EOF"
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    41
one
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    42
two-point-five
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    43
three
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    44
EOF
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    45
rm -f *.orig
6888
7c36a4fb05a3 make commit fail when committing unresolved files
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 4387
diff changeset
    46
hg resolve -m test.txt
1933
7544700fd931 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1352
diff changeset
    47
hg commit -m "Merge 1" -d "1000000 0"
1351
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    48
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    49
# change test-a again
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    50
cd ../test-a
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    51
cat >test.txt <<"EOF"
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    52
one
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    53
two-point-one
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    54
three
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    55
EOF
1933
7544700fd931 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1352
diff changeset
    56
hg commit -m "two -> two-point-one" -d "1000000 0"
1351
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    57
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    58
# pull and merge from test-a again
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    59
cd ../test-b
1352
bf6c91cb816f Make test-merge7 repeatable
Matt Mackall <mpm@selenic.com>
parents: 1351
diff changeset
    60
hg pull ../test-a
4365
46280c004f22 change tests to use simplemerge by default
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3853
diff changeset
    61
hg merge --debug
1351
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    62
4387
93a4e72b4f83 run-tests.py: pass -L/--label to simplemerge
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4365
diff changeset
    63
cat test.txt
1351
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    64
3853
c0b449154a90 switch to the .hg/store layout, fix the tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 2283
diff changeset
    65
hg debugindex .hg/store/data/test.txt.i
1351
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    66
0e2be889ccd7 Repair ancestor logic, fix up test cases
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    67
hg log