Hi, 

I worked on the issues you mentioned, what do you think about this revision?

>>> Martin Quinson <[email protected]> 01/22/13 12:12 AM >>>
On Mon, Jan 21, 2013 at 10:56:35AM +0100, Daniel Lovasko wrote:
> Hi all,
> 
> my solution for this bug: https://savannah.nongnu.org/bugs/?32093 is included 
> in the attachment.
> What do you think?

> +\item[\textsf{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. Setting this variable enables overriding 
> +values of certain subset of used colors.

I would say that this is very interesting: I did not know of this
coloring feature: the commands series and patch did not document their
--color parameter, while push was very terse on the meaning of the
parameter argument. I just fixed that, thanks for pointing me on it.

But unfortunately, after reading this new documentation, I was very
far from being able to use this feature. I had to dig into the code
and googling around.

I think that you need to say explicitely that the default setting is:
diff_hdr=32:diff_add=36:diff_mod=35:diff_rem=35:diff_hunk=33:diff_ctx=35:diff_cctx=33:patch_offs=33:patch_fuzz=35:patch_fail=31:patch_applied=32:series_app=32:series_top=33:series_una=00:clear=00

with a word on the syntax. It's a colon (:) separated list of
elements, each being of the form 
  <format name>=<forground color>[;<background color>]

It would be interesting to document the whole list of format names
since some are trivially understood (such as diff_hdr) but some other
are less obvious (such as diff_cctx but that may be just me). This may
be part of the command's documentation (in their usage function), as
I don't see reused color names between commands at the first glance.

You also want to specify that the color code is following the
classical bash color escaping, with information retrieved from eg,
http://tldp.org/LDP/abs/html/colorizing.html#AEN20229

After that, you can say that the content of QUILT_COLORS is simply
used to superseed default values. So if I set
QUILT_COLORS='diff_hdr=35;44', I'll get my diff headers in magenta
over blue instead of the default green with background unchanged.

Well, I fear that it takes a full documentation section to explain it
all, actually.

Thanks for your time,
Mt.


-- 
Dans la france profonde, il y a surtout des spéléologues.
   -- Le Chat

_______________________________________________
Quilt-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/quilt-dev



diff --git a/doc/quilt.1.in b/doc/quilt.1.in
index 895c518..3494cb2 100644
--- a/doc/quilt.1.in
+++ b/doc/quilt.1.in
@@ -211,6 +211,93 @@ 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.
 
+.IP QUILT_COLORS 4
+
+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>=<forground 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
+.RS 
+.RS
+Used in 'quilt diff' to color the index line. Defaults to 32 (green).
+.RE
+
+diff_add
+.RS
+Used in 'quilt diff' to color added lines. Defaults to 36 (azure).
+.RE
+
+diff_mod
+.RS
+Used in 'quilt diff' to color modified lines. Defaults to 35 (purple).
+.RE
+
+diff_rem
+.RS
+Used in 'quilt diff' to color removed lines. Defaults to 35 (purple).
+.RE
+
+diff_hunk 
+.RS
+Used in 'quilt diff' to color hunk header. Defaults to 33 (brown/orange).
+.RE
+
+diff_ctx 
+.RS
+Used in 'quilt diff' to color the text after end of hunk header (diff 
--show-c-function generates this). Defaults to 35 (purple).
+.RE
+
+diff_cctx
+.RS
+Used in 'quilt diff' to color the 15-asterisk sequence before or after a hunk. 
Defaults to 33 (brown/orange).
+.RE
+
+patch_fuzz 
+.RS
+Used in 'quilt push' to color the patch fuzz information. Defaults to 35 
(purple).
+.RE
+
+patch_fail
+.RS
+Used in 'quilt push' to color the fail message. Defaults to 31 (red).
+.RE
+
+patch_applied 
+.RS
+Not used anywhere. Defaults to 32 (green).
+.RE
+
+series_app 
+.RS
+Used in 'quilt series' and 'quilt patches' to color the applied patch names. 
Defaults to 32 (green).
+.RE
+
+series_top 
+.RS
+Used in 'quilt series' and 'quilt patches' to color the top patch name. 
Defaults to 33 (brown/orange).
+.RE
+
+series_una
+.RS
+Used in 'quilt series' and 'quilt patches' to color unapplied patch names. 
Defaults to 0 (no special color).
+.RE
+
+clear
+.RS
+Used to turn off special coloring in 'quilt patches', 'quilt series', 'quilt 
push' and 'quilt diff'. Defaults to 0 (turns off special coloring).
+.RE
+.RE
+
 .IP EDITOR 4
 
 The program to run to edit files.  If it isn't redefined in the
_______________________________________________
Quilt-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to