all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: Glenn Morris <rgm@gnu.org>, sds@gnu.org, 42966@debbugs.gnu.org
Subject: bug#42966: 28.0.50; vc-dir: wrong backend
Date: Sun, 18 Oct 2020 10:31:38 +0200	[thread overview]
Message-ID: <87eelwj5p1.fsf@gnus.org> (raw)
In-Reply-To: <c9d37b5a-b271-19ea-f3f7-b202afab5883@yandex.ru> (Dmitry Gutov's message of "Sat, 17 Oct 2020 23:01:09 +0300")

Dmitry Gutov <dgutov@yandex.ru> writes:

> Or, more low-level, if we find that every backend follows the pattern
> of aliasing vc-xyz-responsible-p to vc-xyz-root, and calling
> vc-find-root in the latter's implementation, we could opt for creating
> a backend action that returns the "witness" file name (e.g. ".git"),
> and then construct a regexp from all witness file names, and pass it
> to 'directory-files' as MATCH. Depending on the cost of certain
> things, this could end up being much faster, both locally and
> remotely.

That does sound a lot faster.  Let's see...

./lisp/obsolete/vc-arch.el491:(defalias 'vc-arch-responsible-p 'vc-arch-root)
./lisp/vc/vc-git.el873:(defalias 'vc-git-responsible-p 'vc-git-root)
./lisp/vc/vc-bzr.el646:(defalias 'vc-bzr-responsible-p 'vc-bzr-root
./lisp/vc/vc-hg.el1177:(defalias 'vc-hg-responsible-p 'vc-hg-root)
./lisp/vc/vc-svn.el313:(defalias 'vc-svn-responsible-p 'vc-svn-root)
./lisp/vc/vc-mtn.el201:(defun vc-mtn-responsible-p (file) (vc-mtn-root file))

Then:

./lisp/vc/vc-rcs.el284:(defun vc-rcs-responsible-p (file)

(defun vc-rcs-responsible-p (file)
  (file-directory-p (expand-file-name "RCS"
                                      (if (file-directory-p file)
                                          file
                                        (file-name-directory file)))))

So, basically the same.

./lisp/vc/vc-dav.el142:(defun vc-dav-responsible-p (url)

(defun vc-dav-responsible-p (url)
  t)

:-/

./lisp/vc/vc-src.el248:(defun vc-src-responsible-p (file)

(defun vc-src-responsible-p (file)
  (file-directory-p (expand-file-name ".src"
                                      (if (file-directory-p file)
                                          file
                                        (file-name-directory file)))))


./lisp/vc/vc-sccs.el218:(defun vc-sccs-responsible-p (file)

This one is more complicated:

(defun vc-sccs-responsible-p (file)
  (or (file-directory-p (expand-file-name "SCCS" (file-name-directory file)))
      (stringp (vc-sccs-search-project-dir (or (file-name-directory file) "")
					   (file-name-nondirectory file)))))


./lisp/vc/vc-cvs.el319:(defun vc-cvs-responsible-p (file)

(defun vc-cvs-responsible-p (file)
  (file-directory-p (expand-file-name "CVS"
				      (if (file-directory-p file)
					  file
					(file-name-directory file)))))

So it looks like the only possibly problematic backend is SCCS?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2020-10-18  8:31 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21 15:15 bug#42966: 28.0.50; vc-dir: wrong backend Sam Steingold
2020-10-16  8:55 ` Lars Ingebrigtsen
2020-10-16 12:44   ` Dmitry Gutov
2020-10-16 14:41     ` Lars Ingebrigtsen
2020-10-16 14:44       ` Dmitry Gutov
2020-10-17  7:02         ` Lars Ingebrigtsen
2020-10-17  7:13         ` Lars Ingebrigtsen
2020-10-17  7:19           ` Lars Ingebrigtsen
2020-10-17 20:41             ` Dmitry Gutov
2020-10-18  8:26               ` Lars Ingebrigtsen
2020-10-17 20:44           ` Dmitry Gutov
2020-10-18  7:38             ` Michael Albinus
2020-10-23 23:53               ` Dmitry Gutov
2020-10-24 13:41                 ` Michael Albinus
2020-10-24 19:42                   ` Dmitry Gutov
2020-10-25 17:49                     ` Michael Albinus
2020-10-26 14:29                       ` Dmitry Gutov
2020-10-26 15:17                         ` Michael Albinus
2020-10-26 20:12                           ` bug#42966: (no subject) Lars Ingebrigtsen
2020-10-26 20:13                           ` Lars Ingebrigtsen
2020-10-26 20:55                             ` bug#42966: Dmitry Gutov
2020-10-26 21:02                               ` bug#42966: Lars Ingebrigtsen
2020-10-26 21:44                                 ` bug#42966: Dmitry Gutov
2020-10-26 21:11                           ` bug#42966: 28.0.50; vc-dir: wrong backend Dmitry Gutov
2020-10-18  8:32             ` Lars Ingebrigtsen
2020-10-16 15:35 ` Glenn Morris
2020-10-16 18:19   ` Dmitry Gutov
2020-10-17  6:06     ` Lars Ingebrigtsen
2020-10-17 20:01       ` Dmitry Gutov
2020-10-18  8:31         ` Lars Ingebrigtsen [this message]
2020-10-26 21:54         ` Glenn Morris
2020-10-26 21:58           ` Lars Ingebrigtsen
2020-10-26 22:14             ` Dmitry Gutov
2020-10-26 22:11           ` Dmitry Gutov

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

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

  git send-email \
    --in-reply-to=87eelwj5p1.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=42966@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=rgm@gnu.org \
    --cc=sds@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.