##// END OF EJS Templates
patchbomb: treat empty address list as no addresses...
Bryan O'Sullivan -
r27697:0ce0cfee default
parent child Browse files
Show More
@@ -44,6 +44,13 b' that the patchbomb extension can automat'
44 directly from the commandline. See the [email] and [smtp] sections in
44 directly from the commandline. See the [email] and [smtp] sections in
45 hgrc(5) for details.
45 hgrc(5) for details.
46
46
47 By default, :hg:`email` will prompt for a ``To`` or ``CC`` header if
48 you do not supply one via configuration or the command line. You can
49 override this to never prompt by configuring an empty value::
50
51 [email]
52 cc =
53
47 You can control the default inclusion of an introduction message with the
54 You can control the default inclusion of an introduction message with the
48 ``patchbomb.intro`` configuration option. The configuration is always
55 ``patchbomb.intro`` configuration option. The configuration is always
49 overwritten by command line flags like --intro and --desc::
56 overwritten by command line flags like --intro and --desc::
@@ -596,10 +603,12 b' def email(ui, repo, *revs, **opts):'
596
603
597 # not on the command line: fallback to config and then maybe ask
604 # not on the command line: fallback to config and then maybe ask
598 addr = (ui.config('email', configkey) or
605 addr = (ui.config('email', configkey) or
599 ui.config('patchbomb', configkey) or
606 ui.config('patchbomb', configkey))
600 '')
607 if not addr:
601 if not addr and ask:
608 specified = (ui.hasconfig('email', configkey) or
602 addr = prompt(ui, header, default=default)
609 ui.hasconfig('patchbomb', configkey))
610 if not specified and ask:
611 addr = prompt(ui, header, default=default)
603 if addr:
612 if addr:
604 showaddrs.append('%s: %s' % (header, addr))
613 showaddrs.append('%s: %s' % (header, addr))
605 return mail.addrlistencode(ui, [addr], _charsets, opts.get('test'))
614 return mail.addrlistencode(ui, [addr], _charsets, opts.get('test'))
@@ -2682,13 +2682,17 b' test outgoing:'
2682 +d
2682 +d
2683
2683
2684
2684
2685 Don't prompt for a CC header.
2686
2687 $ echo "[email]" >> $HGRCPATH
2688 $ echo "cc=" >> $HGRCPATH
2689
2685 dest#branch URIs:
2690 dest#branch URIs:
2686 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test
2691 $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test
2687 comparing with ../t
2692 comparing with ../t
2688 From [test]: test
2693 From [test]: test
2689 this patch series consists of 1 patches.
2694 this patch series consists of 1 patches.
2690
2695
2691 Cc:
2692
2696
2693 displaying [PATCH] test ...
2697 displaying [PATCH] test ...
2694 Content-Type: text/plain; charset="us-ascii"
2698 Content-Type: text/plain; charset="us-ascii"
@@ -2854,7 +2858,6 b' single rev'
2854 @@ -1,1 +1,2 @@
2858 @@ -1,1 +1,2 @@
2855 d
2859 d
2856 +d
2860 +d
2857 Cc:
2858
2861
2859 sending [PATCH] test ...
2862 sending [PATCH] test ...
2860 sending mail: $TESTTMP/t2/pretendmail.sh -f test foo
2863 sending mail: $TESTTMP/t2/pretendmail.sh -f test foo
General Comments 0
You need to be logged in to leave comments. Login now