# HG changeset patch # User Henning Schild <henn...@hennsch.de> # Date 1479415557 -3600 # Thu Nov 17 21:45:57 2016 +0100 # Node ID de2b03a509491020f728f1955e39e2bfb9a77426 # Parent a9be53e26cb1ac19d1c0156062e8ae23f8366d8b patchbomb: make --git-format-patch imply --plain
Not using --plain would generate mails with the hg header in the git commit message. Since --git-format-patch 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 @@ -418,7 +418,7 @@ @command('email', [('g', 'git', None, _('use git extended diff format')), ('', 'git-format-patch', None, _('use git-format-patch email format ' - '(implies --git)')), + '(implies --git and --plain)')), ('', 'plain', None, _('omit hg patch header')), ('o', 'outgoing', None, _('send changes not found in the target repository')), @@ -527,6 +527,7 @@ if (opts.get('git_format_patch')): opts['git'] = True + opts['plain'] = True if not (opts.get('test') or mbox): # really sending 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(-) _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel