unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: jca@wxcvbn.org (Jérémie Courrèges-Anglas)
To: "Göktuğ Kayaalp" <self@gkayaalp.com>
Cc: 24082@debbugs.gnu.org, Dmitry Gutov <dgutov@yandex.ru>
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	[thread overview]
Message-ID: <877f9gqhpp.fsf@ritchie.wxcvbn.org> (raw)
In-Reply-To: <874m7crwv4.fsf@xi.bootis>

Göktuğ Kayaalp <self@gkayaalp.com> writes:

> On 2016-10-08 11:06:10 PM +0300, Dmitry Gutov <dgutov@yandex.ru> wrote:
>> On 08.10.2016 18:13, Jérémie Courrèges-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, ‘cvs status’ command itself does not know anything about
> unregistered files at all, it only deals with registered files.
>
>>> [... Göktuğ's patch works] fine, there are some differences.
>>
>> That's too bad. I've tried the patch myself, and I didn't see those, 
>> neither [...]
>> Might there be something special with the repo you're trying it on? 

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=24082#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érémie Courrèges-Anglas could post output from ‘cvs -fnq
> update’ in that checkout, I could maybe use it to understand the
> situation (BTW the ‘cvs -fn update -dP’ command I gave as an example in
> my previous message was mistaken, I took it from the ‘-’ 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 `='
>>> 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 directory, 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, 
>> I see them in both versions of the code (the one using `dir', and the 
>> 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 
>> 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 ‘lisp/vc/vc.el’
> file seems to be patched and that may be conflicting.  If possible, I
> ask Jérémie to test my patch on master or 25.1 release without all those
> other patches, (applying it on package root w/ ‘patch -p 0’), 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))
; 
; (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--

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE





  parent reply	other threads:[~2016-10-10 16:41 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26 20:02 bug#24082: 25.1; vc-dir for CVS repositories list all files as if from toplevel directory Göktuğ Kayaalp
2016-07-30  0:35 ` bug#24082: vc-dir changes working directory (git backend) Steve Revilak
2016-10-06 23:32   ` Dmitry Gutov
2016-08-28 20:17 ` bug#24082: [PATCH] Use ‘cvs update’ instead ‘cvs status’ for CVS *vc-dir* buffers Göktuğ Kayaalp
2016-10-06 23:25   ` Dmitry Gutov
2016-10-07 19:29     ` Göktuğ Kayaalp
2016-10-08  1:01       ` Dmitry Gutov
2016-10-08  1:04       ` Dmitry Gutov
2016-10-12  0:59         ` Dan Nicolaescu
2016-10-13 18:10           ` Göktuğ Kayaalp
2016-10-22  1:34             ` Dan Nicolaescu
2016-10-05 18:31 ` bug#24082: Update Göktuğ Kayaalp
2016-10-05 18:33   ` Eli Zaretskii
2016-10-07 14:45 ` bug#24082: 25.1; vc-dir for CVS repositories list all files as if from toplevel directory Jérémie Courrèges-Anglas
2016-10-08  0:38   ` Dmitry Gutov
2016-10-08 15:13     ` Jérémie Courrèges-Anglas
2016-10-08 20:06       ` Dmitry Gutov
2016-10-09 12:18         ` Göktuğ Kayaalp
2016-10-10 23:55           ` Dmitry Gutov
2016-10-11  2:09             ` Göktuğ Kayaalp
2016-10-11  7:51               ` Andreas Schwab
2016-10-11  8:51               ` Dmitry Gutov
2016-10-11 15:48                 ` Göktuğ Kayaalp
2016-10-10 16:41 ` Jérémie Courrèges-Anglas [this message]
2016-10-13 18:47   ` Göktuğ Kayaalp
2016-10-14 20:33     ` Jérémie Courrèges-Anglas
2016-10-15 12:36       ` Dmitry Gutov
2016-10-15 13:20         ` Göktuğ Kayaalp
2016-10-15 14:06           ` Jérémie Courrèges-Anglas
2016-10-15 17:26             ` Göktuğ Kayaalp
2016-10-15 21:36             ` Dmitry Gutov
2016-10-16  0:03               ` Göktuğ Kayaalp
2016-10-16 12:38                 ` Jérémie Courrèges-Anglas
2016-10-16 14:07                   ` Dmitry Gutov
2016-10-16 14:23                     ` Eli Zaretskii
2016-10-16 15:58                       ` Dmitry Gutov
2016-10-16 17:58                         ` Eli Zaretskii
2016-10-18  0:04                           ` Dmitry Gutov
2016-10-18 17:35                             ` Göktuğ Kayaalp

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=877f9gqhpp.fsf@ritchie.wxcvbn.org \
    --to=jca@wxcvbn.org \
    --cc=24082@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=self@gkayaalp.com \
    /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).