From: Per Cederqvist <hidden> Date: 2016-06-15 23:03:40
guilt no longer supports running commands on the "guilt-add" form.
You need to use "guilt add" instead.
This patch series updates most of the documentation to use the
supported "guilt add" form.
There is one known instance where I did not change the style: in the
NAME section in Documentation/guilt-*.txt. The reason is that if I
change it there, xmlto will create the man pages as e.g. guilt_add.1
instead of guilt-add.1, and I don't know how to fix that. Also, the
git man pages (as of Git 2.1.0) still have "git-add" under the NAME
heading of git-add(1), so it might be wise to follow suite.
While working on this, I also found two minor issues with
Documentation/Makefile.
/ceder
Per Cederqvist (5):
Fix generation of Documentation/usage-%.txt.
doc: guilt.xml depends on cmds.txt.
doc: don't use guilt-foo invocations in examples.
doc: don't use guilt-foo invocations in usage messages.
doc: git doesn't use git-foo invocations.
Documentation/.gitignore | 3 +++
Documentation/Makefile | 6 ++++--
Documentation/guilt-add.txt | 4 ++--
Documentation/guilt-delete.txt | 2 +-
Documentation/guilt-diff.txt | 2 +-
Documentation/guilt-help.txt | 4 ++--
Documentation/guilt-new.txt | 6 +++---
Documentation/guilt-refresh.txt | 2 +-
Documentation/guilt-repair.txt | 2 +-
Documentation/guilt-rm.txt | 2 +-
Documentation/guilt-select.txt | 4 ++--
Documentation/usage.sh | 8 +++-----
12 files changed, 24 insertions(+), 21 deletions(-)
--
2.1.0
From: Per Cederqvist <hidden> Date: 2016-06-15 23:03:40
The old rule worked, most of the time, but had several issues:
- It depended on the corresponding guilt-*.txt file, but the usage.sh
script actually reads ../guilt-foo.
- Actually, each usage-%.txt depended on all guilt-*.txt files, so
make had to do more work than necessary if a single file was
altered.
- The construct broke parallel make, which would spawn several
usage.sh at once. This leads to unnecessary work, and could
potentially result in broken usage files if the "echo some_string >
some_file" construct used by usage.sh isn't atomic.
Fixed by letting the usage.sh script update a single file, and writing
a proper implicit make rule. This makes parallel make work a lot
better.
There is a small downside, though, as usage.sh will now be run once
for each command (if everything is regenerated). I think it is worth
to pay that price to get the correctness. This command is still very
fast compared to the docbook processing.
Signed-off-by: Per Cederqvist <redacted>
---
Documentation/Makefile | 4 ++--
Documentation/usage.sh | 8 +++-----
2 files changed, 5 insertions(+), 7 deletions(-)
From: Per Cederqvist <hidden> Date: 2016-06-15 23:03:40
Specify an explicit dependency, to stop make from trying to generate
guilt.xml if cmds.txt could not be created. The asciidoc will fail
and produce an error message that might hide the original error
message.
The added dependency causes make to not remove the guilt.xml file.
Add *.xml to .gitignore.
Signed-off-by: Per Cederqvist <redacted>
---
Documentation/.gitignore | 3 +++
Documentation/Makefile | 2 ++
2 files changed, 5 insertions(+)
From: Per Cederqvist <hidden> Date: 2016-06-15 23:03:40
Note: there is one place where I replace guilt-repair with "guilt
repair" instead of "+guilt repair+". At least the version of docbook
I'm using mishandles the "+" signs in that particular spot (even
though it works properly for "+guilt select+" in another file. I know
too little docbook to be able to find the cause.
Signed-off-by: Per Cederqvist <redacted>
---
Documentation/guilt-add.txt | 2 +-
Documentation/guilt-delete.txt | 2 +-
Documentation/guilt-diff.txt | 2 +-
Documentation/guilt-help.txt | 4 ++--
Documentation/guilt-new.txt | 6 +++---
Documentation/guilt-repair.txt | 2 +-
Documentation/guilt-select.txt | 4 ++--
7 files changed, 11 insertions(+), 11 deletions(-)
@@ -18,7 +18,7 @@ OPTIONS ------- -z:: Output a interdiff against the top-most applied patch. This should- produce the same diff as "+guilt-new -f foo+".+ produce the same diff as "+guilt new -f foo+". <path>...:: Restrict diff output to a given set of files.
@@ -18,11 +18,11 @@ EXAMPLES Open the guilt-status man page - $ guilt-help status+ $ guilt help status Open the guilt man page - $ guilt-help+ $ guilt help Author ------
@@ -42,16 +42,16 @@ EXAMPLES Create a new patch called 'foobar':- $ guilt-new foobar+ $ guilt new foobar Create a patch called 'foo' and supply a patch description interactively:- $ guilt-new -e foo+ $ guilt new -e foo Create a patch called 'bar' with a provided patch description and sign off on the patch:- $ guilt-new -s -m patch-fu bar+ $ guilt new -s -m patch-fu bar Author ------
@@ -22,7 +22,7 @@ Perform various repository repairs. You must specify one mode of repair: WARNING: Running this command may result in commits and working directory changes being lost. You may want to create a new reference (e.g., branch, or reflog) to the original HEAD before using- guilt-repair.+ "guilt repair". --status:: Upgrade the status file from old format to new.
@@ -19,10 +19,10 @@ the following way: * An unguarded patch is always applied. * A patch with a positive guard is applied *only* if the guard is-selected with guilt-select.+selected with "+guilt select+". * A patch with a negative guard is applied *unless* the guard is-selected with guilt-select.+selected with "+guilt select+". OPTIONS -------
From: Per Cederqvist <hidden> Date: 2016-06-15 23:03:40
Make them into reference to the man pages instead.
Signed-off-by: Per Cederqvist <redacted>
---
Documentation/guilt-add.txt | 2 +-
Documentation/guilt-refresh.txt | 2 +-
Documentation/guilt-rm.txt | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
@@ -11,7 +11,7 @@ include::usage-guilt-add.txt[] DESCRIPTION ------------Adds the files specified to git using git-add making it available to guilt.+Adds the files specified to git using git-add(1) making it available to guilt. OPTIONS -------
@@ -23,7 +23,7 @@ OPTIONS Include a diffstat output in the patch file. Useful for cases where patches will be submitted with other tools. +-If the command line option is omitted, the corresponding git-config+If the command line option is omitted, the corresponding git-config(1) option "guilt.diffstat" will be queried. So this would enable diffstat output by default:
@@ -11,7 +11,7 @@ include::usage-guilt-rm.txt[] DESCRIPTION ------------Removes the files specified from git using git-rm+Removes the files specified from git using git-rm(1). OPTIONS -------
From: Jeff Sipek <hidden> Date: 2016-06-15 23:03:40
On Fri, Jan 23, 2015 at 02:24:55PM +0100, Per Cederqvist wrote:
The old rule worked, most of the time, but had several issues:
- It depended on the corresponding guilt-*.txt file, but the usage.sh
script actually reads ../guilt-foo.
- Actually, each usage-%.txt depended on all guilt-*.txt files, so
make had to do more work than necessary if a single file was
altered.
- The construct broke parallel make, which would spawn several
usage.sh at once. This leads to unnecessary work, and could
potentially result in broken usage files if the "echo some_string >
some_file" construct used by usage.sh isn't atomic.
Fixed by letting the usage.sh script update a single file, and writing
a proper implicit make rule. This makes parallel make work a lot
better.
Nice!
There is a small downside, though, as usage.sh will now be run once
for each command (if everything is regenerated). I think it is worth
to pay that price to get the correctness. This command is still very
fast compared to the docbook processing.
Given how much simple usage.sh got, I'm thinking it might be worth it to
just remove it, and just shove the rule into the makefile itself.
Ok, I tried to write it. I came up with the following. (Note: I have *not*
tested it.) It's not *that* ugly.
usage-guilt-%.txt: ../guilt-% usage.sh
echo "'$(basename $<)' `sed -n -e '/^USAGE=/{s/USAGE="//; s/"$//; p; q}' $<`" > $@
What do you think? Too opaque? Your change looks good.
Jeff.
--
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man.
- George Bernard Shaw
From: Jeff Sipek <hidden> Date: 2016-06-15 23:03:40
Signed-off-by: Josef 'Jeff' Sipek <redacted>
On Fri, Jan 23, 2015 at 02:24:56PM +0100, Per Cederqvist wrote:
quoted hunk
Specify an explicit dependency, to stop make from trying to generate
guilt.xml if cmds.txt could not be created. The asciidoc will fail
and produce an error message that might hide the original error
message.
The added dependency causes make to not remove the guilt.xml file.
Add *.xml to .gitignore.
Signed-off-by: Per Cederqvist <redacted>
---
Documentation/.gitignore | 3 +++
Documentation/Makefile | 2 ++
2 files changed, 5 insertions(+)
From: Jeff Sipek <hidden> Date: 2016-06-15 23:03:40
On Fri, Jan 23, 2015 at 02:24:57PM +0100, Per Cederqvist wrote:
Note: there is one place where I replace guilt-repair with "guilt
repair" instead of "+guilt repair+". At least the version of docbook
I'm using mishandles the "+" signs in that particular spot (even
though it works properly for "+guilt select+" in another file. I know
too little docbook to be able to find the cause.
Yeah, a bit of a mystery to me too. Regardless,
Signed-off-by: Josef 'Jeff' Sipek <redacted>
@@ -18,7 +18,7 @@ OPTIONS ------- -z:: Output a interdiff against the top-most applied patch. This should- produce the same diff as "+guilt-new -f foo+".+ produce the same diff as "+guilt new -f foo+". <path>...:: Restrict diff output to a given set of files.
@@ -18,11 +18,11 @@ EXAMPLES Open the guilt-status man page - $ guilt-help status+ $ guilt help status Open the guilt man page - $ guilt-help+ $ guilt help Author ------
@@ -42,16 +42,16 @@ EXAMPLES Create a new patch called 'foobar':- $ guilt-new foobar+ $ guilt new foobar Create a patch called 'foo' and supply a patch description interactively:- $ guilt-new -e foo+ $ guilt new -e foo Create a patch called 'bar' with a provided patch description and sign off on the patch:- $ guilt-new -s -m patch-fu bar+ $ guilt new -s -m patch-fu bar Author ------
@@ -22,7 +22,7 @@ Perform various repository repairs. You must specify one mode of repair: WARNING: Running this command may result in commits and working directory changes being lost. You may want to create a new reference (e.g., branch, or reflog) to the original HEAD before using- guilt-repair.+ "guilt repair". --status:: Upgrade the status file from old format to new.
@@ -19,10 +19,10 @@ the following way: * An unguarded patch is always applied. * A patch with a positive guard is applied *only* if the guard is-selected with guilt-select.+selected with "+guilt select+". * A patch with a negative guard is applied *unless* the guard is-selected with guilt-select.+selected with "+guilt select+". OPTIONS -------
--
2.1.0
--
mainframe, n.:
An obsolete device still used by thousands of obsolete companies serving
billions of obsolete customers and making huge obsolete profits for their
obsolete shareholders. And this year's run twice as fast as last year's.
From: Jeff Sipek <hidden> Date: 2016-06-15 23:03:40
Ah, I see you changed usage.sh here. I guess that kinda invalidates my
comment for patch 1/5.
On Fri, Jan 23, 2015 at 02:24:58PM +0100, Per Cederqvist wrote:
From: Jeff Sipek <hidden> Date: 2016-06-15 23:03:40
Signed-off-by: Josef 'Jeff' Sipek <redacted>
On Fri, Jan 23, 2015 at 02:24:59PM +0100, Per Cederqvist wrote:
quoted hunk
Make them into reference to the man pages instead.
Signed-off-by: Per Cederqvist <redacted>
---
Documentation/guilt-add.txt | 2 +-
Documentation/guilt-refresh.txt | 2 +-
Documentation/guilt-rm.txt | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
@@ -11,7 +11,7 @@ include::usage-guilt-add.txt[] DESCRIPTION ------------Adds the files specified to git using git-add making it available to guilt.+Adds the files specified to git using git-add(1) making it available to guilt. OPTIONS -------
@@ -23,7 +23,7 @@ OPTIONS Include a diffstat output in the patch file. Useful for cases where patches will be submitted with other tools. +-If the command line option is omitted, the corresponding git-config+If the command line option is omitted, the corresponding git-config(1) option "guilt.diffstat" will be queried. So this would enable diffstat output by default:
@@ -11,7 +11,7 @@ include::usage-guilt-rm.txt[] DESCRIPTION ------------Removes the files specified from git using git-rm+Removes the files specified from git using git-rm(1). OPTIONS -------
--
2.1.0
--
The obvious mathematical breakthrough would be development of an easy way to
factor large prime numbers.
- Bill Gates, The Road Ahead, pg. 265
From: Per Cederqvist <hidden> Date: 2016-06-15 23:03:40
On Fri, Jan 23, 2015 at 3:21 PM, Jeff Sipek [off-list ref] wrote:
On Fri, Jan 23, 2015 at 02:24:55PM +0100, Per Cederqvist wrote:
quoted
The old rule worked, most of the time, but had several issues:
- It depended on the corresponding guilt-*.txt file, but the usage.sh
script actually reads ../guilt-foo.
- Actually, each usage-%.txt depended on all guilt-*.txt files, so
make had to do more work than necessary if a single file was
altered.
- The construct broke parallel make, which would spawn several
usage.sh at once. This leads to unnecessary work, and could
potentially result in broken usage files if the "echo some_string >
some_file" construct used by usage.sh isn't atomic.
Fixed by letting the usage.sh script update a single file, and writing
a proper implicit make rule. This makes parallel make work a lot
better.
Nice!
quoted
There is a small downside, though, as usage.sh will now be run once
for each command (if everything is regenerated). I think it is worth
to pay that price to get the correctness. This command is still very
fast compared to the docbook processing.
Given how much simple usage.sh got, I'm thinking it might be worth it to
just remove it, and just shove the rule into the makefile itself.
Ok, I tried to write it. I came up with the following. (Note: I have *not*
tested it.) It's not *that* ugly.
usage-guilt-%.txt: ../guilt-% usage.sh
echo "'$(basename $<)' `sed -n -e '/^USAGE=/{s/USAGE="//; s/"$//; p; q}' $<`" > $@
What do you think? Too opaque? Your change looks good.
Too opaque, and not tested enough. It doesn't work, since make will
handle all $. You need to write $$ instead of $ in at least one of the
places. I would stick with usage.sh, as getting the quoting right when
you have make, shell, subshells, and sed all at the same time is just
too painful.
But it is of course up to you. You are the maintainer. :-)
/ceder
--
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man.
- George Bernard Shaw
From: Jeff Sipek <hidden> Date: 2016-06-15 23:03:40
On Fri, Jan 23, 2015 at 03:33:03PM +0100, Per Cederqvist wrote:
On Fri, Jan 23, 2015 at 3:21 PM, Jeff Sipek [off-list ref] wrote:
quoted
On Fri, Jan 23, 2015 at 02:24:55PM +0100, Per Cederqvist wrote:
quoted
The old rule worked, most of the time, but had several issues:
- It depended on the corresponding guilt-*.txt file, but the usage.sh
script actually reads ../guilt-foo.
- Actually, each usage-%.txt depended on all guilt-*.txt files, so
make had to do more work than necessary if a single file was
altered.
- The construct broke parallel make, which would spawn several
usage.sh at once. This leads to unnecessary work, and could
potentially result in broken usage files if the "echo some_string >
some_file" construct used by usage.sh isn't atomic.
Fixed by letting the usage.sh script update a single file, and writing
a proper implicit make rule. This makes parallel make work a lot
better.
Nice!
quoted
There is a small downside, though, as usage.sh will now be run once
for each command (if everything is regenerated). I think it is worth
to pay that price to get the correctness. This command is still very
fast compared to the docbook processing.
Given how much simple usage.sh got, I'm thinking it might be worth it to
just remove it, and just shove the rule into the makefile itself.
Ok, I tried to write it. I came up with the following. (Note: I have *not*
tested it.) It's not *that* ugly.
usage-guilt-%.txt: ../guilt-% usage.sh
echo "'$(basename $<)' `sed -n -e '/^USAGE=/{s/USAGE="//; s/"$//; p; q}' $<`" > $@
What do you think? Too opaque? Your change looks good.
Too opaque,
Between that and the other patch in the series that modifies usage.sh, your
patch is good as is.
Signed-off-by: Josef 'Jeff' Sipek <redacted>
and not tested enough. It doesn't work, since make will
handle all $. You need to write $$ instead of $ in at least one of the
places. I would stick with usage.sh, as getting the quoting right when
you have make, shell, subshells, and sed all at the same time is just
too painful.
And this is comming from the person that rewrote cmd/shouldfail in a way
that the average shell user will go "whaaa??" :P (To be fair, I don't know
of a simpler way to make cmd/shouldfail.)
But it is of course up to you. You are the maintainer. :-)
Heh.
Jeff.
--
Real Programmers consider "what you see is what you get" to be just as bad a
concept in Text Editors as it is in women. No, the Real Programmer wants a
"you asked for it, you got it" text editor -- complicated, cryptic,
powerful, unforgiving, dangerous.