summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* quilt.el: Refactor config reading functionsOndřej Lysoněk2020-06-091-18/+11
| | | | | | | | | quilt-patches-directory is a copy-paste of quilt-pc-directory. Refactor the common code into a separate function. Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* quilt.el: Fix documentation of quilt-pc-directoryOndřej Lysoněk2020-06-091-1/+1
| | | | | | | | | This is a copy-and-paste error from function quilt-patches-directory in commit f7b69c58d21903baacb290840e7bed9282e357e2. Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com> Fixes: f7b69c58d219 ("lib/emacs: read QUILT_PC from config file") Signed-off-by: Jean Delvare <jdelvare@suse.de>
* tests: De-duplicate no-series testsJean Delvare2020-06-093-36/+49
| | | | | | | | | | Test all commands, including annotate and patches, in the no-series test case, and check the error code returned too. Remove no-series checks from all other test cases, as testing the same code path twice is a waste of time. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Consistently complain early if no series file is foundJean Delvare2020-06-097-18/+32
| | | | | | | | | | | | | | | | | | | If no series file is found, let all quilt commands which need it complain about it immediately. This aligns the behavior of the "pop", "series" and "snapshot" commands with how all other commands behave. The "import", "new", "setup" and "upgrade" commands are not affected by this change, as they are legitimately called without a series file. A side effect of this change is that the "pop", "push", "top" and "next" commands will now return with error code 1 instead of 2 when called outside of a quilt-managed tree. Inspired by Martin Quinson. This fixes Debian bug #369908: https://bugs.debian.org/369908 Signed-off-by: Jean Delvare <jdelvare@suse.de>
* doc/quilt.pdf: Document the build processJean Delvare2020-06-021-0/+9
| | | | | | | | | Document the list of latex packages that must be installed in order to build the PDF documentation. Suggested by Ondřej Lysoněk. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Document that quilt loads /etc/quilt.quiltrcOndřej Lysoněk2020-05-182-4/+6
| | | | | | | | quilt loads /etc/quilt.quiltrc if ~/.quiltrc doesn't exist. Document it. Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* doc/quilt.pdf: Fix cross-referencesJean Delvare2020-05-181-2/+8
| | | | | | | | | | | | In order to have cross-references in the PDF documentation, we need a two-pass process, where the first pass prepares the references while the second pass generates the actual PDF. Do that explicitly from now on, so that the cross-references are OK even when building the documentation for the first time. Signed-off-by: Jean Delvare <jdelvare@suse.de> Tested-by: Ondřej Lysoněk <olysonek@redhat.com>
* Regenerate pdf documentation (English version)Jean Delvare2020-05-141-0/+0
|
* doc/main-rus.tex: Fix double dashesJean Delvare2020-05-141-3/+3
| | | | | | | | | | In Latex, a double dash produces an "en dash". If a literal double dash is needed, '-{}-' can be used. Based on a similar fix to the English version of the document by Ondřej Lysoněk. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* doc/main.tex: Fix double dashesOndřej Lysoněk2020-05-141-5/+5
| | | | | | | | In Latex, a double dash produces an "en dash". If a literal double dash is needed, '-{}-' can be used. Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Man page: Fix a typoOndřej Lysoněk2020-05-141-1/+1
| | | | | | | "Serie" is not a word. Change it to "series". Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* series: Minor optimizationsJean Delvare2020-05-131-4/+7
| | | | | | | | | | | * If there is no top patch, then there can't be patches before the top patch. * Use applied_before as it is faster than patches_before. The performance gain was measured to be between 1% and 3% on half-applied large patch series. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Remove duplicate testJean Delvare2020-03-241-1/+1
|
* test: Test case for when no series file existsJean Delvare2020-03-241-0/+53
| | | | | | A pretty simple test case to avoid regressions in corner cases. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* setup: Default to fast modeJean Delvare2020-03-231-7/+7
| | | | | | | | | | | | The fast mode of processing spec files has been implemented over 4 years ago. Not only it is faster, but it also handles corner cases in spec files better in general. Make it the new default. Option --slow is still available to revert to the old implementation if needed. However in the long run I hope that we can get rid of it completely. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Call pager with original LANG environment variableUrs Thuermann2020-03-231-1/+1
| | | | | | | | | | | | | | | | Author: Urs Thuermann <urs@isnogud.escape.de> Date: Tue Feb 11 06:43:05 2020 +0100 Call pager with original LANG environment variable The first few lines in quilt/scripts/patchfns set the LANG environment variable to POSIX saving the previous value in ORIGINAL_LANG. This is used to restore the original locale when calling a user-specified diff command but not for the pager. Without this patch the pager is called with LANG=POSIX causing non-ASCII characters to be printed wrong unless LC_CTYPE is also set in the environment. This patch restores LANG for the pager to its original value.
* Simplify calling user-specified diff with original LANG environmentUrs Thuermann2020-03-231-3/+1
| | | | | | | Author: Urs Thuermann <urs@isnogud.escape.de> Date: Tue Feb 11 06:42:02 2020 +0100 Simplify calling user-specified diff with original LANG environment
* Man page: Document the series file format furtherJean Delvare2019-09-171-2/+7
| | | | | | | | | | Explain how patch options like the strip level can be recoded in the series file. Suggested by Cristian Rigamonti in bug #56886: https://savannah.nongnu.org/bugs/index.php?56886 Signed-off-by: Jean Delvare <jdelvare@suse.de>
* setup: Don't obey the settings of any englobing .pcMartin Quison2019-04-151-0/+5
| | | | | | | | | | | | | | | This is mainly intended to get the setup.test working even if the debian package contains a .pc directory. Without this patch, the debian packaging stuff will get the testsuite using debian/patches instead of patches (because it's the way it goes in our .pc). The test breaks with that setting. The patch changes the setup command to not take the settings of any .pc directory found, and reset QUILT_PC QUILT_PATCHES and QUILT_SERIES to their default values. This fixes Debian bug #573689: http://bugs.debian.org/573689
* Actually make stat configurableMihai Moldovan2019-04-151-0/+1
| | | | | | | | | It was handled in autoconf.ac, but not Makefile.in. [JD: Simplified and updated description accordingly.] Signed-off-by: Mihai Moldovan <ionic@ionic.de> Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Set version to 0.66.v0.66Jean Delvare2019-03-283-10/+44
|
* Resync translation filesJean Delvare2019-03-145-235/+223
| | | | Also update one string for the setup command (one sentence removed).
* Document QUILT_PC as user-settableJean Delvare2019-03-141-0/+5
| | | | | | | If some users are already changing the value of QUILT_PC and it works, we may as well document it. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* test: Don't hard-code .pcJean Delvare2019-03-149-34/+35
| | | | | | | | | | | Use a variable (QUILT_PC) instead of hard-coding ".pc" as the name of the directory where quilt stores the state of the working tree throughout the test suite. We still set that variable to ".pc" to make it easier to investigate failed test cases, but at least this allows us to promptly test that QUILT_PC can actually be set to any other value and quilt still works. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* test: Prevent test cases from escapingJean Delvare2019-03-141-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | By default, we continue running tests even after a failure, to make diagnostics easier. If a chdir command fails, there is a chance that subsequent chdir commands could accidentally move outside the temporary directory where the test is being run, and then we start messing up with the host's files. In general, the consequence is to leave garbage files and directories behind. However, some of the files can have side effects (for example a "series" file or a "patches" directory could confuse quilt later), and in theory this could also lead to the corruption or deletion of existing files, which is pretty bad. So add a safety check after every chdir command that we are still inside the test case's working directory. If not, stop the test immediately. Note: this is not about being 100% safe and bullet-proof. The only way to achieve this would be to use chroot or even containers. We still need to trust the test cases to not do anything nasty on purpose. This is only protecting against good test cases going wild on failure. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* setup: Align --fast on --slow for series filesJean Delvare2019-03-141-3/+4
| | | | | | | | | Remove the requirement to unpack the source tree manually when using the fast mode of quilt setup and the parameter is a series file. Instead, let --fast behave exactly like --slow, so that both modes can be used interchangeably. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* lib/emacs: read QUILT_PC from config fileDmitry Monakhov2019-03-141-5/+21
| | | | | Read QUILT_PC from config instead of using hardcoded one. Do it as we do with QUILT_PATCHES var.
* New helper function ensure_trailing_newlineJean Delvare2018-11-052-10/+14
| | | | | | | As we now have the need to check for the presence of a trailing newline twice, move the code to a function to avoid redundancy. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* new: Fix series file corruption when trailing newline is missingJean Delvare2018-11-052-0/+29
| | | | | | | | | | | | | When editing the series file with certain editors, it is possible that no trailing newline character is present on the last line. In such case, adding a new patch at the end of the series would corrupt the series file. Prevent that by ensuring that a newline character is always present. This fixes the second issue reported in bug #54295: https://savannah.nongnu.org/bugs/?54295 Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Add support for lzip archivesJean Delvare2018-10-093-3/+16
| | | | | | | | | Add support for lzip-compressed archives (*.tar.lz) and patches. This closes bug #54570: https://savannah.nongnu.org/bugs/?54570 Signed-off-by: Jean Delvare <jdelvare@suse.de>
* compat/getopt: Allow non-digit parameter embedded in short optionJean Delvare2018-10-091-9/+4
| | | | | | | | | | | | | | | | | | | The compatibility getopt script allows only digit parameters to be embedded in short options. Util-linux's getopt implementation does not have such a restriction and allows any parameter to be embedded in short options. As a consequence, using the compatibility getopt script would choke for example on "-pab", which is a legal option of the "quilt refresh" command. Remove the limitation on digits so that the compatibility getopt script allows what util-linux allows. This fixes the second half of bug #54772: https://savannah.nongnu.org/bugs/index.php?54772 As a side note, this feature of the compatibility script was broken anyway, as it would output the digits in reverse order. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* compat/getopt: Handle a second separatorJean Delvare2018-10-091-3/+10
| | | | | | | | | | | | | | | | | | getopt can be passed 2 '--' separators. The first one tells that getopt options are over and target program options start. The second one tells that the target program's options are over and following arguments should be treated as non-options even if they look like options. This second separator was not handled, causing the compatibility getopt script to treat the following arguments as options, eventually failing one way or another. Properly detect and handle the second separator. This fixes the first half of bug #54772: https://savannah.nongnu.org/bugs/index.php?54772 Signed-off-by: Jean Delvare <jdelvare@suse.de>
* quilt mail: Complain when a patch doesn't existAndreas Gruenbacher2018-07-261-2/+10
| | | | | When a patch doesn't exist, complain about that instead of complaining that no subject header can be extracted.
* mail: Remove Content-Disposition headersAndreas Gruenbacher2018-07-032-6/+3
| | | | | | | | | | | | The Content-Disposition headers quilt has been adding since 2015 are causing problems with Thunderbird and Gmail, which display patches as attachments instead of text if this header is present and includes a filename. This breaks email-based patch reviewing and isn't likely to get fixed on the email client side, so stop adding those headers. Recipients of patches via email already need a mechanism to construct filenames for messages coming from anything but quilt, so this change is unlikely to cause major problems for existing users.