[PATCH] patchbomb: make --git imply --plain
Henning Schild
henning at hennsch.de
Wed Nov 16 20:41:01 UTC 2016
# HG changeset patch
# User Henning Schild <henning at hennsch.de>
# Date 1479327376 -3600
# Wed Nov 16 21:16:16 2016 +0100
# Node ID 181aaf02c1542387651e66c22063bb276271ced2
# Parent db8637a8a7464aca668e5aaa2fb9610edaf6f286
patchbomb: make --git imply --plain
Not using --plain would generate mails with the hg header in the git commit
message. Since --git already caters for git, might as well make sure users do
not forget --plain.
diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -524,6 +524,10 @@
# internal option used by pbranches
patches = opts.get('patches')
+ if (opts.get('git') and not opts.get('plain')):
+ repo.ui.debug('--git implies --plain, setting --plain')
+ opts['plain'] = True
+
if not (opts.get('test') or mbox):
# really sending
mail.validateconfig(ui)
diff --git a/tests/test-patchbomb.t b/tests/test-patchbomb.t
--- a/tests/test-patchbomb.t
+++ b/tests/test-patchbomb.t
@@ -755,13 +755,6 @@
To: foo
Cc: bar
- # HG changeset patch
- # User test
- # Date 3 0
- # Thu Jan 01 00:00:03 1970 +0000
- # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
- # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
- c
---
c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
@@ -953,13 +946,6 @@
To: foo
Cc: bar
- # HG changeset patch
- # User test
- # Date 1 0
- # Thu Jan 01 00:00:01 1970 +0000
- # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
- # Parent 0000000000000000000000000000000000000000
- a
---
a | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
@@ -989,13 +975,6 @@
To: foo
Cc: bar
- # HG changeset patch
- # User test
- # Date 2 0
- # Thu Jan 01 00:00:02 1970 +0000
- # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
- # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
- b
---
b | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
More information about the Mercurial-devel
mailing list