bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37189: *** GMX Spamverdacht *** Re: bug#37189: Acknowledgement (25.4


From: Wolfgang Scherer
Subject: bug#37189: *** GMX Spamverdacht *** Re: bug#37189: Acknowledgement (25.4.1: vc-hg-ignore implementation is missing)
Date: Wed, 28 Aug 2019 03:46:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2

Am 27.08.19 um 09:45 schrieb Eli Zaretskii:
>> From: Wolfgang Scherer <Wolfgang.Scherer@gmx.de>
>> Date: Tue, 27 Aug 2019 01:25:59 +0200
>>
>> +(defun vc-hg-ignore (file &optional directory remove)
>> +  "Ignore FILE of DIRECTORY (default is `default-directory').
>> +
>> +FILE is a file wildcard, relative to the root directory of DIRECTORY.
> I think instead of "root directory of DIRECTORY" this should say "the
> top-level directory of DIRECTORY's repository".
I disagree. This comment is a modified version of the comment for
`vc-default-ignore'. And the exact same phrase also pops up for
`vc-svn-ignore':

vc.el:1420:FILE is a file wildcard, relative to the root directory of DIRECTORY.
vc-svn.el:356:FILE is a file wildcard, relative to the root directory of 
DIRECTORY.

Also `top level' only appears twice in the `vc-' files:

vc-bzr.el:1070: A merge has been performed.\nA commit from the top-level 
directory
vc-cvs.el:904:;; at the top level for CVS.

while the phrases `root', `root directory', `repository root'
appear 23 times in strings and comments alone.

The sentence is actually utterly false for `vc-default-ignore',
since FILE is usually an absolute file path when called from a
*vc-dir* buffer. With relative paths the code is still wrong and
ends up as plain basename for the pattern.

Since the implementation of `vc-hg-ignore' corresponds to the
actual situation, I have changed the wording to reflect that using
the term `project root'.

>
>> +If FILE matches the regular expression
>> +`vc-hg-ignore-detect-wildcard', it is appended to .hgignore as
>> +is. Otherwise, FILE is escaped/expanded according to the active
>> +syntax in .hgignore. If the syntax is `regexp', FILE is quoted as
>> +anchored literal Python regexp and if FILE is a directory, the
>> +trailing `$' is omitted.  Otherwise, if the syntax is `glob',
>> +FILE is used unquoted and if FILE is a directory, a `*' is
>> +appended.
> Our convention is to leave 2 spaces between sentences in comments and
> doc strings.
Done.
>> +When called from Lisp code, if DIRECTORY is non-nil, the
> "When called from Lisp" implies that this function can be called in
> some other way, which is generally correct only with commands.  But
> this function is not a command, so I'm unsure what this means here.
I agree, and I fixed the remove option, so it actually does what
it says ;-)
> Thanks.

You're welcome.

Oops, I had forgotten to include the variable
`vc-hg-ignore-detect-wildcard'. So here is an overhauled patch.


Attachment: 0001-Provides-vc-hg-ignore-to-make-vc-ignore-work-correct.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]