# HG changeset patch # User Patrick Mezard # Date 1182101987 -7200 # Node ID f7f2bd7f981d8b1cd4d60ae6cd7d36d3c9911e8d # Parent 1e11e8b6acabf0c201d655fa2b66b2027a373c0f test-patchbomb: fix non-existing --date parameter and filtering regexps. diff --git a/tests/test-patchbomb b/tests/test-patchbomb --- a/tests/test-patchbomb +++ b/tests/test-patchbomb @@ -7,13 +7,15 @@ hg init echo a > a hg commit -Ama -d '1 0' -hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar tip | \ - sed -e 's/\(Message-Id:.*@\).*/\1/' +hg email -n -f quux -t foo -c bar tip | \ + sed -e 's/\(Message-Id:\).*@.*/\1/' | \ + sed -e 's/\(Date:\).*/\1/' echo b > b hg commit -Amb -d '2 0' -hg email --date '1970-1-1 0:2' -n -f quux -t foo -c bar -s test 0:tip | \ - sed -e 's/\(Message-Id:.*@\).*/\1/' | \ - sed -e 's/\(In-Reply-To:.*@\).*/\1/' - +# Pipe something to make raw_input() happy even under pysh+win32 +echo test | hg email -n -f quux -t foo -c bar -s test 0:tip | \ + sed -e 's/\(Message-Id:\).*@.*/\1/' | \ + sed -e 's/\(In-Reply-To:\).*@.*/\1/' | \ + sed -e 's/\(Date:\).*/\1/' \ No newline at end of file diff --git a/tests/test-patchbomb.out b/tests/test-patchbomb.out --- a/tests/test-patchbomb.out +++ b/tests/test-patchbomb.out @@ -1,62 +1,103 @@ adding a -hg email: option --date not recognized -hg email [OPTION]... [REV]... +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCH] a +X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab +Message-Id: +Date: +From: quux +To: foo +Cc: bar -send changesets as a series of patch emails - - The series starts with a "[PATCH 0 of N]" introduction, which - describes the series as a whole. +# HG changeset patch +# User test +# Date 1 0 +# Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab +# Parent 0000000000000000000000000000000000000000 +a - Each patch email has a Subject line of "[PATCH M of N] ...", using - the first line of the changeset description as the subject text. - The message contains two or three body parts. First, the rest of - the changeset description. Next, (optionally) if the diffstat - program is installed, the result of running diffstat on the patch. - Finally, the patch itself, as generated by "hg export". +diff -r 000000000000 -r 8580ff50825a a +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/a Thu Jan 01 00:00:01 1970 +0000 +@@ -0,0 +1,1 @@ ++a -options: +This patch series consists of 1 patches. + - -a --attach send patches as inline attachments - --bcc email addresses of blind copy recipients - -c --cc email addresses of copy recipients - -d --diffstat add diffstat output to messages - -g --git use git extended diff format - -f --from email address of sender - --plain omit hg patch header - -n --test print messages that would be sent - -m --mbox write messages to mbox file instead of sending them - -s --subject subject of first message (intro or single patch) - -t --to email addresses of recipients +Displaying [PATCH] a ... +adding b +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCH 0 of 2] test +Message-Id: +Date: +From: quux +To: foo +Cc: bar + +test -use "hg -v help email" to show global options -adding b -hg email: option --date not recognized -hg email [OPTION]... [REV]... +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCH 1 of 2] a +X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab +Message-Id: +In-Reply-To: +Date: +From: quux +To: foo +Cc: bar -send changesets as a series of patch emails +# HG changeset patch +# User test +# Date 1 0 +# Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab +# Parent 0000000000000000000000000000000000000000 +a - The series starts with a "[PATCH 0 of N]" introduction, which - describes the series as a whole. +diff -r 000000000000 -r 8580ff50825a a +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/a Thu Jan 01 00:00:01 1970 +0000 +@@ -0,0 +1,1 @@ ++a - Each patch email has a Subject line of "[PATCH M of N] ...", using - the first line of the changeset description as the subject text. - The message contains two or three body parts. First, the rest of - the changeset description. Next, (optionally) if the diffstat - program is installed, the result of running diffstat on the patch. - Finally, the patch itself, as generated by "hg export". - -options: +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCH 2 of 2] b +X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 +Message-Id: +In-Reply-To: +Date: +From: quux +To: foo +Cc: bar - -a --attach send patches as inline attachments - --bcc email addresses of blind copy recipients - -c --cc email addresses of copy recipients - -d --diffstat add diffstat output to messages - -g --git use git extended diff format - -f --from email address of sender - --plain omit hg patch header - -n --test print messages that would be sent - -m --mbox write messages to mbox file instead of sending them - -s --subject subject of first message (intro or single patch) - -t --to email addresses of recipients +# HG changeset patch +# User test +# Date 2 0 +# Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 +# Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab +b -use "hg -v help email" to show global options +diff -r 8580ff50825a -r 97d72e5f12c7 b +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/b Thu Jan 01 00:00:02 1970 +0000 +@@ -0,0 +1,1 @@ ++b + +This patch series consists of 2 patches. + + +Write the introductory message for the patch series. + +Finish with ^D or a dot on a line by itself. + + +Displaying [PATCH 0 of 2] test ... +Displaying [PATCH 1 of 2] a ... +Displaying [PATCH 2 of 2] b ...