tests/test-notify.t
changeset 34310 2d0c306a88c2
parent 33969 cefad71d1a45
child 34661 eb586ed5d8ce
equal deleted inserted replaced
34309:b94db1780365 34310:2d0c306a88c2
   186   searching for changes
   186   searching for changes
   187   adding changesets
   187   adding changesets
   188   adding manifests
   188   adding manifests
   189   adding file changes
   189   adding file changes
   190   added 1 changesets with 1 changes to 1 files
   190   added 1 changesets with 1 changes to 1 files
   191   Content-Type: text/plain; charset="us-ascii"
   191   MIME-Version: 1.0
   192   MIME-Version: 1.0
   192   Content-Type: text/plain; charset="us-ascii"
   193   Content-Transfer-Encoding: 7bit
   193   Content-Transfer-Encoding: 7bit
   194   Date: * (glob)
   194   Date: * (glob)
   195   Subject: changeset in $TESTTMP/b: b
   195   Subject: changeset in $TESTTMP/b: b
   196   From: test
   196   From: test
   197   X-Hg-Notification: changeset 0647d048b600
   197   X-Hg-Notification: changeset 0647d048b600
   239   searching for changes
   239   searching for changes
   240   adding changesets
   240   adding changesets
   241   adding manifests
   241   adding manifests
   242   adding file changes
   242   adding file changes
   243   added 1 changesets with 1 changes to 1 files
   243   added 1 changesets with 1 changes to 1 files
   244   Content-Type: text/plain; charset="us-ascii"
   244   MIME-Version: 1.0
   245   MIME-Version: 1.0
   245   Content-Type: text/plain; charset="us-ascii"
   246   Content-Transfer-Encoding: 7bit
   246   Content-Transfer-Encoding: 7bit
   247   X-Test: foo
   247   X-Test: foo
   248   Date: * (glob)
   248   Date: * (glob)
   249   Subject: b
   249   Subject: b
   250   From: test@test.com
   250   From: test@test.com
   281   searching for changes
   281   searching for changes
   282   adding changesets
   282   adding changesets
   283   adding manifests
   283   adding manifests
   284   adding file changes
   284   adding file changes
   285   added 1 changesets with 1 changes to 1 files
   285   added 1 changesets with 1 changes to 1 files
   286   Content-Type: text/plain; charset="us-ascii"
   286   MIME-Version: 1.0
   287   MIME-Version: 1.0
   287   Content-Type: text/plain; charset="us-ascii"
   288   Content-Transfer-Encoding: 7bit
   288   Content-Transfer-Encoding: 7bit
   289   X-Test: foo
   289   X-Test: foo
   290   Date: * (glob)
   290   Date: * (glob)
   291   Subject: b
   291   Subject: b
   292   From: test@test.com
   292   From: test@test.com
   326   searching for changes
   326   searching for changes
   327   adding changesets
   327   adding changesets
   328   adding manifests
   328   adding manifests
   329   adding file changes
   329   adding file changes
   330   added 2 changesets with 0 changes to 0 files
   330   added 2 changesets with 0 changes to 0 files
   331   Content-Type: text/plain; charset="us-ascii"
   331   MIME-Version: 1.0
   332   MIME-Version: 1.0
   332   Content-Type: text/plain; charset="us-ascii"
   333   Content-Transfer-Encoding: 7bit
   333   Content-Transfer-Encoding: 7bit
   334   X-Test: foo
   334   X-Test: foo
   335   Date: * (glob)
   335   Date: * (glob)
   336   Subject: adda2
   336   Subject: adda2
   337   From: test@test.com
   337   From: test@test.com
   349   diff -r cb9a9f314b8b -r 0a184ce6067f a
   349   diff -r cb9a9f314b8b -r 0a184ce6067f a
   350   --- a/a	Thu Jan 01 00:00:00 1970 +0000
   350   --- a/a	Thu Jan 01 00:00:00 1970 +0000
   351   +++ b/a	Thu Jan 01 00:00:02 1970 +0000
   351   +++ b/a	Thu Jan 01 00:00:02 1970 +0000
   352   @@ -1,1 +1,2 @@ a
   352   @@ -1,1 +1,2 @@ a
   353   +a
   353   +a
   354   Content-Type: text/plain; charset="us-ascii"
   354   MIME-Version: 1.0
   355   MIME-Version: 1.0
   355   Content-Type: text/plain; charset="us-ascii"
   356   Content-Transfer-Encoding: 7bit
   356   Content-Transfer-Encoding: 7bit
   357   X-Test: foo
   357   X-Test: foo
   358   Date: * (glob)
   358   Date: * (glob)
   359   Subject: merge
   359   Subject: merge
   360   From: test@test.com
   360   From: test@test.com
   381   searching for changes
   381   searching for changes
   382   adding changesets
   382   adding changesets
   383   adding manifests
   383   adding manifests
   384   adding file changes
   384   adding file changes
   385   added 1 changesets with 1 changes to 1 files
   385   added 1 changesets with 1 changes to 1 files
   386   Content-Type: text/plain; charset="us-ascii"
   386   MIME-Version: 1.0
   387   MIME-Version: 1.0
   387   Content-Type: text/plain; charset="us-ascii"
   388   Content-Transfer-Encoding: 8bit
   388   Content-Transfer-Encoding: 8bit
   389   X-Test: foo
   389   X-Test: foo
   390   Date: * (glob)
   390   Date: * (glob)
   391   Subject: \xc3\xa0... (esc)
   391   Subject: \xc3\xa0... (esc)
   392   From: test@test.com
   392   From: test@test.com
   414   > [notify]
   414   > [notify]
   415   > maxsubject = 67
   415   > maxsubject = 67
   416   > test = False
   416   > test = False
   417   > mbox = mbox
   417   > mbox = mbox
   418   > EOF
   418   > EOF
   419   $ $PYTHON -c 'file("a/a", "ab").write("no" * 500 + "\n")'
   419   $ $PYTHON -c 'file("a/a", "ab").write("no" * 500 + "\xd1\x84" + "\n")'
   420   $ hg --cwd a commit -A -m "long line"
   420   $ hg --cwd a commit -A -m "long line"
   421   $ hg --traceback --cwd b pull ../a
   421   $ hg --traceback --cwd b pull ../a
   422   pulling from ../a
   422   pulling from ../a
   423   searching for changes
   423   searching for changes
   424   adding changesets
   424   adding changesets
   427   added 1 changesets with 1 changes to 1 files
   427   added 1 changesets with 1 changes to 1 files
   428   notify: sending 2 subscribers 1 changes
   428   notify: sending 2 subscribers 1 changes
   429   (run 'hg update' to get a working copy)
   429   (run 'hg update' to get a working copy)
   430   $ $PYTHON $TESTTMP/filter.py < b/mbox
   430   $ $PYTHON $TESTTMP/filter.py < b/mbox
   431   From test@test.com ... ... .. ..:..:.. .... (re)
   431   From test@test.com ... ... .. ..:..:.. .... (re)
   432   Content-Type: text/plain; charset="us-ascii"
   432   MIME-Version: 1.0
   433   MIME-Version: 1.0
   433   Content-Type: text/plain; charset="*" (glob)
   434   Content-Transfer-Encoding: quoted-printable
   434   Content-Transfer-Encoding: quoted-printable
   435   X-Test: foo
   435   X-Test: foo
   436   Date: * (glob)
   436   Date: * (glob)
   437   Subject: long line
   437   Subject: long line
   438   From: test@test.com
   438   From: test@test.com
   439   X-Hg-Notification: changeset e0be44cf638b
   439   X-Hg-Notification: changeset a323cae54f6e
   440   Message-Id: <hg.e0be44cf638b.*.*@*> (glob)
   440   Message-Id: <hg.a323cae54f6e.*.*@*> (glob)
   441   To: baz@test.com, foo@bar
   441   To: baz@test.com, foo@bar
   442   
   442   
   443   changeset e0be44cf638b in b
   443   changeset a323cae54f6e in b
   444   description: long line
   444   description: long line
   445   diffstat:
   445   diffstat:
   446    a |  1 + 1 files changed, 1 insertions(+), 0 deletions(-)
   446    a |  1 + 1 files changed, 1 insertions(+), 0 deletions(-)
   447   
   447   
   448   diffs (8 lines):
   448   diffs (8 lines):
   449   
   449   
   450   diff -r 7ea05ad269dc -r e0be44cf638b a
   450   diff -r 7ea05ad269dc -r a323cae54f6e a
   451   --- a/a	Thu Jan 01 00:00:00 1970 +0000
   451   --- a/a	Thu Jan 01 00:00:00 1970 +0000
   452   +++ b/a	Thu Jan 01 00:00:00 1970 +0000
   452   +++ b/a	Thu Jan 01 00:00:00 1970 +0000
   453   @@ -1,3 +1,4 @@ a a a
   453   @@ -1,3 +1,4 @@ a a a
   454   +nonononononononononononononononononononononononononononononononononononono=
   454   +nonononononononononononononononononononononononononononononononononononono=
   455   nononononononononononononononononononononononononononononononononononononon=
   455   nononononononononononononononononononononononononononononononononononononon=
   462   ononononononononononononononononononononononononononononononononononononono=
   462   ononononononononononononononononononononononononononononononononononononono=
   463   nononononononononononononononononononononononononononononononononononononon=
   463   nononononononononononononononononononononononononononononononononononononon=
   464   ononononononononononononononononononononononononononononononononononononono=
   464   ononononononononononononononononononononononononononononononononononononono=
   465   nononononononononononononononononononononononononononononononononononononon=
   465   nononononononononononononononononononononononononononononononononononononon=
   466   ononononononononononononononononononononononononononononononononononononono=
   466   ononononononononononononononononononononononononononononononononononononono=
   467   nonononononononononononono
   467   nonononononononononononono=D1=84
   468   
   468   
   469  revset selection: send to address that matches branch and repo
   469  revset selection: send to address that matches branch and repo
   470 
   470 
   471   $ cat << EOF >> $HGRCPATH
   471   $ cat << EOF >> $HGRCPATH
   472   > [hooks]
   472   > [hooks]
   492   searching for changes
   492   searching for changes
   493   adding changesets
   493   adding changesets
   494   adding manifests
   494   adding manifests
   495   adding file changes
   495   adding file changes
   496   added 1 changesets with 1 changes to 1 files
   496   added 1 changesets with 1 changes to 1 files
   497   Content-Type: text/plain; charset="us-ascii"
   497   MIME-Version: 1.0
   498   MIME-Version: 1.0
   498   Content-Type: text/plain; charset="us-ascii"
   499   Content-Transfer-Encoding: 7bit
   499   Content-Transfer-Encoding: 7bit
   500   X-Test: foo
   500   X-Test: foo
   501   Date: * (glob)
   501   Date: * (glob)
   502   Subject: test
   502   Subject: test
   503   From: test@test.com
   503   From: test@test.com
   504   X-Hg-Notification: changeset fbbcbc516f2f
   504   X-Hg-Notification: changeset b7cf10b2bdec
   505   Message-Id: <hg.fbbcbc516f2f.*.*@*> (glob)
   505   Message-Id: <hg.b7cf10b2bdec.*.*@*> (glob)
   506   To: baz@test.com, foo@bar, notify@example.com
   506   To: baz@test.com, foo@bar, notify@example.com
   507   
   507   
   508   changeset fbbcbc516f2f in b
   508   changeset b7cf10b2bdec in b
   509   description: test
   509   description: test
   510   (run 'hg update' to get a working copy)
   510   (run 'hg update' to get a working copy)
   511 
   511 
   512 revset selection: don't send to address that waits for mails
   512 revset selection: don't send to address that waits for mails
   513 from different branch
   513 from different branch
   521   searching for changes
   521   searching for changes
   522   adding changesets
   522   adding changesets
   523   adding manifests
   523   adding manifests
   524   adding file changes
   524   adding file changes
   525   added 1 changesets with 0 changes to 0 files (+1 heads)
   525   added 1 changesets with 0 changes to 0 files (+1 heads)
   526   Content-Type: text/plain; charset="us-ascii"
   526   MIME-Version: 1.0
   527   MIME-Version: 1.0
   527   Content-Type: text/plain; charset="us-ascii"
   528   Content-Transfer-Encoding: 7bit
   528   Content-Transfer-Encoding: 7bit
   529   X-Test: foo
   529   X-Test: foo
   530   Date: * (glob)
   530   Date: * (glob)
   531   Subject: test
   531   Subject: test
   532   From: test@test.com
   532   From: test@test.com
   533   X-Hg-Notification: changeset 38b42fa092de
   533   X-Hg-Notification: changeset 5a07df312a79
   534   Message-Id: <hg.38b42fa092de.*.*@*> (glob)
   534   Message-Id: <hg.5a07df312a79.*.*@*> (glob)
   535   To: baz@test.com, foo@bar
   535   To: baz@test.com, foo@bar
   536   
   536   
   537   changeset 38b42fa092de in b
   537   changeset 5a07df312a79 in b
   538   description: test
   538   description: test
   539   (run 'hg heads' to see heads)
   539   (run 'hg heads' to see heads)
   540 
   540 
   541 default template:
   541 default template:
   542 
   542 
   543   $ grep -v '^template =' $HGRCPATH > "$HGRCPATH.new"
   543   $ grep -v '^template =' $HGRCPATH > "$HGRCPATH.new"
   544   $ mv "$HGRCPATH.new" $HGRCPATH
   544   $ mv "$HGRCPATH.new" $HGRCPATH
   545   $ echo a >> a/a
   545   $ echo a >> a/a
   546   $ hg --cwd a commit -m 'default template'
   546   $ hg --cwd a commit -m 'default template'
   547   $ hg --cwd b pull ../a -q | $PYTHON $TESTTMP/filter.py
   547   $ hg --cwd b pull ../a -q | $PYTHON $TESTTMP/filter.py
   548   Content-Type: text/plain; charset="us-ascii"
   548   MIME-Version: 1.0
   549   MIME-Version: 1.0
   549   Content-Type: text/plain; charset="us-ascii"
   550   Content-Transfer-Encoding: 7bit
   550   Content-Transfer-Encoding: 7bit
   551   Date: * (glob)
   551   Date: * (glob)
   552   Subject: changeset in b: default template
   552   Subject: changeset in b: default template
   553   From: test@test.com
   553   From: test@test.com
   554   X-Hg-Notification: changeset 3548c9e294b6
   554   X-Hg-Notification: changeset f5e8ec95bf59
   555   Message-Id: <hg.3548c9e294b6.*.*@*> (glob)
   555   Message-Id: <hg.f5e8ec95bf59.*.*@*> (glob)
   556   To: baz@test.com, foo@bar
   556   To: baz@test.com, foo@bar
   557   
   557   
   558   changeset 3548c9e294b6 in $TESTTMP/b (glob)
   558   changeset f5e8ec95bf59 in $TESTTMP/b (glob)
   559   details: http://test/b?cmd=changeset;node=3548c9e294b6
   559   details: http://test/b?cmd=changeset;node=f5e8ec95bf59
   560   description: default template
   560   description: default template
   561 
   561 
   562 with style:
   562 with style:
   563 
   563 
   564   $ cat <<EOF > notifystyle.map
   564   $ cat <<EOF > notifystyle.map
   572   > style = $TESTTMP/notifystyle.map
   572   > style = $TESTTMP/notifystyle.map
   573   > EOF
   573   > EOF
   574   $ echo a >> a/a
   574   $ echo a >> a/a
   575   $ hg --cwd a commit -m 'with style'
   575   $ hg --cwd a commit -m 'with style'
   576   $ hg --cwd b pull ../a -q | $PYTHON $TESTTMP/filter.py
   576   $ hg --cwd b pull ../a -q | $PYTHON $TESTTMP/filter.py
   577   Content-Type: text/plain; charset="us-ascii"
   577   MIME-Version: 1.0
   578   MIME-Version: 1.0
   578   Content-Type: text/plain; charset="us-ascii"
   579   Content-Transfer-Encoding: 7bit
   579   Content-Transfer-Encoding: 7bit
   580   Date: * (glob)
   580   Date: * (glob)
   581   Subject: with style
   581   Subject: with style
   582   From: test@test.com
   582   From: test@test.com
   583   X-Hg-Notification: changeset e917dbd961d3
   583   X-Hg-Notification: changeset 9e2c3a8e9c43
   584   Message-Id: <hg.e917dbd961d3.*.*@*> (glob)
   584   Message-Id: <hg.9e2c3a8e9c43.*.*@*> (glob)
   585   To: baz@test.com, foo@bar
   585   To: baz@test.com, foo@bar
   586   
   586   
   587   changeset e917dbd961d3
   587   changeset 9e2c3a8e9c43
   588 
   588 
   589 with template (overrides style):
   589 with template (overrides style):
   590 
   590 
   591   $ cat <<EOF >> $HGRCPATH
   591   $ cat <<EOF >> $HGRCPATH
   592   > template = Subject: {node|short}: {desc|firstline|strip}
   592   > template = Subject: {node|short}: {desc|firstline|strip}
   595   >            {desc}
   595   >            {desc}
   596   > EOF
   596   > EOF
   597   $ echo a >> a/a
   597   $ echo a >> a/a
   598   $ hg --cwd a commit -m 'with template'
   598   $ hg --cwd a commit -m 'with template'
   599   $ hg --cwd b pull ../a -q | $PYTHON $TESTTMP/filter.py
   599   $ hg --cwd b pull ../a -q | $PYTHON $TESTTMP/filter.py
   600   Content-Type: text/plain; charset="us-ascii"
   600   MIME-Version: 1.0
   601   MIME-Version: 1.0
   601   Content-Type: text/plain; charset="us-ascii"
   602   Content-Transfer-Encoding: 7bit
   602   Content-Transfer-Encoding: 7bit
   603   Date: * (glob)
   603   Date: * (glob)
   604   Subject: a09743fd3edd: with template
   604   Subject: e2cbf5bf18a7: with template
   605   From: test@test.com
   605   From: test@test.com
   606   X-Hg-Notification: changeset a09743fd3edd
   606   X-Hg-Notification: changeset e2cbf5bf18a7
   607   Message-Id: <hg.a09743fd3edd.*.*@*> (glob)
   607   Message-Id: <hg.e2cbf5bf18a7.*.*@*> (glob)
   608   To: baz@test.com, foo@bar
   608   To: baz@test.com, foo@bar
   609   
   609   
   610   with template
   610   with template