| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Some options need a parameter, invite the user to provide it.
|
|
|
|
| |
Command "new" accepts options now, add support for them.
|
|
|
|
| |
Some options need a parameter, invite the user to provide it.
|
|
|
|
|
| |
Enable completion with the new options of commands diff, fold, import,
mail, patches, pop, push, refresh, series and setup.
|
|
|
|
| |
Command "upgrade" was missing.
|
|
|
|
| |
Add missing options -m and --fuzz to the synopsis.
|
|
|
|
|
| |
Add options --charset and --signature to the synopsis, and describe
the --charset option.
|
|
|
|
|
|
| |
Drop the check for quilt being present. No other completion file has
such a check, because it's useless. If the program isn't installed
then its completion file isn't installed either.
|
|
|
|
|
|
|
|
|
|
| |
Completing long options of the grep command is not a fundamental
feature. I can't remember ever needing it. The most useful grep
options are short ones by design. Additionally, our internal
implementation of _longopt is broken as far as I can tell.
So drop our implementations of _expand, _filedir and _longopt, and
only call _longopt if it is already available from bash-completion.
|
|
|
|
|
| |
Add support for directories to _quilt_comfile, and use that for the
setup command. The drops the last direct dependency to _filedir.
|
|
|
|
|
| |
All other commands use _quilt_comfile so do the same for diff for
consistency.
|
|
|
|
|
|
|
|
| |
Set IFS in _quilt_comfile so that file names containing spaces are
properly handled. Also quote ${COMPREPLY[@]} everywhere so that such
file names are preserved.
This closes Debian bug #640551.
|
|
|
|
|
|
|
|
|
|
| |
You can't change the caller's environment from the right hand side of
a pipe. So that code was doing nothing, which means we can just
delete it.
What the code was supposedly doing, is actually implemented by
complete's option "filenames". So move the comment to where this
option is set, to clear the confusion.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Fix a race condition where we may check the return status of diff
before the command has actually terminated. Make sure that we read
all of diff's output to ensure this can't happen.
|
|
|
|
|
| |
"quilt refresh" reports diff failures to the user. "quilt diff"
should do the same.
|
|
|
|
|
|
| |
Since diffutils version 3.4, diff no longer returns an error code for
binary files. Parse the first line of the output to detect this case
and raise our own error.
|
|
|
|
|
|
|
|
| |
If QUILT_PATCHES or QUILT_SERIES are set both in ~/.quiltrc and
.pc/.quilt_patches (respectively .pc/.quilt_series), the former
currently takes precedence. This pretty much voids the value of
per-project settings. Project settings should have the highest
priority.
|
|
|
|
|
| |
Variables $opt_fast and $QUILT_SETUP_FAST have the same meaning and
value, so we can drop the former.
|
|
|
|
|
| |
Reorder the code in function inspect() to avoid testing for the same
condition twice.
|
|
|
|
|
|
|
|
| |
In fast mode, don't compute the md5sum of the files in the source
directory before we need them. In most cases we will never actually
need them, so this avoids computing them for nothing.
Speed gain from this change can reach 12 %.
|
|
|
|
|
|
|
|
|
|
| |
When the input file is passed through stdin, we can usually get its
name from procfs. This avoids having to look up the file by md5sum.
Not only this makes things faster, but this also helps if the patch
file was modified by additional commands in the spec file before
being applied (yes, I've seen this happen.)
Speed gain from this change can reach 20 %.
|
|
|
|
|
|
|
|
| |
In fast mode, we only process calls to patch, and we don't let it
actually apply the patches, so we never need to make a temporary
copy of files read from the standard input.
This change results in a 3 % performance gain in my test case.
|
|
|
|
|
| |
Pass the md5sum instead of the file name to original_file(). This
will allow for further optimization in fast mode.
|
|
|
|
|
|
|
| |
If the input file is passed as a command line parameter, we already
know its name, don't waste time looking it up.
This change results in a 3 to 5 % performance gain in my test case.
|
|
|
|
|
|
|
|
|
|
| |
When --config=series is used and a listed file is not found on the
disk, guards prints the following message:
Not found in series: file
This message is confusing, as the file was found in series, it is
missing on the disk. Change the message to make this more obvious.
|
| |
|
|
|
|
|
| |
* Fix synopsis format.
* Document the new --path=@<file> option.
|
| |
|
| |
|
|
|
|
| |
This will allow us to run --check without a kernel-source.git work tree.
|
| |
|
|
|
|
|
|
| |
There are way too many occurrences of ${0##*/}. Store the result in
a variable and use it as needed. Also hard-code the name when it is
known, to save the cost of variable substitution altogether.
|
|
|
|
|
| |
The inspect-wrapper script looks up files by md5sum. If that fails,
we should notify the user that something went wrong.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let function cat_to_new_file optionally backup the destination file
before overwriting it. This has two advantages:
* This avoids duplicating code on the caller's side. Functions header
and refresh both need to perform a backup.
* This guarantees the consistency of the backup logic. At the moment,
the refresh command would handle the backup of a symlinked file
just fine while the header command would misbehave in that case.
Now that the header command handles symlinked patches properly, also
test it so that we don't break it accidentally later.
|
|
|
|
|
| |
Extend the hard-linked patch test case to also check the behavior
when updating the header of such a patch.
|
|
|
|
| |
Add a test case for backup failure to the test suite.
|
|
|
|
|
|
|
|
|
|
|
|
| |
I frequently use sub-directories to store different patchsets under
the quilt patches/ directory. Unfortunately, the quilt emacs mode
does not handle this case and the file is not considered editable.
The issue seems to be in the quilt-top-patch which does an equivalent
of basename on the patch name. The proposal below changes the
quilt-editable routine to keep the full name of the patch.
Signed-off-by: Cédric Le Goater <legoater@free.fr>
|
|
|
|
|
|
|
| |
"mv" may or may not overwrite a read-only file by default, depending
on whether or not it is considered to be interactive. Removing the
file explicitly before avoids that uncertainty and makes it easier to
play the test case manually.
|
| |
|
|
|
|
|
| |
Add the editor syntax hint comments to 3 files which do not have
them yet.
|
|
|
|
|
|
|
| |
Source files include metadata comments to help text editors apply the
right syntax highlighting. Generated files should not be edited so
these comments are not needed there. Text editors should get the
language right for generated files in the first place anyway.
|
|
|
|
|
|
| |
In the general case, when doing a backup copy of a patch on refresh,
the modification time of the file is preserved. We should do the same
when the patch is a symbolic link.
|
|
|
|
|
|
|
|
| |
We just changed the behavior of the refresh command to no longer
break symbolic links. While preserving the links is the right thing
to do in the general case, this approach fails if the patch file is
read-only. In that case we want to replace the link itself with the
refreshed patch, as we used to.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the core behavior of quilt to not remove symlinks to the patch
files.
Historical notes:
This is an 6 year old patch that is still actively used for the
Yocto Project and others.
http://lists.nongnu.org/archive/html/quilt-dev/2008-01/msg00004.html
Revised again here:
http://comments.gmane.org/gmane.comp.handhelds.openembedded/34224
[Edited by Jean Delvare: removed a compatibility option, we'll
introduce it only if users ask for it. Also cleaned up the test
case a bit.]
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is one corner case which is not properly handled by the "edit"
command. If a patch deletes a file, and the user calls "quilt edit"
on that file but does not actually add anything back to it, "quilt
remove" is called on the file when the editor exits. This causes
the file to be restored to its original state before the patch deleted
it. The user never asked for that, so the file should be left to its
deleted state in this case. The file must only be removed from the
patch if it was not part of the patch originally.
The same problem would occur if the editor deleted the file. In
general text editors don't do that, they'd leave an empty file
instead, but nothing prevents them from actually deleting the file so
we should handle this case properly too.
|