From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Wolfgang Scherer Newsgroups: gmane.emacs.bugs Subject: bug#37216: [PATCH] vc-svn-ignore sets incorrect properties for relative filenames Date: Thu, 29 Aug 2019 01:39:48 +0200 Message-ID: <3df2dec6-18c5-ff65-cfa0-408bc5212b4e@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------5B3BF8C4BFE6355B74083AB8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="154998"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 To: 37216@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 29 01:41:38 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i37ZH-000e74-IC for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Aug 2019 01:41:36 +0200 Original-Received: from localhost ([::1]:43756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i37ZF-0006z5-VP for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Aug 2019 19:41:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55498) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i37Yl-0006yz-7s for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2019 19:41:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i37Yk-0007pn-7X for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2019 19:41:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42564) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i37Yk-0007pj-3z for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2019 19:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i37Yj-0000LX-Vr for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2019 19:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Wolfgang Scherer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Aug 2019 23:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37216 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: Emacs Bugs Original-Received: via spool by submit@debbugs.gnu.org id=B.15670356041242 (code B ref -1); Wed, 28 Aug 2019 23:41:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Aug 2019 23:40:04 +0000 Original-Received: from localhost ([127.0.0.1]:51385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i37Xo-0000Jy-2l for submit@debbugs.gnu.org; Wed, 28 Aug 2019 19:40:04 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i37Xl-0000Jf-LB for submit@debbugs.gnu.org; Wed, 28 Aug 2019 19:40:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55318) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i37Xk-0006ge-DX for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2019 19:40:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i37Xj-0007R0-Cw for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2019 19:40:00 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:57245) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i37Xi-0007Q0-Vp for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2019 19:39:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1567035591; bh=c8YXzinylYVv/rokX80cSePx2n+bhvJw5EKsDPNlUak=; h=X-UI-Sender-Class:To:From:Subject:Date; b=jYGdNsYGTMqxc2kboddO9vC7vQjjoPMtLXyW5tNjcTffIx9exctlAa3OMbB84jqLz cC0nPJvfGD5j9ib4FpccQtJjqWhuM/Sa6/lJ/NP0T5oJzuAFRk7uS1X2lw9nGMdqhb YmGs90C34Vi6KG7mP4I0sn2XZCooQQKJbdIDVJJ4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from sheckley.simul.de ([87.144.41.174]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MPGRp-1hqoOJ3eaT-00PgBP for ; Thu, 29 Aug 2019 01:39:50 +0200 Original-Received: from [127.0.0.1] (sheckley.simul.de [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sheckley.simul.de (Postfix) with ESMTPSA id A723E1942B05 for ; Thu, 29 Aug 2019 01:39:48 +0200 (CEST) Openpgp: preference=signencrypt Autocrypt: addr=Wolfgang.Scherer@gmx.de; prefer-encrypt=mutual; keydata= xsDiBEb46IgRBACMHOAb1KNo1Ylk+ebri+4R+bG4tyKlqBlrpv8D9/ZwRdXSGt+0DyCHoaAd 7KW7noHapLe87DunABOjKG4nqTGv+dRiWuUBlp3I4aYRFDVa3Da+XnIYkMHKqhK59VEHQCdp Km42nuLS7TS+n99at9YwzTG6VBdOlBKTlRFngOjVLwCg1RGXJ6X3EjS1FKCQ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dTlQe5u17RshMnI314ENjdOyDUCKrOv8ZvnrSPxj4/p9nmTH5VXiOrdizi71eGipAJZ 6RREc2rR50+Xo/a2HmFdDvZuzruJJGQg4D1ZzouqMrmWHCTFPqoxjr3DUL8Crfg/de0A+yZkr KRWNLoZ/4V1HZwenjuFi9HgwG3XU185LxFEJerTFWe4mxF5u30QsL4LJQJ8sYGoEiQC/c4D47 frdxDTOy6PD3dgAtBRcH0Kx+Yij56Dg5vtWURGRvFFmo3rtppxhG4KMTJJvl98apV/mpcUOCm aIVKYKbx3Ww4+Yi5UXhdFClILAOrqr8H3r4GaJBi0TKVCbVlIYfiydVkYpLHo2PnGCOwFmtMM jZRFAPseCgdYAPAamkMBdhtIXhGtZ/VNW58ibBvGwfwu4/RzRsxpe7nfexcOYQDCfNaH1J5Fl D6ypOzJTU0V6yDCuuqr6ps8rlWd6JHVzB9RuMpwinxpTfI33RB2uXGC20lZ6WRlEQEcfvxBIX e2sC2d7cuikV+xps+AR+WBe0yDwpsQZnwdmSPK+bPoUSOAPrHY0dzyAjfZFd3CBLD12rnXfTi zx13ZT1S+1zhs2i7lHPbDHbMP1P2RB0riD7KTjOCLLwoDauvC1zvhCHAwUBNmFmQx+Zj9ytL X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:166030 Archived-At: This is a multi-part message in MIME format. --------------5B3BF8C4BFE6355B74083AB8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit If a relative filename has at least one level of parent directories, `vc-svn-ignore' fails to add the ignore spec to the correct subdirectory. The attached patch fixes that error. --------------5B3BF8C4BFE6355B74083AB8 Content-Type: text/x-patch; name="0001-Set-correct-svn-ignore-property-for-relative-filenam.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename*0="0001-Set-correct-svn-ignore-property-for-relative-filenam.pa"; filename*1="tch" =46rom dc6484a72161c251e213d40ea1b750b3a366608c Mon Sep 17 00:00:00 2001 From: Wolfgang Scherer Date: Thu, 29 Aug 2019 01:37:23 +0200 Subject: [PATCH] Set correct svn:ignore property for relative filenames * lisp/vc/vc-svn.el: (vc-svn-ignore) Use svn:ignore property of immediate parent directory for wildcard specification. =2D-- lisp/vc/vc-svn.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 3c50c8f..7196394 100644 =2D-- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el @@ -353,15 +353,18 @@ to the SVN command." (defun vc-svn-ignore (file &optional directory remove) "Ignore FILE under Subversion. -FILE is a file wildcard, relative to the root directory of DIRECTORY." - (let* ((ignores (vc-svn-ignore-completion-table directory)) - (file (file-relative-name file directory)) +FILE is a wildcard specification, either relative to +DIRECTORY or absolute." + (let* ((path (directory-file-name (expand-file-name file directory))) + (directory (file-name-directory path)) + (file (file-name-nondirectory path)) + (ignores (vc-svn-ignore-completion-table directory)) (ignores (if remove (delete file ignores) (push file ignores)))) (vc-svn-command nil 0 nil nil "propset" "svn:ignore" (mapconcat #'identity ignores "\n") - (expand-file-name directory)))) + directory))) (defun vc-svn-ignore-completion-table (directory) "Return the list of ignored files in DIRECTORY." =2D- 2.7.4 --------------5B3BF8C4BFE6355B74083AB8--