[Top][All Lists]

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

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

From: Eli Zaretskii
Subject: bug#37189: 25.4.1: vc-hg-ignore implementation is missing
Date: Sat, 22 Feb 2020 09:44:20 +0200

> Cc: address@hidden
> From: Wolfgang Scherer <address@hidden>
> Date: Fri, 21 Feb 2020 23:22:18 +0100
> > Now, one could argue that one use case is more important than the other 
> > one, and that vc-ignore has for a while been geared toward entering plain 
> > file names rather than glob patterns. I have little opinion on this 
> > subject, however, since I mostly edit ignore files by hand, and do so very 
> > rarely. So as far as I'm concerned, we could remove this feature altogether 
> > and not lose much.
> Both use cases are important for casual users of a VC.

I think the issue is not such general, but a more specific one: is the
use case of ignoring patterns more important than ignoring particular
files, when we are talking about usage through VC?

> SRC has ignore files similar to CVS and SVN.

That's not my reading of the SRC source, which simply does

                    if line.startswith("#") or not line.strip():
                    elif line.startswith("!"):
                        ignorable -= set(glob.glob(line[1:].strip()))
                        ignorable |= set(glob.glob(line.strip()))

and the Python documentation, which says:

   glob.glob(pathname, *, recursive=False)

      Return a possibly-empty list of path names that match pathname,
      which must be a string containing a path specification. pathname
      can be either absolute (like /usr/src/Python-1.5/Makefile) or
      relative (like ../../Tools/*/*.gif), and can contain shell-style
      wildcards. Broken symlinks are included in the results (as in
      the shell). Whether or not the results are sorted depends on the
      file system.

So Git-style root-directory-only .srcignore files will do for SRC.
Which doesn't surprise me at all, because SRC in general copycats
Git's behavior in many aspects.

> > Roughly and handwavy, we can take this case to mean "use default-directory".
> Unfortunately not. If the file or pattern to be ignored is in a
> subdirectory of default-directory, the DIRECTORY argument must reflect
> this for CVS, SVN, SRC.

But since CVS and SVN don't use vc-default-ignore, and SRC can do with
a single file in the root of the repository, does it really matter in

reply via email to

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