From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#58525: 28.1: `vc-dir' (key sequence: C-x v d) fails when used with a CVS repository Date: Mon, 17 Oct 2022 09:06:54 +0300 Message-ID: <837d0z3rwh.fsf@gnu.org> References: <2011444375.1250404.1665768998367.ref@mail.yahoo.com> <2011444375.1250404.1665768998367@mail.yahoo.com> <83wn926yqv.fsf@gnu.org> <1786309111.1655909.1665958001583@mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5761"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58525@debbugs.gnu.org To: Mark Harig Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 17 08:09:37 2022 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 1okJJg-0001Hr-OK for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Oct 2022 08:09:37 +0200 Original-Received: from localhost ([::1]:35812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okJJf-0007Rl-7N for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Oct 2022 02:09:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okJIC-0007Nl-G0 for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2022 02:08:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okJIA-0006OV-Dy for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2022 02:08:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okJIA-0006RS-8E for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2022 02:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Oct 2022 06:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58525 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 58525-submit@debbugs.gnu.org id=B58525.166598683724705 (code B ref 58525); Mon, 17 Oct 2022 06:08:02 +0000 Original-Received: (at 58525) by debbugs.gnu.org; 17 Oct 2022 06:07:17 +0000 Original-Received: from localhost ([127.0.0.1]:46921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okJHR-0006QP-Ab for submit@debbugs.gnu.org; Mon, 17 Oct 2022 02:07:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okJHO-0006Q9-0V for 58525@debbugs.gnu.org; Mon, 17 Oct 2022 02:07:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38910) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okJHH-0006Jk-Hg; Mon, 17 Oct 2022 02:07:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=6kQIHAI1cxihW5ud/0Ecr5BEr4chReFMTB+66BFNJdA=; b=BDrk6lbSoJabfIwO4HsQ Bn5XP2hdF3aYGrN4msReWGdQlN4mZSYjxW+rJj2YaMAdswqxb0YNDplTLIlPPPW2ghu5mJt+tiKJw CGl7dWqwV8uH2eqqwXhg9pkLsA99n9eHFCi98dM3BMF0rcJBuRATawCarXSMwnypgibGLhVmpufEW 06Fo6ZMBkDa/ShOmuJzNi3YBvNcW2xZ+u5IRkuD+x8Kp0LzGiXb1fuK3i8EPiIA2VwyFpLD3rU21G OG3ob64kgxlP+s0Beqmin1kgcTXDFNK3vM8UB99oZ1VvipWIF/d/jtHRIb2zfLHk1mxK7q8FqxiKP NZmRwLm9mXx1zw==; Original-Received: from [87.69.77.57] (port=1709 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okJHH-0003m7-53; Mon, 17 Oct 2022 02:07:07 -0400 In-Reply-To: <1786309111.1655909.1665958001583@mail.yahoo.com> (message from Mark Harig on Sun, 16 Oct 2022 22:06:41 +0000 (UTC)) 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:245687 Archived-At: > Date: Sun, 16 Oct 2022 22:06:41 +0000 (UTC) > From: Mark Harig > Cc: "58525@debbugs.gnu.org" <58525@debbugs.gnu.org> > > > I'm not sure I understand the reason for this elaborate > > setup. > > The reason for it is to provide a means to reproduce the > problem, starting with a newly-created CVS repository (in > ~/tmp1), a small number of (empty) files in the new > repository, a separate work directory (~/tmp3) into which > the files are "checked-out" from the new repository, and an > Emacs session with no local customization. Doing this > eliminates possible complications that could be a source of > the problem reported. > > > It sounds like CVSROOT is in ~/tmp1, but you expect Emacs > > to understand that ~/tmp3/project1, which is outside of > > the ~/tmp1 tree, is part of the CVS repository in ~/tmp1?  > > Why is the correct expectation? > > It is correct that the *repository* is in ~/tmp1. But the > repository could be remote and accessed, for example, using > ssh. It is not necessary to be in the directory that > contains the CVS repository. Users of the (central) > repository do not need direct access to the CVSROOT > directory and do not even need to know that it exists. All > access (reading/writing/differences/status/logging) to the > CVS repository are done via the cvs commands. We seem to be using "repository" in different meanings here. What I mean by that is the local checkout of the (potentially) remote upstream repository. AFAIK, the VC's support for CVS is based on detecting the CVS subdirectory of a directory where you invoke vc-dir. If that subdirectory is not found, VC will assume the backend is not CVS. In which case your assumptions seem to be mistaken. But I will let VC expert to chime in here, because I may be wrong or confused. > > FWIW, "C-x v d" in a CVS repository (i.e. a directory > > which has a 'CVS' subdirectory) does not signal an error, > > and displays the correct VC status of the files. > > What you have described is what is supposed to happen (using > Emacs 28.1), but it does not. Instead, `emacs -Q' issues the > error message listed in the original error report. (I have > confirmed this multiple times following the instructions in > the original report.) Doesn't happen to me with Emacs 28, FWIW. But I did that without creating a new repository from scratch; I just used an existing checkout of some CVS repository I have here. So maybe something in your complex recipe trips Emacs? > Note that if `C-x v d' is issued for ~/tmp1 (which contains > the CVSROOT and project1 sub-directories), then `vc-dir' > makes two errors: > > 1. There is no CVS sub-directory in ~/tmp1 and no Root text > file, so `vc-dir' should issue an error indicating that > there it cannot recognize any VC backend or that there is no > means for it to get the status of the files in the > sub-directory. That is what happens for me: Emacs says "No VC backend is responsible for ~/tmp1". > 2. In addition to failing to recognize the absence of a VC > backend, `vc-dir’ makes the mistake of displaying a *vc-dir* > buffer with an invalid status. In the *vc-dir* buffer, the > first line listed is: > > VC backend : Git Doesn't happen here. I also reproduced your setup from the original report, and I don't see the problems you reported. vc-dir behaves correctly for me in that case, recognizing tmp3/project1 as being under CVS and showing the status buffer as expected, without any errors. So I wonder why you see these problems and I don't. Are you sure there are no old vc*.el files on your system that shadow the ones provided with Emacs? > For completeness, here are the versions of the tools used to > create the problem: bash-5.2.2, cvs-1.11.23, emacs-28.1. Emacs 28.1, Bash 4.4.20, CVS 1.12.13 here.