* [PATCH] install-webdoc: quell diff output on stdout @ 2010-09-01 15:10 Michael J Gruber 2010-09-01 16:24 ` Junio C Hamano 0 siblings, 1 reply; 7+ messages in thread From: Michael J Gruber @ 2010-09-01 15:10 UTC (permalink / raw) To: Junio C Hamano; +Cc: Git Mailing List When installing html-doc, install-webdoc.sh compares the installed html with the version to be installed using diff. Currently, the diff output fills up stdout. Redirect this to /dev/null so that the actual progress report can be spotted again. (Note that install-webdoc.sh actually uses $DIFF so that redirecting stdout is safer than using an option which $DIFF may or may not understand.) Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> --- Documentation/install-webdoc.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Documentation/install-webdoc.sh b/Documentation/install-webdoc.sh index 34d02a2..43c09d2 100755 --- a/Documentation/install-webdoc.sh +++ b/Documentation/install-webdoc.sh @@ -12,7 +12,7 @@ do then : did not match elif test -f "$T/$h" && - $DIFF -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' "$T/$h" "$h" + $DIFF -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' "$T/$h" "$h" >/dev/null then :; # up to date else -- 1.7.2.2.540.g9d56f.dirty ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] install-webdoc: quell diff output on stdout 2010-09-01 15:10 [PATCH] install-webdoc: quell diff output on stdout Michael J Gruber @ 2010-09-01 16:24 ` Junio C Hamano 2010-09-02 7:29 ` Michael J Gruber 0 siblings, 1 reply; 7+ messages in thread From: Junio C Hamano @ 2010-09-01 16:24 UTC (permalink / raw) To: Michael J Gruber; +Cc: Git Mailing List Michael J Gruber <git@drmicha.warpmail.net> writes: > When installing html-doc, install-webdoc.sh compares the installed html > with the version to be installed using diff. Currently, the diff output > fills up stdout. As I've been using this output as the final sanity check on k.org environment, I personally do not want to lose the output from that particular diff. When I push to the public repository, a hook is triggered to build and install the documentation, sending its progress to a log file, and I have a window open running "tail -f" on it. Actually why don't we do the attached instead as the first step? The timestamp that follows "Last updated " is formatted differently depending on the version of AsciiDoc. Looking at 4604fe56 on "html" branch, you can see that AsciiDoc 7.0.2 used to give "02-Jul-2008 03:02:14 UTC" but AsciiDoc 8.2.5 gave "2008-09-19 06:33:25 UTC". We haven't been correctly filtering out phantom changes that result from only the build date for some time now, it seems. Side note: How can you find the above easily? Here is one way, if you run git with f506b8e (git log/diff: add -G<regexp> that greps in the patch text, 2010-08-23) currently parked in 'pu': git log -p -G"Last updated [0-9][0-9]-[A-Z][a-z][a-z]-" origin/html Documentation/install-webdoc.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Documentation/install-webdoc.sh b/Documentation/install-webdoc.sh index 34d02a2..37e67d1 100755 --- a/Documentation/install-webdoc.sh +++ b/Documentation/install-webdoc.sh @@ -12,7 +12,7 @@ do then : did not match elif test -f "$T/$h" && - $DIFF -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' "$T/$h" "$h" + $DIFF -u -I'^Last updated ' "$T/$h" "$h" then :; # up to date else ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] install-webdoc: quell diff output on stdout 2010-09-01 16:24 ` Junio C Hamano @ 2010-09-02 7:29 ` Michael J Gruber 2010-09-02 14:58 ` Junio C Hamano 0 siblings, 1 reply; 7+ messages in thread From: Michael J Gruber @ 2010-09-02 7:29 UTC (permalink / raw) To: Junio C Hamano; +Cc: Git Mailing List Junio C Hamano venit, vidit, dixit 01.09.2010 18:24: > Michael J Gruber <git@drmicha.warpmail.net> writes: > >> When installing html-doc, install-webdoc.sh compares the installed html >> with the version to be installed using diff. Currently, the diff output >> fills up stdout. > > As I've been using this output as the final sanity check on k.org > environment, I personally do not want to lose the output from that > particular diff. > > When I push to the public repository, a hook is triggered to build and > install the documentation, sending its progress to a log file, and I have > a window open running "tail -f" on it. Sorry, isn't that a somewhat crazy type of sanity check? You're getting the complete diff for the generated htmls flying by. Wouldn't the actual "install..." be sufficient, or maybe, a QUIET_DIFF variant which displays the command line? And not only sufficient, but actually easier to check visually as you seem to do? [A more throrough check would be comparing the name-diff of Documentation/*.txt with that of the generated html.] > > Actually why don't we do the attached instead as the first step? > > The timestamp that follows "Last updated " is formatted differently > depending on the version of AsciiDoc. Looking at 4604fe56 on "html" > branch, you can see that AsciiDoc 7.0.2 used to give "02-Jul-2008 03:02:14 > UTC" but AsciiDoc 8.2.5 gave "2008-09-19 06:33:25 UTC". We haven't been > correctly filtering out phantom changes that result from only the build > date for some time now, it seems. > > Side note: > > How can you find the above easily? Here is one way, if you run git > with f506b8e (git log/diff: add -G<regexp> that greps in the patch > text, 2010-08-23) currently parked in 'pu': > > git log -p -G"Last updated [0-9][0-9]-[A-Z][a-z][a-z]-" origin/html > > Documentation/install-webdoc.sh | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/Documentation/install-webdoc.sh b/Documentation/install-webdoc.sh > index 34d02a2..37e67d1 100755 > --- a/Documentation/install-webdoc.sh > +++ b/Documentation/install-webdoc.sh > @@ -12,7 +12,7 @@ do > then > : did not match > elif test -f "$T/$h" && > - $DIFF -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' "$T/$h" "$h" > + $DIFF -u -I'^Last updated ' "$T/$h" "$h" > then > :; # up to date > else I think that is the right fix for the problem you mentioned, which is a different one ;) With your fix, the problem I'm after occurs less often, of course, maybe to the extent of not being a real problem any more. Michael ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] install-webdoc: quell diff output on stdout 2010-09-02 7:29 ` Michael J Gruber @ 2010-09-02 14:58 ` Junio C Hamano 2010-09-06 6:18 ` [PATCHv2] " Michael J Gruber 0 siblings, 1 reply; 7+ messages in thread From: Junio C Hamano @ 2010-09-02 14:58 UTC (permalink / raw) To: Michael J Gruber; +Cc: Git Mailing List Michael J Gruber <git@drmicha.warpmail.net> writes: > Junio C Hamano venit, vidit, dixit 01.09.2010 18:24: > ... >> When I push to the public repository, a hook is triggered to build and >> install the documentation, sending its progress to a log file, and I have >> a window open running "tail -f" on it. > > Sorry, isn't that a somewhat crazy type of sanity check? You're getting > the complete diff for the generated htmls flying by. Wouldn't the actual > "install..." be sufficient, or maybe, a QUIET_DIFF variant which > displays the command line? And not only sufficient, but actually easier > to check visually as you seem to do? I use the diff to see what text actually changed, so the answer is no. But I am file with a patch to squelch the output by default, while giving me an option (perhaps by setting an environment variable when the hook triggers the build and install of the documentation) to unsquelch. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCHv2] install-webdoc: quell diff output on stdout 2010-09-02 14:58 ` Junio C Hamano @ 2010-09-06 6:18 ` Michael J Gruber 2010-09-06 7:07 ` Junio C Hamano 0 siblings, 1 reply; 7+ messages in thread From: Michael J Gruber @ 2010-09-06 6:18 UTC (permalink / raw) To: git; +Cc: Junio C Hamano When installing html-doc, install-webdoc.sh compares the installed html with the version to be installed using diff. Currently, the diff output fills up stdout. install-webdoc.sh actually uses $DIFF, and is the only user. Redefine DIFF from "diff" to "diff -q" to quell the output which is a more useful general default and in line with the default "QUIET" make rules. This can be easily overriden by prefixing make with "DIFF=diff" or putting this in config.mak. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> --- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 38a8b65..b5d9c51 100644 --- a/Makefile +++ b/Makefile @@ -301,7 +301,7 @@ export prefix bindir sharedir sysconfdir gitwebdir CC = gcc AR = ar RM = rm -f -DIFF = diff +DIFF ?= diff -q TAR = tar FIND = find INSTALL = install -- 1.7.2.2.540.g9d56f.dirty ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCHv2] install-webdoc: quell diff output on stdout 2010-09-06 6:18 ` [PATCHv2] " Michael J Gruber @ 2010-09-06 7:07 ` Junio C Hamano 2010-09-06 13:24 ` Michael J Gruber 0 siblings, 1 reply; 7+ messages in thread From: Junio C Hamano @ 2010-09-06 7:07 UTC (permalink / raw) To: Michael J Gruber; +Cc: git Michael J Gruber <git@drmicha.warpmail.net> writes: > When installing html-doc, install-webdoc.sh compares the installed html > with the version to be installed using diff. Currently, the diff output > fills up stdout. > > install-webdoc.sh actually uses $DIFF, and is the only user. I think you broke "tNNNN-X.sh -v"; isn't $DIFF used in t/ scripts everywhere? Even if install-webdoc.sh were the sole user (which is not), please don't do it this way. Instead, introduce "SHOW_PATCH_WHILE_INSTALLING_WEBDOC" or something, and run "$DIFF" with "-q" when it is not set. Otherwise you would forbid people from using $DIFF for its intended purpose: name a diff binary that can be used that is different from a crappy diff your platform gives you by default. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv2] install-webdoc: quell diff output on stdout 2010-09-06 7:07 ` Junio C Hamano @ 2010-09-06 13:24 ` Michael J Gruber 0 siblings, 0 replies; 7+ messages in thread From: Michael J Gruber @ 2010-09-06 13:24 UTC (permalink / raw) To: Junio C Hamano; +Cc: git Junio C Hamano venit, vidit, dixit 06.09.2010 09:07: > Michael J Gruber <git@drmicha.warpmail.net> writes: > >> When installing html-doc, install-webdoc.sh compares the installed html >> with the version to be installed using diff. Currently, the diff output >> fills up stdout. >> >> install-webdoc.sh actually uses $DIFF, and is the only user. > > I think you broke "tNNNN-X.sh -v"; isn't $DIFF used in t/ scripts > everywhere? Um, OK, sorry. I grepped for it but not everywhere it seems. I'll be partially online only this week but I'll try to come up with something agreeable. Michael ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-09-06 13:24 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-09-01 15:10 [PATCH] install-webdoc: quell diff output on stdout Michael J Gruber 2010-09-01 16:24 ` Junio C Hamano 2010-09-02 7:29 ` Michael J Gruber 2010-09-02 14:58 ` Junio C Hamano 2010-09-06 6:18 ` [PATCHv2] " Michael J Gruber 2010-09-06 7:07 ` Junio C Hamano 2010-09-06 13:24 ` Michael J Gruber
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).