From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: jca@wxcvbn.org (=?UTF-8?Q?J=C3=A9r=C3=A9mie_?= =?UTF-8?Q?Courr=C3=A8ges-Anglas?=) Newsgroups: gmane.emacs.bugs Subject: bug#24082: 25.1; vc-dir for CVS repositories list all files as if from toplevel directory Date: Mon, 10 Oct 2016 18:41:54 +0200 Message-ID: <877f9gqhpp.fsf@ritchie.wxcvbn.org> References: <87wphh67h9.fsf@xi.bootis> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1476117940 24827 195.159.176.226 (10 Oct 2016 16:45:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Oct 2016 16:45:40 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Cc: 24082@debbugs.gnu.org, Dmitry Gutov To: =?UTF-8?Q?G=C3=B6ktu=C4=9F?= Kayaalp Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 10 18:45:36 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btdhm-0005k3-OA for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Oct 2016 18:45:34 +0200 Original-Received: from localhost ([::1]:51465 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btdhl-000091-Cz for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 Oct 2016 12:45:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btdgM-0007Rz-GZ for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2016 12:44:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btdgI-0001K4-9F for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2016 12:44:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btdgI-0001Jx-5r for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2016 12:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1btdgI-0004OP-1I for bug-gnu-emacs@gnu.org; Mon, 10 Oct 2016 12:44:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <874m7crwv4.fsf@xi.bootis> Resent-From: jca@wxcvbn.org (=?UTF-8?Q?J=C3=A9r=C3=A9mie_?= =?UTF-8?Q?Courr=C3=A8ges-Anglas?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Oct 2016 16:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24082 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 24082-submit@debbugs.gnu.org id=B24082.147611778316802 (code B ref 24082); Mon, 10 Oct 2016 16:44:01 +0000 Original-Received: (at 24082) by debbugs.gnu.org; 10 Oct 2016 16:43:03 +0000 Original-Received: from localhost ([127.0.0.1]:51403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btdfK-0004Mk-NS for submit@debbugs.gnu.org; Mon, 10 Oct 2016 12:43:03 -0400 Original-Received: from chomsky.autogeree.net ([91.216.110.36]:48983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1btdfI-0004MG-Lu for 24082@debbugs.gnu.org; Mon, 10 Oct 2016 12:43:01 -0400 Original-Received: from ritchie.wxcvbn.org (localhost [127.0.0.1]) by wxcvbn.org (8.15.2/8.15.2) with ESMTP id u9AGfs0Z085064; Mon, 10 Oct 2016 18:41:54 +0200 (CEST) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:124308 Archived-At: G=C3=B6ktu=C4=9F Kayaalp writes: > On 2016-10-08 11:06:10 PM +0300, Dmitry Gutov wrote: >> On 08.10.2016 18:13, J=C3=A9r=C3=A9mie Courr=C3=A8ges-Anglas wrote: >>> Oops, sorry. Yes indeed, I only replaced `files' with `dir'. >> OK, good. Any obvious problems with that solution? [...] > > Does not show unregistered files at all, so need to add them from shell. > In fact, =E2=80=98cvs status=E2=80=99 command itself does not know anythi= ng about > unregistered files at all, it only deals with registered files. > >>> [... G=C3=B6ktu=C4=9F's patch works] fine, there are some differences. >> >> That's too bad. I've tried the patch myself, and I didn't see those,=20 >> neither [...] >> Might there be something special with the repo you're trying it on?=20 Well, the repo is a local mirror of the OpenBSD cvs repo, stored in /cvs (/d/cvs today, after I had to do partitioning changes). There may be special settings in that repo, but the /tmp/test repo set up by the script in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D24082#33 shows the same artifacts (see below). > I've been using the patch since I submitted it, first on 25.1 release > candidates and then on 25.1 release itself, and have not encountered any > of these problems. And most of my source-controlled stuff is in CVS. > I'd say the local configuration or the patch application may have caused > this problems. > > I'd be glad if J=C3=A9r=C3=A9mie Courr=C3=A8ges-Anglas could post output = from =E2=80=98cvs -fnq > update=E2=80=99 in that checkout, I could maybe use it to understand the > situation (BTW the =E2=80=98cvs -fn update -dP=E2=80=99 command I gave as= an example in > my previous message was mistaken, I took it from the =E2=80=98-=E2=80=99 = lines of the > patch, sorry). /usr/ports/editors$ cvs -fnq update ? emacs-wip ? unregistered-file M emacs/Makefile M emacs/distinfo M emacs/patches/patch-Makefile_in M emacs/patches/patch-configure R emacs/patches/patch-src_unexelf_c ? emacs/patches/patch-lisp_vc_vc-cvs_el ? emacs/patches/patch-lisp_vc_vc_el M emacs/pkg/PFRAG.no-no_x11 M emacs/pkg/PLIST The output is the same if I rename my ~/.cvsrc, which contains: --8<-- cvs -q diff -uNp update -Pd checkout -P -->8-- probably irrelevant, since you specify -f. Note that this is cvs from the base OpenBSD system: --8<-- $ cvs --version Concurrent Versions System (CVS) 1.11.1p1 (client/server) ... -->8-- which AFAIK doesn't contain differences wrt cvs update from upstream cvs-1.11.1p1. >>> So the patched version shows unregistered files and directories, which >>> is good, but has formatting artifacts (`.//' above). Also, pressing `= =3D' >>> on `.//emacs-wip', I get the following in *Messages*: >>> >>> ... >>> Traversing directory /usr/ports/editors/...done >>> Finding changes in /usr/ports/editors/emacs-wip... >>> vc-find-backend-function: Cannot open load file: No such file or direct= ory, vc-nil >>> >>> even though the directory contains a CVS dir, and cvs(1) works fine in >>> it. I don't think it's a big problem though. >> >> Agree, that doesn't sound like too big of a problem. >> >> And seeing unregistered files is pretty much working as intended. Alas,= =20 >> I see them in both versions of the code (the one using `dir', and the=20 >> one using 'cvs update'). > > I don't see unregistered files with the dir version. > >> Any ideas why you're seeing differently? Do you have a non-default value= =20 >> of vc-cvs-stay-local, maybe? I had it in my ~/.emacs.d/init.el (I since removed it), but I ran my tests with emacs -q, so it shouldn't affect the results anyway. Also note that the OpenBSD emacs package doesn't ship with a start file, so -q and -Q should be equivalent: /usr/local/share/emacs$ find . -name site-start.el /usr/local/share/emacs$ > If he's using the port from the repo in his message, the =E2=80=98lisp/vc= /vc.el=E2=80=99 > file seems to be patched and that may be conflicting. If possible, I > ask J=C3=A9r=C3=A9mie to test my patch on master or 25.1 release without = all those > other patches, (applying it on package root w/ =E2=80=98patch -p 0=E2=80= =99), and > running emacs w/ -Q flag. Here's the patch you spotted, it suppresses messages that slow down vc-dir processes, but shouldn't affect the inner workings of vc-cvs. Note that I first tested your patch using the master branch of the git repo, which doesn't contain the patch below. ;$OpenBSD$ ; ;- kill messages that slow down emacs at startup with many vc-dir opened. ; ;--- lisp/vc/vc.el.orig Mon Oct 3 23:42:15 2016 ;+++ lisp/vc/vc.el Mon Oct 3 23:43:16 2016 ;@@ -2897,13 +2897,11 @@ to provide the `find-revision' operation instead." ; (defun vc-file-tree-walk (dirname func &rest args) ; "Walk recursively through DIRNAME. ; Invoke FUNC f ARGS on each VC-managed file f underneath it." ;- (vc-file-tree-walk-internal (expand-file-name dirname) func args) ;- (message "Traversing directory %s...done" dirname)) ;+ (vc-file-tree-walk-internal (expand-file-name dirname) func args)) ;=20 ; (defun vc-file-tree-walk-internal (file func args) ; (if (not (file-directory-p file)) ; (when (vc-backend file) (apply func file args)) ;- (message "Traversing directory %s..." (abbreviate-file-name file)) ; (let ((dir (file-name-as-directory file))) ; (mapcar ; (lambda (f) (or For completeness, here are the results with: 1. /usr/ports/editors, using emacs-25.1 and your patch --8<-- VC backend : CVS Working dir: /usr/ports/editors/ Repository : /d/cvs Module : ports/editors ./ unregistered .//emacs-wip unregistered .//unregistered-file emacs/ edited .//emacs/Makefile edited .//emacs/distinfo emacs/patches/ edited .//emacs/patches/patch-Makefile_in edited .//emacs/patches/patch-configure unregistered .//emacs/patches/patch-lisp_vc_vc-cvs_el removed .//emacs/patches/patch-src_unexelf_c emacs/pkg/ edited .//emacs/pkg/PFRAG.no-no_x11 edited .//emacs/pkg/PLIST -->8-- 2. your /tmp/test testcase, from the cli and from vc, using emacs-master: /tmp/test$ cvs -fnq update M testfil M subdir/subfil /tmp/test$ emacs -Q . --8<-- VC backend : CVS Working dir: /tmp/test/ Repository : /tmp/cvsroot/ Module : test ./ edited .//testfil subdir/ edited .//subdir/subfil -->8-- 3. your /tmp/test testcase, from vc, using emacs-master and your patch: /tmp/test$ $HOME/src/emacs-master/src/emacs -Q . --8<-- VC backend : CVS Working dir: /tmp/test/ Repository : /tmp/cvsroot/ Module : test ./ edited .//testfil subdir/ edited .//subdir/subfil -->8-- --=20 jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE