GNU bug report logs - #37189
25.4.1: vc-hg-ignore implementation is missing

Previous Next

Package: emacs;

Reported by: Wolfgang Scherer <Wolfgang.Scherer <at> gmx.de>

Date: Mon, 26 Aug 2019 00:55:02 UTC

Severity: normal

Found in version 25.4.1

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Wolfgang Scherer <Wolfgang.Scherer <at> gmx.de>, 37189 <at> debbugs.gnu.org
Subject: bug#37189: 25.4.1: vc-hg-ignore implementation is missing
Date: Wed, 25 Dec 2019 02:16:27 +0200
Hi Wolfgang,

On 29.08.2019 18:52, Wolfgang Scherer wrote:
> +  "Ignore FILE of DIRECTORY (default is `default-directory').

IF this function needs a docstring at all (which is not obvious since it 
should be following vc-ignore), I think I'd rather this followed the 
latter's docstring. Where the clarification about the default is not in 
the first sentence.

Also, I think saying "Ignore FILE under DIRECTORY" would be better, if 
you intend to add this particular semantics to relative names.

> +Otherwise, FILE is either relative to DIRECTORY or absolute. FILE
> +is converted to a path relative to the project root of DIRECTORY.

Isn't it a bit odd that vc-ignore's docstring doesn't specify this 
distinction, and yet we're trying to implement it in vc-hg-ignore?

Do you have a particular reason for that?

> +                (concat pattern (and (file-directory-p file-path) "*"))))))

I think it needs to asterisks for the glob to become recursive. At least 
according to https://stackoverflow.com/a/255094/615245.

> +    (lambda (_c)
> +      (cons _c (concat "\\" (char-to-string _c)))))

Our convention says that an argument whose name starts with underscore 
is unused. That's not the case here, so it shouldn't be named like that.

> +    (lambda (_c)
> +      (or (cdr (assq _c vc-hg--py-regexp-special-chars))
> +          (char-to-string _c))))

Same.




This bug report was last modified 4 years and 350 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.