summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* test: Fix a race condition in merge.testĐoàn Trần Công Danh2023-02-281-2/+4
| | | | | | | | 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>
* test: Fix a race conditionJean Delvare2023-01-201-1/+2
| | | | | | | | | | | | | | 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>
* backup-files: Fix hard link creation on SolarisJean Delvare2022-12-062-4/+4
| | | | | | | | | | | | | | | | 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>
* setup: Document the limitation of spec file supportJean Delvare2022-10-061-1/+7
| | | | | | | | | | | | | 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>
* patchfns: Rename quote_re() to quote_awk_re()Jean Delvare2022-09-091-9/+9
| | | | | | | 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>
* Avoid warnings with grep 3.8Jean Delvare2022-09-094-11/+17
| | | | | | | | | | | | | | | | 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>
* Man page: rewrite discussion of QUILT_COLORS configuration variableG. Branden Robinson2022-08-031-85/+83
| | | | | | | | | | | | | | | | | | | | | | 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]
* Man page: make file tree diagram portableG. Branden Robinson2022-08-031-14/+20
| | | | | | | 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]
* Man page: wordsmith Files sectionG. Branden Robinson2022-08-031-39/+60
| | | | | | | | | | | | | | | | | | | | | | | * 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]
* Man page: wordsmith Environment sectionG. Branden Robinson2022-08-031-8/+6
| | | | | | * Remove dependent clause used as a topic transition when this material was not in its own section. * Provide examples of when $EDITOR is used.
* Man page: wordsmith Exit Status sectionG. Branden Robinson2022-08-031-6/+8
| | | | * Eliminate otherwise unused term "sub-command".
* Man page: wordsmith Options sectionG. Branden Robinson2022-08-031-5/+6
| | | | | | | | * 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.
* Man page: wordsmith Description sectionG. Branden Robinson2022-08-031-48/+69
| | | | | | | | | | | | | | | | | | * 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]
* Man page: sort options in alphabetical order to ease human scanningG. Branden Robinson2022-08-031-4/+4
|
* Man page: change the form of the word "subdirectory"G. Branden Robinson2022-08-031-5/+5
| | | | Per style recommendation in man-pages(7).
* Man page: tighten summaryG. Branden Robinson2022-08-031-1/+1
| | | | Everything in manual sections 1 or 8 is a tool, in some sense.
* Man page: render Andreas Gruenbacher's name with a u-umlautG. Branden Robinson2022-08-031-1/+2
|
* Man page: capitalize "PDF" when not part of a filenameG. Branden Robinson2022-08-031-4/+4
|
* Man page: document -h flag in the Options sectionG. Branden Robinson2022-08-031-0/+10
| | | | Also add a clarifying introductory sentence.
* Man page: set file names and environment variable names in italicsG. Branden Robinson2022-08-031-42/+87
| | | | | | | | 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]
* Man page: update internal and external cross-referencesG. Branden Robinson2022-08-031-9/+30
| | | | | | | | | | | 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.
* Man page: italicize work titlesG. Branden Robinson2022-08-031-52/+107
| | | | ...including names of software projects (such as quilt itself).
* Man page: use "e.g." correctlyG. Branden Robinson2022-08-031-2/+2
| | | | | | | | 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>.
* Man page: use character escapes for directional quotes and spacing tildeG. Branden Robinson2022-08-031-49/+56
| | | | Also add quotation marks where they make semantic sense.
* Man page: make synopsis comprehensiveG. Branden Robinson2022-08-031-2/+12
| | | | | | | | | | | | | | 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]
* Man page: escape ASCII hyphen-minus characters used as suchG. Branden Robinson2022-08-031-31/+32
| | | | | | | | | | | | 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>.
* Man page: use groff_man(7)s EX and EE macros for examplesG. Branden Robinson2022-08-031-10/+7
| | | | | | 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".)
* Man page: use font macros instead of font escapesG. Branden Robinson2022-08-031-17/+33
| | | | | Apart from being higher-level and easier to read, the macros get you proper italic corrections when abutting italic with non-italic text.
* Man page: reorganize sectionsG. Branden Robinson2022-08-031-18/+21
| | | | | | | | 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]
* Man page: break input lines at all sentence endingsG. Branden Robinson2022-08-031-119/+165
| | | | | | | 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
* Man page: eliminate or replace blank linesG. Branden Robinson2022-08-031-83/+31
| | | | | | | | | | | | | | | | 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.]
* Man page: the man macro RE is given an argument when it does not need oneG. Branden Robinson2022-08-031-1/+1
| | | | | | | | | | 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.
* patchfns: Compatibility fix for BSD awkJean Delvare2022-06-231-2/+2
| | | | | | | | | | | | | | "+" 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")
* Fix the 0.67 release dateJean Delvare2022-02-151-1/+1
|
* Set version to 0.67.v0.67Jean Delvare2022-02-153-10/+26
|
* gitignore: Add Emacs backup file patternYasushi SHOJI2022-02-011-0/+1
| | | | | | | Emacs uses *~ as a backup files. Ignore them. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* po/ja.po: Update my email addressYasushi SHOJI2022-02-011-2/+2
| | | | | | | Update my email address to the new one. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Reuse the shellJean Delvare2021-09-032-7/+7
| | | | | | | | | | | | | | | | 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>
* import: Fix option -PJean Delvare2021-09-032-1/+17
| | | | | | | | | | | | | | | 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")
* Delay sourcing patchfns until options have been processedJean Delvare2021-06-1031-264/+365
| | | | | | | | | | | | | | | | 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 adds the default parameters from quiltrcJean Delvare2021-06-102-7/+13
| | | | | | | | | | 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>
* Tighten the patch format parsingAndreas Gruenbacher2021-05-151-6/+54
| | | | | | | | | | | 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>
* backup-files: Restore symbolic linksJean Delvare2020-12-092-10/+63
| | | | | | | | | | | | | | | | 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>
* inspect-wrapper: procfs resolves linksJean Delvare2020-12-091-1/+9
| | | | | | | | | | | | 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>
* Quote parameter to gen_tempfile as neededJean Delvare2020-10-057-17/+76
| | | | | | | | | | | | | | | | | 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>
* Don't check for double sourcing of patchfnsJean Delvare2020-10-0530-220/+131
| | | | | | | | 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>
* quilt.el: Fix quilt-editable when QUILT_PATCHES_PREFIX is setOndřej Lysoněk2020-06-091-1/+13
| | | | | | | | | | | | | | | | | | | 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>
* quilt.el: Fix a typo in documentationOndřej Lysoněk2020-06-091-1/+1
| | | | | Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* quilt.el: Make quilt-patches-directory return per-project settingOndřej Lysoněk2020-06-091-1/+12
| | | | | | | | | | | | | 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.el: Load /etc/quilt.quiltrc if ~/.quiltrc doesn't existOndřej Lysoněk2020-06-091-1/+5
| | | | | | | | 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>