Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
Benoit Boissinot
- Mon, 22 Sep 2008 12:47:21
Show More
tests/test-notify-changegroup
0
created
755
+43
0
@@
-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
tests/test-notify-changegroup.out
0
created
644
+36
0
@@
-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
mercurial/hg.py
0
+2
-1
@@
-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 :
tests/test-doctest.py
0
+2
0
@@
-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
tests/test-hgrc
0
+11
0
@@
-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:...:"
tests/test-hgrc.out
0
+12
0
@@
-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
tests/test-mq
0
+1
-1
@@
-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
tests/test-mq.out
0
+1
-1
@@
-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
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
g 0-9
Goto bookmarked items from 0-9
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository access permissions settings
t s
Toggle sidebar on some pages