summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Boost the speed of the series, applied and unapplied commandsJean Delvare2014-03-024-17/+15
| | | | | | | | | | | | | | | | The current implementation of the series, applied and unapplied commands performs rather poorly, especially on large patch sets. To make things worse, bash completion makes use of these commands, so it becomes next to unusable on large patch sets. Instead of looping over each patch, use the power of printf to print everything in one go. Performance gains on a 15k patch series are breathtaking: series: 189.4 s -> 0.6 s series -v: 92.9 s -> 0.6 s applied: 3.5 s -> 0.1 s unapplied: 3.9 s -> 0.1 s
* push: Check for duplicate patch in seriesJean Delvare2014-03-022-0/+61
| | | | | | | | | | In the case of a generated or manually tweaked series file, it can happen that the same patch shows up twice in the series file. Check for this before pushing any patch, otherwise we would corrupt quilt's internal database. This fixes bug #20628: https://savannah.nongnu.org/bugs/?20628
* test: Drop legacy comment in two test casesJean Delvare2014-02-282-4/+0
| | | | These instructions no longer works.
* test: Drop stray slashesJean Delvare2014-02-282-2/+2
| | | | %{P} already has a trailing slash.
* Use consistent brace placementJean Delvare2014-02-289-32/+64
| | | | | Use the same brace placement for all bash functions through the whole tree.
* Complete the documentation of option --colorJean Delvare2014-02-273-3/+3
| | | | | Commands "patches" and "series" lacked option --color in their syntax summary. Command "diff" had it but without its options.
* test/setup: Fix for GNU patch version <= 2.5.9Jean Delvare2014-02-261-3/+5
| | | | | | Recent versions of GNU diff will quote file names which include a space, but GNU patch version 2.5.9 and older do not support that. So strip the quotes to let the test succeed.
* test: Improve the coverage of the patches commandJean Delvare2014-02-242-0/+30
| | | | | | | Add tests for the patches command in two test cases. In particular we want to test that the patches command works OK when patch filenames contain spaces or other unusual characters, and that file names are properly guessed in patches which create or delete files.
* import: Move function find_patch_fileJean Delvare2014-02-212-25/+25
| | | | | Function find_patch_file is only used by command import so move it to that file.
* patchfns: Simplify function find_patch_file furtherJean Delvare2014-02-211-10/+2
| | | | | | | | | | | | | | | | | | find_patch_file is only used by "quilt import". It is called on patch file names passed on the command line. The first part of the function clearly looks for "external" patch files (with absolute or relative paths.) The second part looks for the patch in the series file. There are 3 possibilities: * If the patch is not in series, then the import fails with: Patch foo.patch does not exist * If the patch is in series, applied, then the import fails with: Patch foo.patch is applied * If the patch is in series, not applied, then the import fails with: Patch foo.patch already exists in series. So this part of the function makes no sense and should be deleted.
* patchfns: Simplify function find_patch_fileJean Delvare2014-02-181-1/+1
| | | | We don't need echo, we can call patch_file_name directly.
* patches: Optimize the multiple files caseJean Delvare2014-02-152-13/+23
| | | | | | | | | | I didn't put too many thoughts when adding support for multiple files to the "patches" command. The nested loop approach turns out to be very inefficient for unapplied patches. Get rid of the innermost loop by building a single pattern matching all filenames at once. That way, performance no longer depends on the number of files (as far as unapplied patches are concerned.)
* patches: Optimize processing of unapplied patchesJean Delvare2014-02-151-5/+10
| | | | | | | | | | | | * Don't check for $strip = ab twice, once is enough. * Quote the file names to be suitable in regular expressions only once, instead of doing it again for every patch. This fixes a performance regression introduced in 8ebb056d ("patches: Add support for multiple files"), sorry about that. These two simple changes bring a huge performance boost on unapplied patches, of about 50% in the single file case and growing as you add files.
* bash_completion: Simplify _quilt_comfileJean Delvare2014-02-142-1/+6
| | | | We don't need echo, we can call compgen directly.
* files: Return nothing if there are no filesJean Delvare2014-02-143-1/+7
| | | | | | | "quilt files" returns a blank line if no files are included in the patch. This could easily break constructs such as "quilt files | wc -l". Let "quilt files" return nothing at all if there are no files in the patch.
* test/run: Minor performance optimizationsJean Delvare2014-02-122-7/+7
| | | | | | | | * Don't set $needs_shell before we need it. When handling commands internally, we don't care about $needs_shell. * Use a single regexp to set $use_re. * Clear $good as soon as a test fails, instead of grepping for failures later.
* test/run: Fix the condition for using /bin/shJean Delvare2014-02-122-1/+2
| | | | | * Command lines containing "&" need /bin/sh. * "*" and "?" need not be escaped inside brackets in regular expressions.
* test/run: Declare global variables as suchJean Delvare2014-02-122-6/+7
| | | | | Declare all global variables with qw() and stop passing them as arguments to some functions.
* test/run: Reorder functionsJean Delvare2014-02-122-132/+126
| | | | | Move functions before they are called, so that we no longer need forward declarations.
* test/run: Massive reindentationJean Delvare2014-02-122-155/+153
| | | | | Code indentation in this file is inconsistent, this makes editing it difficult. Use tabulations everywhere.
* test/run: Drop support for su and sgJean Delvare2014-02-122-77/+2
| | | | | | The su and sg commands can only work if running as root. The quilt test cases do not use these commands and I certainly wouldn't recommend running the test suite as root, so drop the feature.
* test/run: Use perl module Text::ParseWordsJean Delvare2014-02-122-2/+4
| | | | | | | | Perl has a standard module which can split shell command lines for us, so use it. Function shellwords can deal with quoted parameters too so we no longer need to pass commands to /bin/sh just because they contain quoted parameters. This lowers the ratio of commands passed to /bin/sh from 34% to 31%.
* test/run: Delay command line splittingJean Delvare2014-02-122-11/+16
| | | | | Delay command line splitting until it's actually needed. This avoids having to join it again to log it or to pass it to /bin/sh.
* patchfns: Fix "quilt diff -z" on files with spaces in their namesJean Delvare2014-02-102-1/+7
| | | | | | Before this fix, "quilt diff -z" would fail on files with spaces in their names, with the following error message: Failed to copy files to temporary directory
* Style cleanupsJean Delvare2014-02-102-4/+4
|
* refresh: Fix error messageJean Delvare2014-02-061-1/+2
| | | | The message was not updated when support for -pab was added.
* Fix a typo in changelogJean Delvare2014-01-291-1/+1
|
* Add step-by-step releasing guideJean Delvare2014-01-272-0/+39
|
* Missing changelog entry (yes, again)Jean Delvare2014-01-221-0/+5
|
* Update automatically generated configure scriptJean Delvare2014-01-221-0/+188
|
* fr.po: Update last translatorJean Delvare2014-01-221-1/+1
|
* configure: add compat symlinks for cp and md5sumKent R. Spillner2014-01-212-0/+5
| | | | | | | | | | | | | | | Allow distributors to provide compat symlinks for cp and md5sum on non-GNU systems. md5sum is used by quilt/scripts/inspect and is provided by GNU coreutils, but may be installed as gmd5sum on some systems (e.g. OpenBSD). quilt/scripts/backup-files invokes cp with some non-portable GNU-specific command line arguments (e.g. --parents --remove-destination --target-directory). Original diff from Jérémie Courrèges-Anglas <jca@wxcvbn.org> on OpenBSD ports mailing list. Reported-by: Jérémie Courrèges-Anglas <jca@wxcvbn.org> Signed-off-by: Kent R. Spillner <kspillner@acm.org>
* Drop stray reference to bin/backup-files.Jean Delvare2014-01-201-2/+0
|
* Drop stray references to debian files.Jean Delvare2014-01-202-7/+2
|
* There is no reason to keep deprecated debian files in this treeMartin Quinson2014-01-2010-952/+0
| | | | | The debian package is maintained in git://git.debian.org/git/collab-maint/quilt nowadays.
* Swap negated if/else constructsJean Delvare2014-01-202-17/+17
| | | | | | | | | | | | | | Constructs of the form: if ! [ ... ] then ... else ... fi can be swapped to avoid the negation. It makes the code easier to read and slightly faster to run.
* Tree-wide white-space cleanupsJean Delvare2014-01-2045-222/+221
| | | | | | | * Delete blank lines at end of files. * Delete white space at end of lines. * Delete spaces before tab. * Replace 8 spaces by a tab where it makes sense.
* Forgot to add a changelog entry again...Jean Delvare2014-01-191-0/+6
|
* Exit with an error when diff's retcode=2 (error) on patch refreshMartin Quinson2014-01-194-2/+53
| | | | | | This is trigered e.g. when you try to add a binary file to a patch. This is actually creepy to think that we were not checking the retcode of diff :)
* empty-files.test: Coding style updateJean Delvare2014-01-181-10/+20
| | | | | | Use the same syntax for file testing as used in other test cases. It is more readable and avoids having to add yet another condition for $needs_shell.
* Document that -E is no longer passed to patch by defaultJean Delvare2014-01-171-1/+10
| | | | | | | Explain why -E is no longer passed to patch by default, and why a user may want to revert to the old behavior. Based on a preliminary patch by Martin Quinson.
* Test quilt refresh on a patch leaving an empty fileJean Delvare2014-01-172-0/+43
| | | | | | | Add a test case for "quilt refresh" on a patch leaving an empty file. We were already testing that imported patches doing that were handled properly, now we want to ensure that refreshing such patches preserves the information.
* Fix refreshing of patches emptying a fileJean Delvare2014-01-171-1/+1
| | | | | | | | | | | | | | Quilt can now import patches emptying a file, however the proper header formatting is lost on refresh. Fix it. The format is still not correct for patches creating a file. This is because quilt creates an empty backup file for every non-existent file being added to a patch. This is how quilt remembers that the file is modified by the top-most patch. Ideally the list of files belonging to the top-most patch should be stored separately in a metadata file. That being said, it is not critical in practice because GNU patch makes no difference between adding contents to a new file and adding contents to an empty file.
* test/refresh_patch_order.test: enforces the file order within a patchMartin Quinson2014-01-172-0/+67
|
* Add missing entries to quilt.changesJean Delvare2014-01-171-0/+29
|
* Add a test case for patches leaving empty filesJean Delvare2014-01-171-0/+85
| | | | | | For now this only covers the push and fold commands on imported patches, which we just fixed. Later we can add tests for the refresh command, which is still not OK.
* Stop using patch option -EJean Delvare2014-01-174-4/+4
| | | | | | | | | | | GNU patch version 2.5 and newer deals just fine with empty files, however our use of option -E breaks this feature. So stop using this option. Anyway, the manual page says: "Normally this option is unnecessary" and the test suite passes just fine without it. If anyone is using legacy patch formats which do require the use of option -E, they can add it to QUILT_PATCH_OPTS to revert to the previous behavior.
* bash_completion: Fix completion of patch namesJean Delvare2014-01-071-16/+21
| | | | | | | | | | | | | | When the user's quilt configuration file (~/.quiltrc or /etc/quilt.quiltrc) contains QUILT_PATCHES_PREFIX=yes (and the default /etc/quilt.quiltrc does), bash completion chokes on patch names. This is because quilt series, applied and unapplied return relative patch names instead of the expected absolute patch names. This can be solved by skipping configuration files when quilt is called from the bash completion script. This fixes bug #27111: https://savannah.nongnu.org/bugs/index.php?27111
* unset GREP_OPTIONS in bin/quilt, as it's quite easy to break quilt with ↵Martin Quinson2013-12-221-0/+4
| | | | uncommon options
* french translation back at 100%Martin Quinson2013-12-211-12/+18
|