From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#37215: [PATCH] vc-cvs-ignore writes absolute filenames and duplicate strings Date: Wed, 22 Jan 2020 13:43:15 +0100 Message-ID: <87k15jy84c.fsf@gnus.org> References: <87imptwvoa.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="48304"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 37215@debbugs.gnu.org To: Wolfgang Scherer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 22 13:44:12 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 1iuFMh-000CWn-R1 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Jan 2020 13:44:11 +0100 Original-Received: from localhost ([::1]:41190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuFMg-0002Wg-S5 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Jan 2020 07:44:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46825) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuFMZ-0002W9-5z for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2020 07:44:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuFMY-0002eE-3G for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2020 07:44:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43161) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iuFMX-0002e6-WA for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2020 07:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iuFMX-0001wa-Su for bug-gnu-emacs@gnu.org; Wed, 22 Jan 2020 07:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Jan 2020 12:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37215 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 37215-submit@debbugs.gnu.org id=B37215.15796970057415 (code B ref 37215); Wed, 22 Jan 2020 12:44:01 +0000 Original-Received: (at 37215) by debbugs.gnu.org; 22 Jan 2020 12:43:25 +0000 Original-Received: from localhost ([127.0.0.1]:49134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuFLx-0001vW-Dv for submit@debbugs.gnu.org; Wed, 22 Jan 2020 07:43:25 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:59372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuFLw-0001vJ-5y for 37215@debbugs.gnu.org; Wed, 22 Jan 2020 07:43:24 -0500 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iuFLn-0002v5-Ng; Wed, 22 Jan 2020 13:43:18 +0100 In-Reply-To: (Wolfgang Scherer's message of "Sun, 5 Jan 2020 04:59:57 +0100") 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: 209.51.188.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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175063 Archived-At: Wolfgang Scherer writes: > Am 15.09.19 um 15:12 schrieb Lars Ingebrigtsen: >> Wolfgang Scherer writes: >> >>> + ;; FIXME this is a pcvs variable. >>> + (if (bound-and-true-p cvs-sort-ignore-file) >>> + (sort-lines nil (point-min) (point-max))) >> Does it make sense to heed a pcvs variable here? I think it would be >> surprising that vc-cvs behaves differently depending on whether you've >> loaded pcvs or not. > > Just to clarifiy: my patch does not introduce this FIXME. Only the > indentation is changed. This question should be handled in a separate > bug report. Right; sorry. Looking at the patch again, I don't quite get the logic here: > -(defun vc-cvs-ignore (file &optional _directory _remove) > - "Ignore FILE under CVS." > - (vc-cvs-append-to-ignore (file-name-directory file) file)) > +(defun vc-cvs-ignore (file &optional directory _remove) > + "Ignore FILE under CVS. > +FILE is either absolute or relative to DIRECTORY." > + (setq file (directory-file-name (expand-file-name file directory))) > + (vc-cvs-append-to-ignore (file-name-directory file) (file-name-nondirectory file))) This is basically (file-name-nondirectory (directory-file-name (expand-file-name "foo" directory))) isn't it? In what circumstances does that evaluate to something other than "foo"? That is, what DIRECTORY is doesn't seem to matter, if I'm reading this right? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no