Commit Graph

191 Commits

Author SHA1 Message Date
Matt Mackall
efecb99535 hg: change various repository() users to use peer() where appropriate
This gets all the easy cases (peers that aren't also used as repositories).
2011-06-10 11:43:38 -05:00
Idan Kamara
10ac959d0b patchbomb: pass --git argument to diffstat 2011-05-20 21:04:45 +03:00
Matt Mackall
cf07129983 scmutil: move revsingle/pair/range from cmdutil
This allows users at levels below the command layer to avoid import loops.
2011-05-13 14:06:28 -05:00
Adrian Buehlmann
8200df2be6 patchbomb: use cmdutil.command decorator 2011-05-12 18:27:05 +02:00
Matt Mackall
cf2d9729ae cmdutil: make_filename -> makefilename 2011-05-10 16:08:46 -05:00
Brodie Rao
b7f0d2a103 url: move URL parsing functions into util to improve startup time
The introduction of the new URL parsing code has created a startup
time regression. This is mainly due to the use of url.hasscheme() in
the ui class. It ends up importing many libraries that the url module
requires.

This fix helps marginally, but if we can get rid of the urllib import
in the URL parser all together, startup time will go back to normal.

perfstartup time before the URL refactoring (707e4b1e8064):

! wall 0.050692 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)

current startup time (9ad1dce9e7f4):

! wall 0.070685 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)

after this change:

! wall 0.064667 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)
2011-04-30 09:43:20 -07:00
Peter Arrenbrecht
b867e650e6 discovery: drop findoutgoing and simplify findcommonincoming's api
This is a long desired cleanup and paves the way for new discovery.
To specify subsets for bundling changes, all code should use the heads
of the desired subset ("heads") and the heads of the common subset
("common") to be excluded from the bundled set. These can be used
revlog.findmissing instead of revlog.nodesbetween.

This fixes an actual bug exposed by the change in test-bundle-r.t
where we try to bundle a changeset while specifying that said changeset
is to be assumed already present in the target. This used to still
bundle the changeset. It no longer does. This is similar to the bugs
fixed by the recent switch to heads/common for incoming/pull.
2011-04-30 17:21:37 +02:00
Martin Geisler
9e82c0f40f patchbomb, help/hgweb: do not refer to config files as hgrc files 2011-04-01 12:14:42 +02:00
Dan Villiom Podlaski Christiansen
ec590d5cd4 explicitly close files
Add missing calls to close() to many places where files are
opened. Relying on reference counting to catch them soon-ish is not
portable and fails in environments with a proper GC, such as PyPy.
2010-12-24 15:23:01 +01:00
Nicolas Dumazet
97f5e1fd2a patchbomb: save introductory message in .hg/last-email.txt 2010-12-21 19:44:28 +09:00
Martin Geisler
69d03175ae patchbomb: fix stray backslash in docstring
While both '\ ' and '\\ ' parse the same in Python, the difference
trips up hggettext so that it cannot find the docstring in the source
file and thus cannot write the right line number to i18n/hg.pot.

While the line number is not essential, it can be used to lookup the
original message.
2010-10-23 18:33:57 +02:00
Benoit Boissinot
94fe6278fb merge with stable 2010-10-20 23:48:33 +02:00
Benoit Boissinot
c6403d4ac6 patchbomb: hide passwords potentially embedded in urls 2010-10-20 23:39:48 +02:00
timeless
73617c6e5a patchbomb: move command option help from the extension (patchbomb) to the command (email) 2010-10-17 14:00:01 +03:00
Yuya Nishihara
0c49a1c065 patchbomb: show progress when sending emails or writing mbox 2010-09-12 16:10:41 +09:00
Christian Ebert
47b2eb085f patchbomb: consistent code style in getaddrs() 2010-09-11 18:08:00 +02:00
Christian Ebert
57eed7cac3 patchbomb: add --confirm option to show series details and ask for confirmation
--confirm presents same prompt as --diffstat, but does not write
a diffstat to the messages' bodies.

A simple test simulating a negative response is included.
2010-09-10 15:32:22 +02:00
Christian Ebert
c4731e2be5 patchbomb: let diffstat prompt only once with complete summary
This changes the behaviour of --diffstat.
Before the user was asked for confirmation of each patch with its
description and diffstat, and a final summary.

Now there is only one prompt right before sending with a final
summary which does not include the patch descriptions, but the
message details and the diffstats:

  Final summary:

  From: sender
  To: recipient(s)
  Cc: (if present)
  Bcc: (if present)
  Reply-To: (if present)
  Subject: [patch 0 of x [flags]] intro (if present)
      a |  28 ++++++++++++++++++++++++++++
      b |  15 +++++++++++++++
  Subject: [patch 1 of x [flags]] subject
      a |  28 ++++++++++++++++++++++++++++
  [ ... ]

  are you sure you want to send (yn)?
2010-09-10 15:32:14 +02:00
Martin Geisler
5e2d304679 patchbomb: rename argument to avoid shadowing patch module 2010-09-10 15:56:13 +02:00
Christian Ebert
c71ec4c740 patchbomb: show prompt and selection in non-interactive mode
Akin to 023d1310d8a4 for the custom patchbomb prompt.
2010-09-08 08:31:07 +02:00
Christian Ebert
c44df41dfd patchbomb: use ui.promptchoice for diffstat to allow localization of choices
The extra check for ui.interacive from patchbomb's prompt function is not
needed here.

Format boolean prompt as in filemerge.py.
2010-09-08 08:31:07 +02:00
Christian Ebert
63a3341098 patchbomb: remove unneeded line continuation 2010-08-25 23:26:18 +01:00
Christian Ebert
60b4f2db95 patchbomb: reduce number of opts.get calls
Rename outgoing() function to getoutgoing() analogous to
getbundle() etc. to avoid name conflict.
2010-06-16 00:37:21 +02:00
FUJIWARA Katsunori
ce06b102df help: show value requirement and multiple occurrence of options
this helps users to know what kind of option is:

  - no value is required(flag option)
  - value is required
  - value is required, and multiple occurrences are allowed

each kinds are shown as below:

 -f --force              force push
 -e --ssh CMD            specify ssh command to use
 -b --branch BRANCH [+]  a specific branch you would like to push

if one or more 3rd type options are shown, explanation for '[+]' mark
is also shown as footnote.
2010-06-06 17:25:00 +09:00
Dirkjan Ochtman
cf1de649bd move discovery methods from localrepo into new discovery module 2010-06-07 18:35:54 +02:00
Matt Mackall
86ebd43d71 remoteui: move from cmdutil to hg 2010-06-01 11:18:57 -05:00
Martin Geisler
efb4a38a04 Use our custom hg reStructuredText role some more
I missed these occurrences on my first scan through the source.
2010-05-18 16:31:10 +02:00
Yuya Nishihara
1027c10b16 patchbomb: respect HGPLAIN when piping --test output to PAGER
It makes easy to use `hg email --test` from another tool.
2010-05-16 22:23:14 +09:00
Cédric Duval
2207d76e14 patchbomb: Reply-To support
From RFC 5322:
  an optional reply-to field MAY also be included, which contains the field
  name "Reply-To" and a comma-separated list of one or more addresses.
  [...]
  When the "Reply-To:" field is present, it indicates the address(es) to which
  the author of the message suggests that replies be sent.  In the absence of
  the "Reply-To:" field, replies SHOULD by default be sent to the mailbox(es)
  specified in the "From:" field unless otherwise specified by the person
  composing the reply.

Reply-To addresses may be specified either via command line with --reply-to
or via the 'email' or 'patchbomb' sections of the config file.
2010-05-10 22:06:28 +02:00
Martin Geisler
f1853c5e82 Use hg role in help strings 2010-04-22 10:24:49 +02:00
Cédric Duval
c0a6443df8 patchbomb: --desc implies --intro
For a single patch, an introductory text should not remain unsent
if --intro has been omitted, as the intent of --desc is clear.
2010-03-15 22:37:38 +01:00
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