Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   quilt    ( 1 )

инструмент для управления сериями патчей (tool to manage series of patches)

Конфигурационный файл (Config file)

Upon startup, quilt evaluates the file .quiltrc in the user's
       home directory, /etc/quilt.quiltrc if the former file does not
       exist, or the file specified with the --quiltrc option.  This
       file is a regular bash script. Default options can be passed to
       any COMMAND by defining a QUILT_${COMMAND}_ARGS variable.  For
       example, QUILT_DIFF_ARGS="--color=auto" causes the output of
       quilt diff to be syntax colored when writing to a terminal.

In addition to that, quilt recognizes the following variables:

EDITOR

The program to run to edit files. If it isn't redefined in the configuration file, $EDITOR as defined in the environment will be used.

LESS

The arguments used to invoke the pager. Inherits the existing value of $LESS if LESS is already set in the environment, otherwise defaults to "-FRSX".

QUILT_DIFF_OPTS

Additional options that quilt shall pass to GNU diff when generating patches. A useful setting for C source code is "-p", which causes GNU diff to show in the resulting patch which function a change is in.

QUILT_PATCH_OPTS

Additional options that quilt shall pass to GNU patch when applying patches. For example, recent versions of GNU patch support the "--reject-format=unified" option for generating reject files in unified diff style (older patch versions used "--unified-reject-files" for that).

You may also want to add the "-E" option if you have issues with quilt not deleting empty files when you think it should. The documentation of GNU patch says that "normally this option is unnecessary", but when patch is in POSIX mode or if the patch format doesn't allow to distinguish empty files from deleted files, patch deletes empty files only if the -E option is given. Beware that when passing -E to patch, quilt will no longer be able to deal with empty files, which is why using -E is no longer the default.

QUILT_DIFFSTAT_OPTS

Additional options that quilt shall pass to diffstat when generating patch statistics. For example, "-f0" can be used for an alternative output format. Recent versions of diffstat also support alternative rounding methods ("-r1", "-r2").

QUILT_PC

The location of backup files and any other data relating to the current state of the working directory from quilt's perspective. Defaults to ".pc".

QUILT_PATCHES

The location of patch files, defaulting to "patches".

QUILT_SERIES

The name of the series file, defaulting to "series". Unless an absolute path is used, the search algorithm described above applies.

QUILT_PATCHES_PREFIX

If set to anything, quilt will prefix patch names it prints with their directory (QUILT_PATCHES).

QUILT_NO_DIFF_INDEX

By default, quilt prepends an Index: line to the patches it generates. If this variable is set to anything, no line is prepended. This is a shortcut to adding --no-index to both QUILT_DIFF_ARGS and QUILT_REFRESH_ARGS.

QUILT_NO_DIFF_TIMESTAMPS

By default, quilt includes timestamps in headers when generating patches. If this variable is set to anything, no timestamp will be included. This is a shortcut to adding --no-timestamps to both QUILT_DIFF_ARGS and QUILT_REFRESH_ARGS.

QUILT_PAGER

The pager quilt shall use for commands which produce paginated output. If unset, the values of GIT_PAGER or PAGER is used. If none of these variables is set, "less -R" is used. An empty value indicates that no pager should be used.

QUILT_COLORS

By default, quilt uses its predefined color set in order to be more comprehensible when distiguishing various types of patches, eg. applied/unapplied, failed, etc.

To override one or more color settings, set the QUILT_COLORS variable in following syntax - colon (:) separated list of elements, each being of the form <format name>=<foreground color>[;<background color>]

Format names with their respective default values are listed below, along with their usage(s). Color codes(values) are standard bash coloring escape codes. See more at http://tldp.org/LDP/abs/html/colorizing.html#AEN20229

diff_hdr Used in 'quilt diff' to color the index line. Defaults to 32 (green).

diff_add Used in 'quilt diff' to color added lines. Defaults to 36 (azure).

diff_mod Used in 'quilt diff' to color modified lines. Defaults to 35 (purple).

diff_rem Used in 'quilt diff' to color removed lines. Defaults to 35 (purple).

diff_hunk Used in 'quilt diff' to color hunk header. Defaults to 33 (brown/orange).

diff_ctx Used in 'quilt diff' to color the text after end of hunk header (diff --show-c-function generates this). Defaults to 35 (purple).

diff_cctx Used in 'quilt diff' to color the 15-asterisk sequence before or after a hunk. Defaults to 33 (brown/orange).

patch_fuzz Used in 'quilt push' to color the patch fuzz information. Defaults to 35 (purple).

patch_fail Used in 'quilt push' to color the fail message. Defaults to 31 (red).

series_app Used in 'quilt series' and 'quilt patches' to color the applied patch names. Defaults to 32 (green).

series_top Used in 'quilt series' and 'quilt patches' to color the top patch name. Defaults to 33 (brown/orange).

series_una Used in 'quilt series' and 'quilt patches' to color unapplied patch names. Defaults to 0 (no special color).

In addition, the clear format name is used to turn off special coloring. Its value is 0; it is not advised to modify it.

The content of QUILT_COLORS supersedes default values. So the value diff_hdr=35;44 will get you the diff headers in magenta over blue instead of the default green over unchanged background. For that, add the following content to ~/.quiltrc (or /etc/quilt.quiltrc):

QUILT_DIFF_ARGS="--color" QUILT_COLORS='diff_hdr=35;44'