##// END OF EJS Templates
merge with -stable
Benoit Boissinot -
r7048:25961e53 merge default
parent child Browse files
Show More
@@ -0,0 +1,43 b''
1 #!/bin/sh
2
3 cat <<EOF >> $HGRCPATH
4 [extensions]
5 notify=
6
7 [hooks]
8 changegroup.notify = python:hgext.notify.hook
9
10 [notify]
11 sources = push
12 diffstat = False
13 maxsubject = 200
14
15 [usersubs]
16 foo@bar = *
17
18 [reposubs]
19 * = baz
20 EOF
21
22 hg init a
23
24 echo % clone
25 hg --traceback clone a b
26
27 echo a > b/a
28 echo % commit
29 hg --traceback --cwd b commit -Ama
30
31 echo a >> b/a
32 echo % commit
33 hg --traceback --cwd b commit -Amb
34
35 echo % push
36 hg --traceback --cwd b push ../a 2>&1 |
37 python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
38 sed -e 's/\(Message-Id:\).*/\1/' \
39 -e 's/changeset \([0-9a-f]* *\)in .*test-notif/changeset \1in test-notif/' \
40 -e 's/^Subject: .*test-notify/Subject: test-notify/' \
41 -e 's/^details: .*test-notify/details: test-notify/' \
42 -e 's/^Date:.*/Date:/'
43
@@ -0,0 +1,36 b''
1 % clone
2 updating working directory
3 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
4 % commit
5 adding a
6 % commit
7 % push
8 pushing to ../a
9 searching for changes
10 adding changesets
11 adding manifests
12 adding file changes
13 added 2 changesets with 2 changes to 1 files
14 Date:
15 Subject: test-notify-changegroup/a: 2 new changesets
16 From: test
17 X-Hg-Notification: changeset cb9a9f314b8b
18 Message-Id:
19 To: baz, foo@bar
20
21 changeset cb9a9f314b8b in test-notify-changegroup/a
22 details: test-notify-changegroup/a?cmd=changeset;node=cb9a9f314b8b
23 summary: a
24
25 changeset ba677d0156c1 in test-notify-changegroup/a
26 details: test-notify-changegroup/a?cmd=changeset;node=ba677d0156c1
27 summary: b
28
29 diffs (6 lines):
30
31 diff -r 000000000000 -r ba677d0156c1 a
32 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
33 +++ b/a Thu Jan 01 00:00:00 1970 +0000
34 @@ -0,0 +1,2 @@
35 +a
36 +a
@@ -223,7 +223,8 b' def clone(ui, source, dest=None, pull=Fa'
223 if dest_repo.local():
223 if dest_repo.local():
224 fp = dest_repo.opener("hgrc", "w", text=True)
224 fp = dest_repo.opener("hgrc", "w", text=True)
225 fp.write("[paths]\n")
225 fp.write("[paths]\n")
226 fp.write("default = %s\n" % abspath)
226 # percent needs to be escaped for ConfigParser
227 fp.write("default = %s\n" % abspath.replace('%', '%%'))
227 fp.close()
228 fp.close()
228
229
229 if update:
230 if update:
@@ -1,3 +1,5 b''
1 # this is hack to make sure no escape characters are inserted into the output
2 import os; del os.environ['TERM']
1 import doctest
3 import doctest
2
4
3 import mercurial.changelog
5 import mercurial.changelog
@@ -5,3 +5,14 b' cd t'
5 hg init
5 hg init
6 echo "invalid" > .hg/hgrc
6 echo "invalid" > .hg/hgrc
7 hg status 2>&1 |sed -e "s:/.*\(/t/.*\):...\1:"
7 hg status 2>&1 |sed -e "s:/.*\(/t/.*\):...\1:"
8
9 #issue 1199, escaping
10
11 cd ..
12 hg init "foo%bar"
13 hg clone "foo%bar" foobar
14 p=`pwd`
15 cd foobar
16 cat .hg/hgrc |sed -e "s:$p:...:"
17 hg paths |sed -e "s:$p:...:"
18 hg showconfig |sed -e "s:$p:...:"
@@ -2,3 +2,15 b' abort: Failed to parse .../t/.hg/hgrc'
2 File contains no section headers.
2 File contains no section headers.
3 file: .../t/.hg/hgrc, line: 1
3 file: .../t/.hg/hgrc, line: 1
4 'invalid\n'
4 'invalid\n'
5 updating working directory
6 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
7 [paths]
8 default = .../foo%%bar
9 default = .../foo%bar
10 bundle.mainreporoot=.../foobar
11 defaults.backout=-d "0 0"
12 defaults.commit=-d "0 0"
13 defaults.debugrawcommit=-d "0 0"
14 defaults.tag=-d "0 0"
15 paths.default=.../foo%bar
16 ui.slash=True
@@ -520,7 +520,7 b' echo % qpush should fail, local changes'
520 hg qpush
520 hg qpush
521
521
522 echo % apply force, should not discard changes with empty patch
522 echo % apply force, should not discard changes with empty patch
523 hg qpush -f
523 hg qpush -f 2>&1 | sed 's,^.*/patch,patch,g'
524 hg diff --config diff.nodates=True
524 hg diff --config diff.nodates=True
525 hg qdiff --config diff.nodates=True
525 hg qdiff --config diff.nodates=True
526 hg log -l1 -p
526 hg log -l1 -p
@@ -500,7 +500,7 b' Patch queue now empty'
500 abort: local changes found, refresh first
500 abort: local changes found, refresh first
501 % apply force, should not discard changes with empty patch
501 % apply force, should not discard changes with empty patch
502 applying empty
502 applying empty
503 /usr/bin/patch: **** Only garbage was found in the patch input.
503 patch: **** Only garbage was found in the patch input.
504 patch failed, unable to continue (try -v)
504 patch failed, unable to continue (try -v)
505 patch empty is empty
505 patch empty is empty
506 Now at: empty
506 Now at: empty
General Comments 0
You need to be logged in to leave comments. Login now