| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Just like commit 4dfe7f9, (test: Fix a race condition, 2023-01-20),
this fix a test race when stdout and stderr in any order.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The test suite does not differentiate between stdout and stderr. When
messages are printed to both, the order in which they will reach us
is apparently not guaranteed. Ideally this would be deterministic, but
until then, explicitly test stdout and stderr separately in the test
case itself. Otherwise the test suite fails randomly, which is a pain
for distribution package maintainers.
This fixes bug #63651 reported by Ross Burton:
https://savannah.nongnu.org/bugs/index.php?63651
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ln defaults can be slightly different depending on the platform.
While on Linux 'ln' defaults to 'ln -P', on Solaris (and possibly
other platforms) it defaults to 'ln -L'.
This difference is best resolved by explicitly using the '-P' flag.
This fixes bug #63451:
https://savannah.nongnu.org/bugs/index.php?63451
Credits to the anonymous reporter.
[JD: Propagate the fix to all occurrences of 'ln'.]
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Quilt setup can't be used on arbitrary spec files. Due to the fact
that quilt only deals with patches, every other modification to the
working tree has to happen first, and the patches must be applied
last.
This is a design limitation and not a bug, but document it so that
the users are aware of it and can adjust the %prep section of their
spec file if needed.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
| |
Now that quote_bre() has been split into quote_re_grep() and
quote_re_sed(), rename quote_re() to quote_awk_re() for consistency.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GNU grep version 3.8 became more strict about needless quoting in
patterns. We have one occurrence of that in quilt, where "/"
characters are being quoted by default. There are cases where they
indeed need to be quoted (typically when used in a sed s/// command)
but most of the time they do not, and this results in the following
warning:
grep: warning: stray \ before /
So rename quote_bre() to quote_sed_re(), and introduce
quote_grep_re() which does not quote "/".
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are ANSI escape sequences as defined by ECMA-48; recast the entire
discussion in light of that fact.
Condense the many tagged paragraphs with a templated discussion of
defaults into a table.
Sort the QUILT_COLORS format names into alphabetical order.
Add a hint to the formatter (man) to call the tbl preprocessor to
render the table.
Expand the example to be more demonstrative.
Add pointers to the ECMA-48 standard document and the console_codes
section 4 man page (from Michael Kerrisk's man-pages project, widely
available) to the See Also section.
[JD: Some fixes, added patch_offs to the table, added a note that the
patches command shares colors with the series command]
|
|
|
|
|
|
|
| |
Use the groff extension .schar to provide an alternative output sequence
for output devices missing the Unicode box-drawing characters.
[JD: removed a .fi request which I believed was restored by accident]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Give working tree example a name that looks more like an actual
software project's directory name.
* Fix pronoun/antecedent agreement (multiple occurrences).
* Tighten language (e.g., unnecessary use of "some").
* Reorganize discussion of how quilt finds its rc file to proceed
strictly in the order attempted.
* Leave breadcrumbs about EDITOR and LESS, which used to be part of this
discussion; add cross-reference to where the material is now.
* Make explicit the fact that quilt command names need to be manually
up-cased for use in QUILT_COMMAND_ARGS.
* Set configuration variable names in italics.
* Transform a popular Denglish construction into idiomatic English.
https://english.stackexchange.com/questions/85069/is-the-construction-it-allows-to-proper-english
* Clarify that "if set to anything" variables function as Booleans.
* Recast "a shortcut to" as "shorthand for", which is more idiomatic
English in context.
* Add cross-reference to diffstat man page on first occurrence.
* Fix typo: each commands -> each command.
[JD: reverted 2 changes I did not like; fixes one more typo]
|
|
|
|
|
|
| |
* Remove dependent clause used as a topic transition when this material
was not in its own section.
* Provide examples of when $EDITOR is used.
|
|
|
|
| |
* Eliminate otherwise unused term "sub-command".
|
|
|
|
|
|
|
|
| |
* Don't introduce a metavariable without explaining it or using it in
context.
* Drop the reference to the PDF documentation which doesn't belong
there.
* Clarify options --trace and --version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't end a sentence with an abbreviation period if possible (also,
man-pages(7) discourages the use of Latin abbreviations altogether).
* Users of quilt are not merely outputting patches; they are consuming
them and altering them as well.
* Clarify the (shall we say) truncability of command names.
* Use directional double-quotes instead of boldface to set off literals.
Some typographers claim that frequent font face changes tire the eye.
* Offer an example of a patch name.
* Introduce the "quilt series" command in the same paragraph the series
file itself is first described, to eliminate forward reference.
* Introduce quilt command names only once each.
* Add a paragraph summarizing the work cycle for starting and refining a
new patch.
[JD: Some editions and clean-ups]
|
| |
|
|
|
|
| |
Per style recommendation in man-pages(7).
|
|
|
|
| |
Everything in manual sections 1 or 8 is a tool, in some sense.
|
| |
|
| |
|
|
|
|
| |
Also add a clarifying introductory sentence.
|
|
|
|
|
|
|
|
| |
Variable content in an italic context is set in roman for contrast, but
still in italics in running roman prose.
[JD: Revert some of the changes which did not belong there, and
restored the original indentation level as I think it looked better]
|
|
|
|
|
|
|
|
|
|
|
| |
Embolden internal subsection reference, and refer to its parent section.
Point explicitly to the GNU Diffutils manual regarding unified diff
format, and add cross-reference in the See Also section.
Add cross-reference to diffstat man page.
Sort man page cross-reference list in alphabetical order.
|
|
|
|
| |
...including names of software projects (such as quilt itself).
|
|
|
|
|
|
|
|
| |
The Latin "exempli gratia" is abbreviated "e.g.".
Also, use a zero-width-space escape to defeat roff's end-of-sentence
detection. See section 4.1 of CSTR #54, "Troff User's Manual", Ossanna
& Kernighan <https://www.troff.org/54.pdf>.
|
|
|
|
| |
Also add quotation marks where they make semantic sense.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Document --quiltrc, --trace, and --version options explicitly.
Separate the informational operation modes for reporting help and
version information.
Mark up synopsis canonically (literals in bold, variable content in
italics, and roman for "synopsis language" (option brackets, etc.)).
Use groff_man(7)'s SY and YS macros for more attractive presentation.
[JD: Restore [options] and strip duplicate line]
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a "literal" ASCII 45 hyphen-minus character is desired, it has to
be escaped; this is a requirement going all the way back to Bell Labs
Troff, but is frequently overlooked. Getting it right enables
accurate cut-and-paste of code examples, filenames, URLs, and so forth
from roff documents prepared for UTF-8 terminal and PDF output, possibly
among others.
See section 2.1 of CSTR #54, "Troff User's Manual", Ossanna & Kernighan
<https://www.troff.org/54.pdf>.
|
|
|
|
|
|
| |
This eliminates the use of low-level requests in this man page (the
groffism ".fam" to change the font family and the switching off and on
of fill mode with ".nf" and ".fi".)
|
|
|
|
|
| |
Apart from being higher-level and easier to read, the macros get you
proper italic corrections when abutting italic with non-italic text.
|
|
|
|
|
|
|
|
| |
Use only section names endorsed by man-pages(7), and put them in the
recommended order.
Use subsection macro (SS) where helpful.
[JD: Preserve the EXAMPLE section as EXAMPLES]
|
|
|
|
|
|
|
| |
Also reflow input lines to 72 columns.
Both are recommended by *roff experts:
https://www.gnu.org/software/groff/manual/html_node/Input-Conventions.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Blank lines are bad roff style. Per CSTR #54, blank lines are the
equivalent of ".sp 1", but in GNU roff this can be overridden with a
blank line macro (".blm"), and all macro packages for text formatting
(mm, ms, me, man, etc.) have macros for paragraph separation, and the
inter-paragraph spacing is usually different from ".sp 1" for typesetter
output (this can be seen in PostScript and PDF output). Explicit
spacing is also unnecessary immediately adjacent to section headings.
See section 5.3 of CSTR #54, "Troff User's Manual", Ossanna & Kernighan
<https://www.troff.org/54.pdf>.
[JD: Added an empty request (.) before each section to preserve the
readability of the input.]
|
|
|
|
|
|
|
|
|
|
| |
This causes warnings from roff when the warning level is turned up
really high, as some roff/man page hackers do.
<standard input>:891: warning: number register `an-saved-margin2' not defined
<standard input>:891: warning: number register `an-saved-prevailing-indent2' not defined
Stop supplying the extraneous argument.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"+" needs to be quoted to be considered as a literal "+" by BSD awk.
Without this fix, patch_header() fails to find the beginning of the
changes and treats the whole patch as a header, subsequently causing
"quilt refresh" to append the refreshed patch after the original one
instead of replacing it.
Bug reported and fix suggested by Dominic Evans.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes: 1d94980dbdd4 ("Tighten the patch format parsing")
|
| |
|
| |
|
|
|
|
|
|
|
| |
Emacs uses *~ as a backup files. Ignore them.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
| |
Update my email address to the new one.
Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One side effect of commit ca85fbd82022 ("Move the code which adds the
default parameters from quiltrc") is that we now source the quiltrc
configuration file twice. While parsing this file shouldn't take
overly long, this still feels conceptually wrong.
This can be avoided by reusing the same shell for the quilt command
as we used for the quilt "launcher" itself, instead of starting a
new instance of bash for it.
As a nice side bonus, this makes quilt about 2% faster (measured on
the test suite).
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I broke "import -P" with my previous commit. Using this option now
fails with the following error message:
/usr/share/quilt/import: line 168: [: missing `]'
This is caused by a missing space before the closing square bracket,
which prevents bash from parsing the line.
Fix that, and add a test case to cover this code path, so that no
such bug can creep in in the future.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes: c539338458e4 ("Delay sourcing patchfns until options have been processed")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 8b39a960afcf ("Consistently complain early if no series file
is found") unexpectedly broke commands like "quilt add -h", because
the check for a series file happens before the command line options
are processed. This, in turn, breaks the generation of the quilt
manual page, which relies on the output of each command when called
with option -h.
Reorder the code so that options are always processed first, and then
patchfns is sourced. That way, option "-h" will work again even if
not in a quilt working tree.
Fixes: 8b39a960afcf ("Consistently complain early if no series file is found")
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
|
| |
Move the code which reads the default parameters for each command
from quiltrc, from patchfns to the main quilt script. This is needed
because the parsing of command line options needs to happen before we
source patchfns, which is obviously not possible if some of the
options are being set by patchfns itself.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Require a "---" line to be followed by a "+++" line to recognize it as
the start of a unified diff. Likewise, require a "***" line to be
followed by a "---" line to recognize it as the start of a context diff.
Without that, a line like "*** NOTE ***" in the patch header will cause
the refresh and header commands to truncate the header.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As "patch" originally did not handle symbolic links, backup-files
didn't have to care about them either. But now that git has
introduced an extended syntax which allows manipulating symbolic
links in patch files, "quilt push" may create or delete symbolic
links, which means that backup-files must support such operations
too.
Also extend the backup-files test case to cover these operations.
This fixes bug #59479:
https://savannah.nongnu.org/bugs/index.php?59479
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When patch files are passed through stdin, we get the actual patch
file name from procfs. It turns out that procfs resolves symbolic
links, and that breaks our later attempt to strip the prefix from
the path to extract a relative path to the patch file.
This is solved by also resolving symbolic links in the prefix
before stripping it.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the parameter passed to gen_tempfile is based on the working
directory, we need to quote it because it could contain spaces or
other special characters. Also quote the string returned by this
function for the same reason.
Affected commands:
* quilt diff -z
* quilt fold
* quilt refresh -z
* quilt revert
Also test these code paths in the test suite to avoid regressions.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
| |
In practice there is no situation where patchfns would be sourced
more than once, so remove the check for this situation, that was
present in every quilt command file.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes a bug in quilt-editable: if QUILT_PATCHES_PREFIX is
set, quilt-editable will always return nil, even if the file being
edited is part of the topmost patch.
If QUILT_PATCHES_PREFIX is set, then 'quilt top' prints the patch name
as a relative path to the patch. Since in quilt-editable we're running
'quilt top' from the top level directory, the printed patch path is in
the form $QUILT_PATCHES/patch-name.
Later on, we're looking for a cached version of the file that we're
editing in .pc/. The patch directories are stored directly under .pc/,
rather than .pc/$QUILT_PATCHES/, so we must remove the $QUILT_PATCHES/
prefix from the patch path.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
| |
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When creating the .pc/ directory, quilt writes the value of
QUILT_PATCHES to .pc/.quilt_patches. On all subsequent invocations,
quilt uses the contents of .pc/.quilt_patches as the value of
QUILT_PATCHES, rather than the value set in quiltrc.
All the callers in quilt.el really expect the per-project setting from
.pc/.quilt_patches, so return the value set therein if present.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
| |
quilt loads /etc/quilt.quiltrc if ~/.quiltrc doesn't exist. Do the
same in quilt.el.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|