Benoit Boissinot
04d99f9fbc
patch/diff: move patch.export() to cmdutil.export()
...
This API change will allow us to break a cycle between patch and cmdutil.
2010-03-08 19:43:24 +01:00
Sune Foldager
5020620fca
interpret repo#name url syntax as branch instead of revision
...
Previously, the name part of an repo#name url was interpreted as a
revision, similar to using the --rev option. Now it is instead looked
up as a branch first, and if that succeeds all the heads of the branch
will be processed instead of just its tip-most head. If the branch
lookup fails, it will be assumed to be an revision as before (e.g. for
tags).
2010-02-07 14:29:07 +01:00
Martin Geisler
8664a6b426
Merge with stable.
2010-01-29 01:04:38 +01:00
Christian Ebert
a215bd3d0b
patchbomb: document [patchbomb] config section for addresses
2010-01-28 11:27:09 +00:00
Matt Mackall
8d99be19f0
many, many trivial check-code fixups
2010-01-25 00:05:27 -06:00
Matt Mackall
cd3ef170f7
Merge with stable
2010-01-19 22:45:09 -06:00
Matt Mackall
595d66f424
Update license to GPLv2+
2010-01-19 22:20:08 -06:00
Sune Foldager
0bec7f7de3
patchbomb: fix bug introduced in a6a075e49b19 and add test
...
Thanks to Augie Fackler for reporting this.
2009-12-08 23:23:59 +01:00
Sune Foldager
d262a88c75
patchbomb: handle repository#rev URLs correctly
2009-12-06 23:22:17 +01:00
Patrick Mezard
29f1e65f87
patchbomb: normalize date format in generated mboxes
...
mbox format should use time.asctime(). Unfortunately, this function writes
2-characters day of week on Windows while unix one writes a single character.
Normalize to Windows version since the other one can hardly be written with
strftime().
2009-11-08 18:08:24 +01:00
Alexander Solovyov
3603882f18
patchbomb: accept default if it is empty string
...
This fixes Cc: prompt.
2009-10-25 14:28:02 +01:00
Martin Geisler
d0b16ead31
patchbomb: fix double-spaces in prompts
2009-10-25 14:24:39 +01:00
Alexander Solovyov
e3586100e3
fix patchbomb prompt when sending series of patches
2009-10-19 23:27:20 +03:00
Nicolas Dumazet
dcf8dc04b3
patchbomb: add --flag to put flags in subject prefixes
...
--flag foo uses:
[PATCH foo]
or
[PATCH M of N foo]
depending on the number of patches.
Multiple flags are supported: --flag foo --flag bar gives [PATCH foo bar]
2009-07-15 11:26:47 +09:00
Martin Geisler
e1eb1f69ef
patchbomb: use a list instead of indented paragraphs
2009-08-03 00:12:10 +02:00
Christian Ebert
7644c068a5
patchbomb: reST syntax for literal blocks in help text
2009-07-31 23:49:47 +02:00
Cédric Duval
21be180306
doc: fix quotes mismatches affecting rst
2009-07-31 01:40:45 +02:00
Martin Geisler
422ad6a339
patchbomb: wrap docstrings at 70 characters
2009-07-26 01:58:13 +02:00
Martin Geisler
61e1c3138f
patchbomb: use reST syntax for literal blocks
2009-07-23 00:24:52 +02:00
Martin Geisler
eff9208067
patchbomb: wrapped docstrings at 78 characters
2009-07-07 23:54:42 +02:00
Cédric Duval
8eebee2964
patchbomb: use local time for the Date: header
2009-07-05 17:09:01 +02:00
Cédric Duval
5287eb35fe
patchbomb: fix From_ in the message's envelope
...
Localized date in the From_ prevents MUAs like mutt from parsing mbox files
generated by patchbomb. Using a 24 characters date in asctime format instead.
2009-07-05 16:42:10 +02:00
Dirkjan Ochtman
c8e6583765
extensions: change descriptions for hook-providing extensions
...
Thanks to timeless and Dave Townsend for advice!
2009-06-24 13:42:34 +02:00
Dirkjan Ochtman
0448417ea2
extensions: change descriptions for extensions providing a few commands
2009-06-24 13:42:02 +02:00
Cédric Duval
dbcec5595d
extensions: improve the consistency of synopses
...
Trying as much as possible to consistently:
- use a present tense predicate followed by a direct object
- verb referring directly to the functionality provided
(ie. not "add command that does this" but simple "do that")
- keep simple and to the point, leaving details for the long help
(width is tight, possibly even more so for translations)
Thanks to timeless, Martin Geisler, Rafael Villar Burke, Dan Villiom
Podlaski Christiansen and others for the helpful suggestions.
2009-06-22 15:48:08 +02:00
Cédric Duval
0caffe860f
help: remove per-extension paragraph on how to enable it
...
The central place to find this information is the "extensions" help topic.
2009-06-20 20:57:13 +02:00
Cédric Duval
e9c53f7deb
patchbomb: do not assume the presence of angle brackets around msg-id
...
RFC 5322 states:
"Semantically, the angle bracket characters are not part of the
msg-id; the msg-id is what is contained between the two angle bracket
characters."
Hence it should be correct to pass a message Id with no angle brackets
to --in-reply-to. Adding them if missing.
2009-06-17 20:54:26 +02:00
timeless
fb33de67af
Generally replace "file name" with "filename" in help and comments.
2009-06-09 09:25:17 -04:00
Sune Foldager
3e254e84d0
Merge with stable
2009-12-08 23:36:06 +01:00
Sune Foldager
772247b8f8
Merge with stable
2009-12-06 23:28:49 +01:00
Marti Raudsepp
7ea70f1f49
patchbomb: fix parsing of multiple addresses, allow multiple addrs in --to/cc/bcc
...
Instead of using custom code to split apart addresses, we now use
mail.parseaddrlist() which always does the Right Thing as it relies on Python's
email.Utils.getaddresses().
Previously, 'hg email --to=foo,bar' only respected foo and discarded bar. Also,
commas in names were not allowed in hgrc or the interactive prompt; specifying
'"Lastname, Firstname" <foo>' would confuse patchbomb.
The testcase uses '-m tmp.mbox' because -n (like in other tests) would disable
address mangling.
2009-11-26 12:23:28 +02:00
Dirkjan Ochtman
d99b64b14b
patchbomb: don't localize Date headers
2009-05-19 15:10:45 +02:00
Cédric Duval
781163e886
patchbomb: with --in-reply-to, still thread message under first in series
...
When specifying --in-reply-to for a message M, have
[M]
[0/2]
[1/2]
[2/2]
instead of
[M]
[0/2]
[1/2]
[2/2]
which is more consistent with the way messages are being threaded
when --in-reply-to is not used.
2009-05-19 01:37:38 +02:00
Cédric Duval
3d0f59632e
patchbomb: minor typo and language fixes
2009-05-19 00:06:19 +02:00
Cédric Duval
67c3c8d092
patchbomb: clarify diffstat usage
2009-05-19 00:02:54 +02:00
Cédric Duval
2b7bf98f37
patchbomb: fix inexact description of the messages threading
...
Each message refers only to the first of the series.
2009-05-18 23:59:22 +02:00
Cédric Duval
34f740c7b3
patchbomb: make diffstat usage clearer
...
Making it clear that diffstat output does not only depend on diffstat
being installed - it also needs to be explicitely requested.
2009-05-17 09:54:08 +02:00
Martin Geisler
bcada47039
patchbomb: describe --attach and --inline options in help
2009-05-17 15:30:45 +02:00
Cédric Duval
b8c83b315b
patchbomb: fix help to reflect actual operation
...
In the body, the description is shown in its entirety,
unstripped from what was already in the subject.
2009-05-17 09:45:49 +02:00
Martin Geisler
139c77bb60
patchbomb: fix quotes in help string
2009-05-09 01:15:24 +02:00
Martin Geisler
9b64d5d1b3
patchbomb: add copyright and license header
2009-04-26 01:48:53 +02:00
Matt Mackall
c15de6b1b7
ui: make interactive a method
2009-04-26 16:50:44 -05:00
Matt Mackall
6708d0e299
add cmdutil.remoteui
...
remoteui sorts out the issues of getting ssh config options from the
local repo into the remote one while not copying other options like hooks.
2009-04-26 16:50:43 -05:00
Henrik Stuart
54d1e80807
patchbomb: add user agent header to mails
2009-04-23 08:39:27 +02:00
Martin Geisler
52ce98c9a8
help texts: write command line switches as -a/--abc
2009-04-18 14:40:21 +02:00
Henrik Stuart
670fb51b7d
patchbomb: Support initial in-reply-to header
...
This allows follow-up/revised patches to appear properly threaded
in mail readers and in the archives, reducing noise.
2009-04-08 19:32:16 +02:00
Martin Geisler
49c758ced4
patchbomb: word-wrap help texts at 70 characters
2009-04-04 23:18:41 +02:00
Martin Geisler
04b0d911a3
Change double spaces to single spaces in help texts.
2009-04-04 21:09:43 +02:00
John Mulligan
18339d9ef9
patchbomb: option to set the name of bundle attachment (issue1452)
...
specifying --bundlename=NAME will create a "NAME.hg" attachment
2009-03-14 10:46:48 -04:00
Peter Arrenbrecht
a2d3e23eef
cleanup: drop variables for unused return values
...
They are unnecessary. I did leave them in localrepo.py where there is
something like:
_junk = foo()
_junk = None
to free memory early. I don't know if just `foo()` will free the return
value as early.
2009-03-23 13:13:02 +01:00
timeless
26d95caa99
help: miscellaneous language fixes
2009-02-28 12:38:45 +01:00
Bill Barry
cc176930e8
added information to patchbomb help pointing users to hgrc(5) to configure the [smtp] section in order to send patchbombs
2009-01-22 10:48:37 -07:00
Martin Geisler
22139f0714
patchbomb: respect diff settings
2009-01-24 18:52:46 +01:00
Benoit Boissinot
552f29178b
use enumerate instead of zip
2009-01-09 01:37:54 +01:00
Benoit Boissinot
11526cacc9
patch: export shouldn't close files received as a parameter
...
We rely on __del__ to close the fd instead. Patchbomb was relying
on this behaviour, fix it.
Thanks to Manuel Barkhau for reporting it.
2009-01-09 01:36:35 +01:00
Martin Geisler
bcc3bda9f7
lowercase prompts
...
The prompts are interactive and not meant for scripts.
2009-01-03 17:15:21 +01:00
Alexander Solovyov
c1774bb6c3
python implementation of diffstat
...
Implemented as two functions: diffstat, which yields lines of text,
formatted as a usual diffstat output, and diffstatdata, which is called
inside diffstat to do real performing and yield file names with
appropriate data (numbers of added and removed lines).
2008-12-25 10:48:24 +02:00
Benoit Allard
f0e30bc7e3
email: add References field in the header
...
This hopefully helps clients get the threading right.
2008-11-25 23:13:14 +01:00
Chris Winter
454f5f9dca
patchbomb: add option to send intro email for a single patch (issue1120)
2008-11-13 10:11:32 +01:00
Peter Arrenbrecht
e9db68caeb
patchbomb: fix patch name generation in patch series
2008-11-12 19:12:32 +01:00
Dirkjan Ochtman
37ad9d0fc7
patchbomb: extract a bunch of nested functions
...
- clarifies dependencies on variables
- extracts potentially useful utility functions
- no need for separate confirm() function
- error message style conformance
- PEP 8 conformance
2008-11-12 14:36:16 +01:00
Peter Arrenbrecht
a3ac15eea4
patchbomb: make hg email
reusable for other patch sources
...
Adds two internal options, patches and patchnames, which allow other extensions
to email a given set of patches. The pbranch extension needs this to send its
patches which are diffs between topic branches.
2008-11-12 14:07:47 +01:00
Peter Arrenbrecht
c548002043
patchbomb: make options to email command reusable
...
Makes the option set that controls the actual emailing of the patches
available as patchbomb.emailopts.
2008-11-12 14:01:09 +01:00
Peter Arrenbrecht
46c235b486
patchbomb: fix indentation
2008-11-07 10:18:55 +01:00
Peter Arrenbrecht
3f48887d79
patchbomb: move exportee class to top level
...
As suggested by djc.
2008-11-07 10:18:12 +01:00
Christian Ebert
d34f3992ca
patchbomb: mime-encode clean utf-8 patches (issue814)
...
Fixes issue814, but only for utf.
2008-10-20 17:40:29 +02:00
Christian Ebert
626bb525a0
patchbomb: mime-encode headers and parts not containing patches
...
Do nothing for "hg email --test" to preserve display.
2008-07-12 19:12:10 +01:00
Christian Ebert
53abba7e41
patchbomb: consistently use opts.get
2008-10-07 13:57:00 +02:00
Martin Geisler
f257c2d86e
i18n: mark strings for translation in patchbomb extension
2008-08-31 16:12:03 +02:00
Dirkjan Ochtman
dc3b56ac83
convert comments to docstrings in a bunch of extensions
2008-06-12 11:33:47 +02:00
Dirkjan Ochtman
2f149e4634
replace usage of os.popen() with util.popen()
...
To make this possible, I added a mode parameter to both implementations of
util.popen(), defaulting to 'r' (as it does in the Python stdlib).
2008-04-14 14:34:38 +02:00
Christian Ebert
76fba4c66a
patchbomb: fix cStringIO import (spotted by pychecker)
2008-04-05 17:48:10 +02:00
Benoit Boissinot
d2251dcfd9
patchbomb: Fix mangling of lines beginning with From
...
we should mangle the lines beginning with From only when writing
to mbox format.
2008-04-02 01:49:29 +02: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
4f8012378a
Remove unused imports
2008-03-06 22:23:41 +01:00
Joel Rosdahl
5dae3059a0
Expand import * to allow Pyflakes to find problems
2008-03-06 22:23:26 +01:00
Matt Mackall
9b6f4fc222
patchbomb: undo backout and fix bugs in the earlier patch
2008-01-31 14:44:19 -06:00
Bryan O'Sullivan
a8ec1cbdc2
Merge after backout
2008-01-25 16:04:46 -08:00
Bryan O'Sullivan
0b03cc2a5a
Backed out changeset 6ac32dcf78a6
2008-01-25 16:04:32 -08:00
Matt Mackall
7a268371b0
patchbomb: prompt only once for SMTP password
...
- simplify mail._sendmail to be a function rather than a class
- simplify connect to return a function rather than a class
- move exception handling from mail.sendmail to mail.connect
- use a single connection for all messages in patchbomb
2008-01-17 13:51:59 -06:00
Christian Ebert
5c18a69d2e
Prefer i in d over d.has_key(i)
2008-01-20 14:39:25 +01:00
Dennis Schoen
1fadcc26a2
patchbomb: attachment options changed
...
'-a/--attach' send patches as attachment
'-i/--inline' sends patches as inline attachment (old behavior of -a/--attach)
2007-12-31 16:18:17 +01:00
Christian Ebert
ad70a015b8
patchbomb: consistently use opts.get
2008-01-04 16:11:01 +01:00
Christian Ebert
6444443fc3
patchbomb: fix more line continuations (coding style)
2008-01-04 15:58:22 +01:00
Christian Ebert
25f9c1f1c6
patchbomb: simplify some line continuations
2007-12-30 14:43:03 +01:00
Christian Ebert
bce3304993
patchbomb: add linebreaks after colons (coding style)
2007-12-30 14:24:03 +01:00
Thomas Arendsen Hein
d63fbb0105
merge with crew
2007-12-28 17:10:57 +01:00
Patrick Mezard
f7a359686e
Merge with crew-stable
2007-12-28 16:46:44 +01:00
Patrick Mezard
0f68a55738
patchbomb: make --bundle respect --desc
2007-12-27 22:40:07 -06:00
Patrick Mezard
219b578ed9
patchbomb: read bundle file in binary mode
2007-12-28 16:41:40 +01:00
Christian Ebert
f996d70387
patchbomb: break lines > 80 chars (coding style)
2007-12-18 22:50:27 +01:00
Christian Ebert
69c7eeabfc
patchbomb: make "hg email -b" w/o destination work as advertised
2007-12-16 22:55:23 +01:00
Christian Ebert
27cd5a7001
patchbomb: make "hg email -b" w/o destination work as advertised
2007-12-16 22:55:23 +01:00
Patrick Mezard
783aa75f49
patchbomb: prompt with ui.prompt()
...
Avoid Windows raw_input() issue introduced by 0f20f68c768c.
Found by Steve Borho <steve@borho.org>.
2007-12-10 22:41:18 +01:00
Christian Ebert
b5976042a1
patchbomb: no traceback if (diffstat) confirmation is refused
2007-10-28 09:25:35 +01:00
Benoit Boissinot
e8f520a51b
patchbomb: fix traceback when diffstat isn't available
2007-10-26 12:01:14 +02:00
Christian Ebert
61e3b4ba58
Catch smtp exceptions
2007-09-07 16:48:42 +02:00
Bryan O'Sullivan
a4a1d041e4
patchbomb: add --desc, to specify a file containing a series description
2007-07-16 14:43:47 -07:00
Thomas Arendsen Hein
0b7147a667
Updated command tables in commands.py and hgext extensions.
...
- Marked for translation where extensions already had _()
- Corrected indentation
- fixed a few synopsises
2007-06-26 22:38:57 +02:00
Thomas Arendsen Hein
483231d996
Cleanup of whitespace, indentation and line continuation.
2007-06-19 08:06:37 +02:00