Commit Graph

43 Commits

Author SHA1 Message Date
Dirkjan Ochtman
2f6d26d640 patch: turn patch.diff() into a generator
This should even be a little faster than passing in an fp argument.
2008-11-03 16:48:23 +01:00
Dirkjan Ochtman
c5e3760e1d help: better documentation intro for a few extensions 2008-10-18 16:56:39 +02:00
Christian Ebert
586a27bcb7 notify: mime-encode messages
- addresses will be properly encoded
- message bodies will also be encoded as we are not sending
  patches that are meant to be applied
- update test output
- adapt test-keyword to ignore the new headers
2008-07-12 19:12:18 +01:00
divy@chelsio.com
3a7f22fad0 notify: fix diffstat printing
notify.diff() keeps line breaks in the diff buffer before calling
patch.diffstat().
patch.diffstat() however adds another line break when feeding diffstat input.
The added extra empty line leads to erroneous diffstat output.
This fix removes the line breaks in notify.diff() and adds it back to print them.
2008-09-03 01:49:16 +02:00
Dennis Schoen
7468181527 fix changegroup.notify hook broken by 644888ebfa31 2008-09-02 15:41:51 +02:00
Dirkjan Ochtman
77285359e6 merge with crew-stable 2008-08-07 09:53:27 +02:00
Doug Philips
8e9dcfc98a Let the notify extension use [diff] options too. 2008-08-07 09:31:42 +02:00
Matt Mackall
a65ef7bc5d util: add sort helper 2008-06-27 18:28:45 -05:00
Matt Mackall
bc715be859 add __len__ and __iter__ methods to repo and revlog 2008-06-26 14:35:50 -05:00
Benoît Allard
5ca67f708d notify: print diffstat even if maxline == 0 2008-03-20 16:42:51 +01:00
Matt Mackall
555abf8390 dates: improve timezone handling
datestr:
- add format specifiers %1 and %2 for timezone hours and minutes
- remove timezone and timezone format options
- correctly find timezone hours and minutes for fractional and negative timezones
- update users

strdate:
- correctly find timezone hours and minutes for fractional and negative timezones
2008-03-11 17:42:41 -05:00
Joel Rosdahl
5dae3059a0 Expand import * to allow Pyflakes to find problems 2008-03-06 22:23:26 +01:00
Matt Mackall
a849fab9e4 templater: move email function to util 2008-01-31 14:44:19 -06:00
Thomas Arendsen Hein
d5b47506f2 merge with stable 2007-06-04 22:08:42 +02:00
Thomas Arendsen Hein
dd9cb9b81d Fixed indentation in hgext/notify.py 2007-06-04 22:02:17 +02:00
Patrick Mezard
ed018bae98 Merge with crew-stable 2007-06-03 17:18:48 +02:00
Alexis S. L. Carvalho
d4de823a64 merge with crew-stable 2007-02-16 05:27:37 -02:00
Alexis S. L. Carvalho
f03ddd16f8 notify: don't try to fix addresses if notify.domain is not set 2007-02-16 04:54:49 -02:00
Alexis S. L. Carvalho
744364abd4 merge with crew-stable 2007-02-13 10:25:45 -02:00
Sean Dague
3f956d46a5 Prevent type exception on concatenation if diffstat returns None.
This will most often occur if diffstat is not installed in the
target platform, though may also happen in other cases where
diffstat fails to execute.

Signed-off-by: Sean Dague <sean@dague.net>
2007-01-30 10:35:25 -05:00
Mathieu Clabaut
35ae1218d2 Add sending date to notify message.
When using SMTP, no date field was set into the message, which causes it to be
displayed as being send on 1st january 1970 on most MUA.
2007-05-24 16:32:38 +02:00
Matt Mackall
296d6a7cb8 Simplify i18n imports 2006-12-14 20:25:19 -06:00
Matt Mackall
f17a4e1934 Replace demandload with new demandimport 2006-12-13 13:27:09 -06:00
Matt Mackall
2623870448 Remove deprecated old-style branch support 2006-12-12 18:16:23 -06:00
Matt Mackall
bbfb5e4171 fix notify with new ui buffering 2006-12-01 01:28:20 -06:00
Marcos Chaves
794888ecba fix warnings generated by pygettext.py. 2006-11-18 17:20:38 -02:00
Matt Mackall
c50c09da0a templates: move changeset templating bits to cmdutils 2006-11-13 13:26:57 -06:00
Alexis S. L. Carvalho
2a7cf18720 use ui.readsections in the notify extension 2006-10-17 17:04:25 -03:00
Aurelien Jacobs
de3b8c9c6a document the diffstat option of the notify extension 2006-10-15 16:35:47 +02:00
Matt Doar
223e5f58eb Add support for diffstat in commit emails, and move diffstat from
patchbomb to patch
2006-09-13 13:14:08 -07:00
Alexis S. L. Carvalho
7831cbb9a7 Fixed an exception in notify extension (b2a_hex argument incorrect)
Detailed messages was - incoming.notify hook raised an exception: b2a_hex() argument 1 must be string or read-only character buffer, not stringio
2006-08-24 15:19:56 -07:00
Matt Mackall
f849bdf704 Move ui.sendmail to mail.connect/sendmail 2006-08-15 14:06:50 -05:00
Vadim Gelfer
13d751feaf refactor text diff/patch code.
rename commands.dodiff to patch.diff.
rename commands.doexport to patch.export.
move some functions from commands to new mercurial.cmdutil module.
turn list of diff options into mdiff.diffopts class.

patch.diff and patch.export now has clean api for call from 3rd party
python code.
2006-08-12 16:13:27 -07:00
Vadim Gelfer
c5053e3bb6 make error better. 2006-08-05 02:00:09 -07:00
Vadim Gelfer
10c73bbd93 notify: add debug output. do not fail if no config file.
use --debug to see debug output.
2006-05-20 12:52:02 -07:00
Vadim Gelfer
be9056ad56 notify: fix off by one error. 2006-05-19 14:57:45 -07:00
Aurelien Jacobs ext:(%22)
b68ea13e18 notify changeset diff should be against current node instead of tip 2006-05-16 14:17:45 -07:00
Vadim Gelfer
990eecd90f localrepository.addchangegroup: add more source infos to hooks 2006-05-08 16:50:27 -07:00
Vadim Gelfer
8ea7dbe8d0 notify: add 'to' header to message. 2006-05-08 12:27:30 -07:00
Vadim Gelfer
a82c03a7e0 notify extension: generate right number of diffs 2006-05-08 11:16:09 -07:00
Vadim Gelfer
41eb4e2c6e reverse sense of return value from python hooks.
old scheme (False/None/0/'' == fail) made coding style
unnatural, did not allow use of mercurial commands as hooks.

new scheme (False/None/0 == pass) is pythonic, does not require peculiar
"return True" at ends of hooks, allows hooks like this:

[hooks]
# update working dir after push into this repo
changegroup.update = python:mercurial.commands.update
2006-05-08 10:59:58 -07:00
Vadim Gelfer
ef1e3759c2 add email notification hook. hook written in python.
email headers and body can be customized using template code.
2006-05-04 15:07:35 -07:00
Bryan O'Sullivan
f8888fa454 patch queue: notify.patch 2006-05-04 12:25:10 -07:00