From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#42966: 28.0.50; vc-dir: wrong backend Date: Sun, 18 Oct 2020 10:31:38 +0200 Message-ID: <87eelwj5p1.fsf@gnus.org> References: <54k0vq420i.fsf@fencepost.gnu.org> <87pn5h1j4b.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27620"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Glenn Morris , sds@gnu.org, 42966@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 18 10:32:16 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kU46x-000730-Di for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Oct 2020 10:32:15 +0200 Original-Received: from localhost ([::1]:58552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kU46w-0006dk-0k for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Oct 2020 04:32:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kU46k-0006dL-MQ for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2020 04:32:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kU46k-0005HP-Cb for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2020 04:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kU46k-0008RP-6x for bug-gnu-emacs@gnu.org; Sun, 18 Oct 2020 04:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Oct 2020 08:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42966 X-GNU-PR-Package: emacs Original-Received: via spool by 42966-submit@debbugs.gnu.org id=B42966.160300991031937 (code B ref 42966); Sun, 18 Oct 2020 08:32:02 +0000 Original-Received: (at 42966) by debbugs.gnu.org; 18 Oct 2020 08:31:50 +0000 Original-Received: from localhost ([127.0.0.1]:36153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kU46Y-0008Il-9F for submit@debbugs.gnu.org; Sun, 18 Oct 2020 04:31:50 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:48866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kU46W-0008DG-Ct for 42966@debbugs.gnu.org; Sun, 18 Oct 2020 04:31:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vuqWUXsKmSUEzMAIKuOSEYZ7EjZMkeFwQomyh3VltJc=; b=Ev/CoW3xqV9A7EXjDwx486EIlZ GTS8v+KqE2q+yfdsohgwyyaVpjEB5If9WRliwd48cuQWFvvQlTUpXLYYJMXp9YsGoKxltZIVTWsGq IH1qF9ddtqcTFwZdXUyQhXu956/6xQpH+EGP3OulXaLI5nFhBQhH9X211o5gqyH0oPi4=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kU46N-0006UO-P8; Sun, 18 Oct 2020 10:31:42 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEVDNUhYT2KHdIYf GCT0zK+oXWX////KAn60AAAAAWJLR0QGYWa4fQAAAAd0SU1FB+QKEgciIGgyBOwAAAG7SURBVDjL XZRBcsMgDEWlquzBHvY2SfakTA/Qjr13Oub+V6mEwNAyWWT0pP9BCAMAoHV1TZQSB6z8Iv+BC9yS LECnoFVMISRdkg14FTgXbqmhCBYHsAzAdXMX1g6InTq4UwMp4VhxXzqA0eP+TQ1E7CCE+zZ386sk CLhdQCuwgu/5OmIBVk4Z2GNu5qjnsKI3jQcEBQQqlkYgyaCdWUZQmkjFy7awycXcWqBS0uJ+24oU WydJqDuKHFeA5V7AaTfAnwr6BZd05/N2ASpAlPBV8qsUJQHISv5lNN5AqWPXPNd4ATMUQNHl/Lnl LkUVPH0+TB6kSDdFbz4TXlLcQQUoIJpt8KCyW5yRwXsHFitIi8/QAceoaGGyJhszANSOTOTM8e4H DwbiFGg1x3mMB+Qbj8iPZkV77gOQKREaA1q//QM8IPNHsHB5XyC4eXossfV2yxVMqyOew96RrHfq pgViCKuFP8AKwGd4vJz1/yr4UcXw+Fmduu/b0QDPFLKWU5PcgeMR4We+Kjh3HajyDig9xV7BVywf DlAgYk7c9/OQgUYlc5m2qQJTkgWgTnpEnsM9v7wagzyoOtEK8i+W2o66dNtRxAAAACV0RVh0ZGF0 ZTpjcmVhdGUAMjAyMC0xMC0xOFQwNzozNDozMiswMDowMGkk31EAAAAldEVYdGRhdGU6bW9kaWZ5 ADIwMjAtMTAtMThUMDc6MzQ6MzIrMDA6MDAYeWftAAAAAElFTkSuQmCC X-Now-Playing: Rocket To The Sky's _Cigars_: "Cigars" In-Reply-To: (Dmitry Gutov's message of "Sat, 17 Oct 2020 23:01:09 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:190872 Archived-At: Dmitry Gutov 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