Show More
@@ -1,75 +1,128 b'' | |||
|
1 | 1 | |
|
2 | 2 | $ cat <<EOF >> $HGRCPATH |
|
3 | 3 | > [extensions] |
|
4 | 4 | > notify= |
|
5 | 5 | > |
|
6 | 6 | > [hooks] |
|
7 | 7 | > changegroup.notify = python:hgext.notify.hook |
|
8 | 8 | > |
|
9 | 9 | > [notify] |
|
10 | 10 | > sources = push |
|
11 | 11 | > diffstat = False |
|
12 | 12 | > maxsubject = 10 |
|
13 | 13 | > |
|
14 | 14 | > [usersubs] |
|
15 | 15 | > foo@bar = * |
|
16 | 16 | > |
|
17 | 17 | > [reposubs] |
|
18 | 18 | > * = baz |
|
19 | 19 | > EOF |
|
20 | 20 | $ hg init a |
|
21 | 21 | |
|
22 | 22 | clone |
|
23 | 23 | |
|
24 | 24 | $ hg --traceback clone a b |
|
25 | 25 | updating to branch default |
|
26 | 26 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 27 | $ echo a > b/a |
|
28 | 28 | |
|
29 | 29 | commit |
|
30 | 30 | |
|
31 | 31 | $ hg --traceback --cwd b commit -Ama |
|
32 | 32 | adding a |
|
33 | 33 | $ echo a >> b/a |
|
34 | 34 | |
|
35 | 35 | commit |
|
36 | 36 | |
|
37 | 37 | $ hg --traceback --cwd b commit -Amb |
|
38 | 38 | |
|
39 | 39 | push |
|
40 | 40 | |
|
41 | 41 | $ hg --traceback --cwd b push ../a 2>&1 | |
|
42 | 42 | > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
|
43 | 43 | pushing to ../a |
|
44 | 44 | searching for changes |
|
45 | 45 | adding changesets |
|
46 | 46 | adding manifests |
|
47 | 47 | adding file changes |
|
48 | 48 | added 2 changesets with 2 changes to 1 files |
|
49 | 49 | Content-Type: text/plain; charset="us-ascii" |
|
50 | 50 | MIME-Version: 1.0 |
|
51 | 51 | Content-Transfer-Encoding: 7bit |
|
52 | 52 | Date: * (glob) |
|
53 | 53 | Subject: * (glob) |
|
54 | 54 | From: test |
|
55 | 55 | X-Hg-Notification: changeset cb9a9f314b8b |
|
56 | 56 | Message-Id: <*> (glob) |
|
57 | 57 | To: baz, foo@bar |
|
58 | 58 | |
|
59 | 59 | changeset cb9a9f314b8b in $TESTTMP/a |
|
60 | 60 | details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b |
|
61 | 61 | summary: a |
|
62 | 62 | |
|
63 | 63 | changeset ba677d0156c1 in $TESTTMP/a |
|
64 | 64 | details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1 |
|
65 | 65 | summary: b |
|
66 | 66 | |
|
67 | 67 | diffs (6 lines): |
|
68 | 68 | |
|
69 | 69 | diff -r 000000000000 -r ba677d0156c1 a |
|
70 | 70 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
71 | 71 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
72 | 72 | @@ -0,0 +1,2 @@ |
|
73 | 73 | +a |
|
74 | 74 | +a |
|
75 | $ hg --cwd a rollback | |
|
76 | repository tip rolled back to revision -1 (undo push) | |
|
77 | working directory now based on revision -1 | |
|
75 | 78 | |
|
79 | unbundle with unrelated source | |
|
80 | ||
|
81 | $ hg --cwd b bundle ../test.hg ../a | |
|
82 | searching for changes | |
|
83 | 2 changesets found | |
|
84 | $ hg --cwd a unbundle ../test.hg | |
|
85 | adding changesets | |
|
86 | adding manifests | |
|
87 | adding file changes | |
|
88 | added 2 changesets with 2 changes to 1 files | |
|
89 | (run 'hg update' to get a working copy) | |
|
90 | $ hg --cwd a rollback | |
|
91 | repository tip rolled back to revision -1 (undo unbundle) | |
|
92 | working directory now based on revision -1 | |
|
93 | ||
|
94 | unbundle with correct source | |
|
95 | ||
|
96 | $ hg --config notify.sources=unbundle --cwd a unbundle ../test.hg 2>&1 | | |
|
97 | > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' | |
|
98 | adding changesets | |
|
99 | adding manifests | |
|
100 | adding file changes | |
|
101 | added 2 changesets with 2 changes to 1 files | |
|
102 | Content-Type: text/plain; charset="us-ascii" | |
|
103 | MIME-Version: 1.0 | |
|
104 | Content-Transfer-Encoding: 7bit | |
|
105 | Date: * (glob) | |
|
106 | Subject: * (glob) | |
|
107 | From: test | |
|
108 | X-Hg-Notification: changeset cb9a9f314b8b | |
|
109 | Message-Id: <*> (glob) | |
|
110 | To: baz, foo@bar | |
|
111 | ||
|
112 | changeset cb9a9f314b8b in $TESTTMP/a | |
|
113 | details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b | |
|
114 | summary: a | |
|
115 | ||
|
116 | changeset ba677d0156c1 in $TESTTMP/a | |
|
117 | details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1 | |
|
118 | summary: b | |
|
119 | ||
|
120 | diffs (6 lines): | |
|
121 | ||
|
122 | diff -r 000000000000 -r ba677d0156c1 a | |
|
123 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
|
124 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |
|
125 | @@ -0,0 +1,2 @@ | |
|
126 | +a | |
|
127 | +a | |
|
128 | (run 'hg update' to get a working copy) |
General Comments 0
You need to be logged in to leave comments.
Login now