Submitter | Sébastien Brissaud |
---|---|
Date | Feb. 7, 2016, 8:40 a.m. |
Message ID | <0ae5dbe79b178337e145.1454834440@descartes.seb.brissaud.name> |
Download | mbox | patch |
Permalink | /patch/13072/ |
State | Accepted |
Delegated to: | Yuya Nishihara |
Headers | show |
Comments
On Sun, 07 Feb 2016 09:40:40 +0100, Sébastien Brissaud wrote: > # HG changeset patch > # User Sébastien Brissaud <sebastien@brissaud.name> > # Date 1454834169 -3600 > # Sun Feb 07 09:36:09 2016 +0100 > # Node ID 0ae5dbe79b178337e1459377a1ebbf7ce7bb0485 > # Parent a036e1ae1fbe88ab99cb861ebfc2e4da7a3912ca > test-patchbomb: ensure hg email write to stdout > > With -n/--test and if the PAGER environment variable is set, 'hg email' send its > output to the user defined pager. > > If the pager capture the output, the test is unable verify it. > > Unsetting the PAGER environment variable force 'hg email' to write to stdout. Confirmed with PAGER=true. Pushed to the clowncopter, thanks!
On 2016-02-11 07:31, Yuya Nishihara wrote: > On Sun, 07 Feb 2016 09:40:40 +0100, Sébastien Brissaud wrote: >> # HG changeset patch >> # User Sébastien Brissaud <sebastien@brissaud.name> >> # Date 1454834169 -3600 >> # Sun Feb 07 09:36:09 2016 +0100 >> # Node ID 0ae5dbe79b178337e1459377a1ebbf7ce7bb0485 >> # Parent a036e1ae1fbe88ab99cb861ebfc2e4da7a3912ca >> test-patchbomb: ensure hg email write to stdout >> >> With -n/--test and if the PAGER environment variable is set, 'hg >> email' send its >> output to the user defined pager. >> >> If the pager capture the output, the test is unable verify it. >> >> Unsetting the PAGER environment variable force 'hg email' to write to >> stdout. > > Confirmed with PAGER=true. Pushed to the clowncopter, thanks! Would it make sense to also add a test that ensure that 'hg email --test' fire up the pager if PAGER is set? For example: +Test -n/--test fire up pager if the PAGER environment variable is set + $ PAGER='head -1 | sed "s/^/PAGER: /"' hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip + this patch series consists of 1 patches. + + + displaying [PATCH] a ... + PAGER: Content-Type: text/plain; charset="us-ascii"
On Sat, 13 Feb 2016 07:56:54 +0100, Sébastien Brissaud wrote: > On 2016-02-11 07:31, Yuya Nishihara wrote: > > On Sun, 07 Feb 2016 09:40:40 +0100, Sébastien Brissaud wrote: > >> # HG changeset patch > >> # User Sébastien Brissaud <sebastien@brissaud.name> > >> # Date 1454834169 -3600 > >> # Sun Feb 07 09:36:09 2016 +0100 > >> # Node ID 0ae5dbe79b178337e1459377a1ebbf7ce7bb0485 > >> # Parent a036e1ae1fbe88ab99cb861ebfc2e4da7a3912ca > >> test-patchbomb: ensure hg email write to stdout > >> > >> With -n/--test and if the PAGER environment variable is set, 'hg > >> email' send its > >> output to the user defined pager. > >> > >> If the pager capture the output, the test is unable verify it. > >> > >> Unsetting the PAGER environment variable force 'hg email' to write to > >> stdout. > > > > Confirmed with PAGER=true. Pushed to the clowncopter, thanks! > > Would it make sense to also add a test that ensure that 'hg email > --test' fire up the pager if PAGER is set? > For example: > +Test -n/--test fire up pager if the PAGER environment variable is set > + $ PAGER='head -1 | sed "s/^/PAGER: /"' hg email --date '1970-1-1 0:1' > -n -f quux -t foo -c bar -r tip > + this patch series consists of 1 patches. > + > + > + displaying [PATCH] a ... > + PAGER: Content-Type: text/plain; charset="us-ascii" Sounds nice.
Patch
diff --git a/tests/test-patchbomb.t b/tests/test-patchbomb.t --- a/tests/test-patchbomb.t +++ b/tests/test-patchbomb.t @@ -25,12 +25,15 @@ Mercurial-patchbomb/.* -> Mercurial-patc $ FILTERBOUNDARY="python `pwd`/prune-blank-after-boundary.py" $ echo "[format]" >> $HGRCPATH $ echo "usegeneraldelta=yes" >> $HGRCPATH $ echo "[extensions]" >> $HGRCPATH $ echo "patchbomb=" >> $HGRCPATH +Ensure hg email output is sent to stdout + $ unset PAGER + $ hg init t $ cd t $ echo a > a $ hg commit -Ama -d '1 0' adding a