unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Wolfgang Scherer <Wolfgang.Scherer@gmx.de>
Cc: 37189@debbugs.gnu.org, dgutov@yandex.ru
Subject: bug#37189: 25.4.1: vc-hg-ignore implementation is missing
Date: Sat, 22 Feb 2020 16:30:35 +0200	[thread overview]
Message-ID: <83lfouitis.fsf@gnu.org> (raw)
In-Reply-To: <bb5ad2ce-5bfd-5b1f-3354-92da926844fc@gmx.de> (message from Wolfgang Scherer on Sat, 22 Feb 2020 14:46:16 +0100)

> Cc: dgutov@yandex.ru, 37189@debbugs.gnu.org
> From: Wolfgang Scherer <Wolfgang.Scherer@gmx.de>
> Date: Sat, 22 Feb 2020 14:46:16 +0100
> 
> >> 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?
> How would you measure the importance?

By citing experience and anecdotal evidence, I guess.  Also, by
providing arguments for relative (un)importance of each use case.

> >> 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():
> >                         continue
> >                     elif line.startswith("!"):
> >                         ignorable -= set(glob.glob(line[1:].strip()))
> >                     else:
> >                         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.
> You are reading this correctly.
> > 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.
> However, your conclusion is unfounded. You need a root directory and
> recursion for Git-style glob patterns.
> 
> SRC is RCS/SCCS revisited with a modern frontend. It is - just like
> RCS and SCCS - not recursive. None of its commands work recursively.

When I actually try this, I see something that confirms my
understanding:

  ~$ mkdir src_vcs
  ~$ cd src_vcs
  ~/src_vcs$ mkdir .src
  ~/src_vcs$ touch file1
  ~/src_vcs$ mkdir t1
  ~/src_vcs$ touch t1/file1
  ~/src_vcs$ src status t1/file1
  ?       t1/file1
  ~/src_vcs$ cat > .srcignore
  t1/file1
  ^D
  ~/src_vcs$ src status t1/file1
  I       t1/file1
  ~/src_vcs$ src status -a
  ?       .srcignore
  ?       file1
  ?       t1

> There is also no notion of a root directory, i.e. SRC **never** checks
> a parent directory for ignore patterns, which would be necessary for a
> Git-style glob to work.

The first part is true, but if we invoke "src status" from the root
directory, the .srcignore file there will be read, and as the example
above shows, will have its effect.  Right?

> >>> 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
> > practice?
> 
> IMHO, the goal should be to eliminate both vc-svn-ignore and
> vc-cvs-ignore, replacing the functionality by low-level backend
> functions, which is perfectly possible, iff the ignore file / ignore
> directory is correctly identified: vc-cvs-find-ignore-file,
> vc-svn-ignore-file (just to identify the directory), vc-svn-add-line,
> vc-svn-remove-line (or a combined handler for addition and
> removal). This also results in cheap ignore file support for SRC with
> a single function vc-src-find-ignore-file.

I don't see how this answers my question, sorry.  Even if our
long-term goal is to remove vc-svn/cvs-ignore-file (which are already
backend functions, of course), my question is still valid and
interesting under the current situation, to which Dmitry's suggestion
above pertained, AFAIU.  So we might consider his suggestion "good
enough" under the current situation.





  reply	other threads:[~2020-02-22 14:30 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26  0:21 bug#37189: 25.4.1: vc-hg-ignore implementation is missing Wolfgang Scherer
     [not found] ` <handler.37189.B.15667808855126.ack@debbugs.gnu.org>
2019-08-26 23:25   ` bug#37189: Acknowledgement (25.4.1: vc-hg-ignore implementation is missing) Wolfgang Scherer
2019-08-27  7:45     ` Eli Zaretskii
2019-08-28  1:46       ` bug#37189: *** GMX Spamverdacht *** " Wolfgang Scherer
2019-08-28  6:16         ` Eli Zaretskii
2019-08-29  1:23           ` bug#37189: 25.4.1: vc-hg-ignore implementation is missing Wolfgang Scherer
2019-08-29  0:38         ` Wolfgang Scherer
2019-08-29 15:52           ` Wolfgang Scherer
2019-12-25  0:16             ` Dmitry Gutov
2020-01-05  3:46               ` Wolfgang Scherer
2020-01-05  8:58                 ` Andreas Schwab
2020-01-05 17:25                   ` Wolfgang Scherer
2020-01-14  1:14                 ` Dmitry Gutov
2020-02-01  1:20                   ` Wolfgang Scherer
2020-02-01  8:27                     ` Eli Zaretskii
2020-02-03  1:16                       ` Wolfgang Scherer
2020-02-04 18:55                         ` Eli Zaretskii
2020-02-05  5:18                           ` Wolfgang Scherer
2020-02-05 19:06                           ` Wolfgang Scherer
2020-02-07  9:57                             ` Eli Zaretskii
2020-02-08  9:57                               ` Dmitry Gutov
2020-02-08 19:45                                 ` Wolfgang Scherer
2020-02-08 20:05                                   ` Eli Zaretskii
2020-02-08 23:12                                     ` Wolfgang Scherer
2020-02-09 13:57                                       ` Wolfgang Scherer
2020-02-09 13:57                                       ` Wolfgang Scherer
2020-02-10 16:02                                         ` Eli Zaretskii
2020-02-11  1:45                                           ` Wolfgang Scherer
2020-02-11 17:32                                             ` Eli Zaretskii
2020-02-11 22:28                                               ` Wolfgang Scherer
2020-02-12 18:34                                                 ` Eli Zaretskii
     [not found]                                                   ` <6f3ba261-e1f9-cf19-cc22-ec8c24cf3298@gmx.de>
2020-02-12 23:20                                                     ` Wolfgang Scherer
2020-02-13  1:18                                                       ` Wolfgang Scherer
2020-02-13 15:09                                                         ` Eli Zaretskii
2020-02-13 16:30                                                           ` Wolfgang Scherer
2020-02-13 23:43                                                           ` Richard Stallman
2020-02-14  1:49                                                             ` Wolfgang Scherer
2020-02-16  2:29                                                               ` Richard Stallman
2020-02-13 15:21                                                         ` Eli Zaretskii
2020-02-13 23:40                                                           ` Dmitry Gutov
2020-02-14  9:23                                                             ` Eli Zaretskii
2020-02-21  0:05                                                               ` Dmitry Gutov
2020-02-21  8:10                                                                 ` Eli Zaretskii
2020-02-21 22:22                                                                 ` Wolfgang Scherer
2020-02-22  7:44                                                                   ` Eli Zaretskii
2020-02-22 13:46                                                                     ` Wolfgang Scherer
2020-02-22 14:30                                                                       ` Eli Zaretskii [this message]
2020-02-22 19:14                                                                         ` Dmitry Gutov
2020-02-22 22:04                                                                           ` Wolfgang Scherer
2020-02-22 23:32                                                                         ` Wolfgang Scherer
2020-02-23 15:20                                                                           ` Eli Zaretskii
2020-02-23 19:16                                                                             ` Wolfgang Scherer
2020-02-22 19:30                                                                   ` Dmitry Gutov
2020-02-22 22:00                                                                     ` Wolfgang Scherer
2020-02-22 23:58                                                                       ` Dmitry Gutov
2020-02-23  0:29                                                                         ` Wolfgang Scherer
2020-02-24 23:07                                                                           ` Dmitry Gutov
2020-02-25  2:22                                                                             ` Wolfgang Scherer
2020-03-19 23:42                                                                               ` Dmitry Gutov
2020-07-03 20:53                                                                                 ` Wolfgang Scherer
2020-07-03 21:49                                                                                   ` Dmitry Gutov
2020-02-12 17:23                                               ` Wolfgang Scherer
2020-02-09 13:57                                       ` Wolfgang Scherer
2020-02-09 14:07                                         ` Wolfgang Scherer
2020-02-08 23:59                                     ` Wolfgang Scherer
2020-02-09 21:06                               ` Wolfgang Scherer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83lfouitis.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=37189@debbugs.gnu.org \
    --cc=Wolfgang.Scherer@gmx.de \
    --cc=dgutov@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).