From unknown Sun Jun 22 07:50:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18619: 24.3.93; vc-svn-ignore is broken Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Oct 2014 02:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18619 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 18619@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.141230180026908 (code B ref -1); Fri, 03 Oct 2014 02:04:01 +0000 Received: (at submit) by debbugs.gnu.org; 3 Oct 2014 02:03:20 +0000 Received: from localhost ([127.0.0.1]:59606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZsDI-0006zv-3T for submit@debbugs.gnu.org; Thu, 02 Oct 2014 22:03:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48071) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZsDF-0006zm-ES for submit@debbugs.gnu.org; Thu, 02 Oct 2014 22:03:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZsD9-0002Ap-5G for submit@debbugs.gnu.org; Thu, 02 Oct 2014 22:03:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZsD9-0002Ad-1d for submit@debbugs.gnu.org; Thu, 02 Oct 2014 22:03:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZsD2-00013G-MY for bug-gnu-emacs@gnu.org; Thu, 02 Oct 2014 22:03:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZsCw-00025W-La for bug-gnu-emacs@gnu.org; Thu, 02 Oct 2014 22:03:04 -0400 Received: from mail-lb0-x22d.google.com ([2a00:1450:4010:c04::22d]:60959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZsCw-000256-Dt for bug-gnu-emacs@gnu.org; Thu, 02 Oct 2014 22:02:58 -0400 Received: by mail-lb0-f173.google.com with SMTP id 10so250046lbg.18 for ; Thu, 02 Oct 2014 19:02:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=BVprI0P9MnLA1rgSBe2TCINtWd0zACh8UnJDkk+rpqk=; b=E6C1RV9NQ3ZlXLQRtIYXaqr+vL7k2Ei9kRWHLiacyO8qcUBlI+/9q4sbkxKLk28+Rw uyqIO8vTF0RyuBd46tG11bjvabdK0+WOjnPIE69AzW4HPHXPL2q2WVyWKSGM10Q8PfF5 8Hg8rOgqRhjM9m0Vw3dwjrsNC1C3YLoSh3kaEfJc77BzamTjcQFAv7saqHnT4Aui7mrC Hk7jBq4lBLxYSikWr02Or2GK6TQc3RZ6tbBqmiTbO+hEorNDYw3gNC7hhKynIW8JsHMU g/5Ou+UPDmyBVQaIb9Y95fjihRwtYXXti3hrU/PWQRhVWKsRQ0mJspkXKs/VmemaSaPF N2iA== X-Received: by 10.112.180.137 with SMTP id do9mr2125908lbc.63.1412301777145; Thu, 02 Oct 2014 19:02:57 -0700 (PDT) Received: from axl ([178.252.98.87]) by mx.google.com with ESMTPSA id x1sm2158520lag.16.2014.10.02.19.02.56 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 02 Oct 2014 19:02:56 -0700 (PDT) From: Dmitry Gutov Date: Fri, 03 Oct 2014 06:02:55 +0400 Message-ID: <86lhoxucz4.fsf@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Tags: patch It plainly doesn't work: gives an error when called on an unregistered file, or (maybe, haven't tested) succeeds and does nothing when called on a registered file. The way it's currently written is wrong. I don't think there's a way to do "add this file to ignores" in one command invocation. SVN has "propget" and "propset" commands, the value has to be a list of wildcards to ignore, one per line, and it needs to be set on a parent directory, not on the file itself, like the current code tries to do. The attached patch mostly takes care of this. The change to `vc-ignore' is needed because this property doesn't work with absolute paths. And passing a relative path to backend `ignore' implementations make sense anyway. In GNU Emacs 24.3.93.4 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2014-09-19 on axl Repository revision: 117510 juri@jurta.org-20140918205955-kwp5ckzrk2l4w1km Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Ubuntu 14.04.1 LTS === modified file 'lisp/vc/vc-svn.el' --- lisp/vc/vc-svn.el 2014-01-01 07:43:34 +0000 +++ lisp/vc/vc-svn.el 2014-10-03 01:51:12 +0000 @@ -354,14 +354,22 @@ (concat "-r" rev)) (vc-switches 'SVN 'checkout)))) -(defun vc-svn-ignore (file &optional _directory _remove) +(defun vc-svn-ignore (file &optional directory remove) "Ignore FILE under Subversion. FILE is a file wildcard, relative to the root directory of DIRECTORY." - (vc-svn-command t 0 file "propedit" "svn:ignore")) + (let* ((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)))) -(defun vc-svn-ignore-completion-table (_file) - "Return the list of ignored files." - ) +(defun vc-svn-ignore-completion-table (directory) + "Return the list of ignored files in DIRECTORY." + (with-temp-buffer + (vc-svn-command t t nil "propget" "svn:ignore" (expand-file-name directory)) + (split-string (buffer-string)))) (defun vc-svn-find-admin-dir (file) "Return the administrative directory of FILE." === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2014-01-01 07:43:34 +0000 +++ lisp/vc/vc.el 2014-10-03 01:58:18 +0000 @@ -1370,7 +1370,9 @@ (let* ((directory (or directory default-directory)) (backend (or (vc-responsible-backend default-directory) (error "Unknown backend")))) - (vc-call-backend backend 'ignore file directory remove))) + (vc-call-backend backend 'ignore + (file-relative-name file directory) + directory remove))) (defun vc-default-ignore (backend file &optional directory remove) "Ignore FILE under the VCS of DIRECTORY (default is `default-directory'). From unknown Sun Jun 22 07:50:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18619: 24.3.93; vc-svn-ignore is broken Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Oct 2014 02:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18619 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Dmitry Gutov Cc: 18619@debbugs.gnu.org Received: via spool by 18619-submit@debbugs.gnu.org id=B18619.141230436731178 (code B ref 18619); Fri, 03 Oct 2014 02:47:01 +0000 Received: (at 18619) by debbugs.gnu.org; 3 Oct 2014 02:46:07 +0000 Received: from localhost ([127.0.0.1]:59626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZssg-00086m-MI for submit@debbugs.gnu.org; Thu, 02 Oct 2014 22:46:07 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:49341) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZssf-00086c-46 for 18619@debbugs.gnu.org; Thu, 02 Oct 2014 22:46:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="91548503" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Oct 2014 22:46:04 -0400 Received: by pastel.home (Postfix, from userid 20848) id 0CD314820; Thu, 2 Oct 2014 22:46:04 -0400 (EDT) From: Stefan Monnier Message-ID: References: <86lhoxucz4.fsf@yandex.ru> Date: Thu, 02 Oct 2014 22:46:04 -0400 In-Reply-To: <86lhoxucz4.fsf@yandex.ru> (Dmitry Gutov's message of "Fri, 03 Oct 2014 06:02:55 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > The attached patch mostly takes care of this. The change to `vc-ignore' > is needed because this property doesn't work with absolute paths. And > passing a relative path to backend `ignore' implementations make sense > anyway. The vc-svn.el change is fine for emacs-24 since the existing code is indeed hopelessly broken (so it won't be worse in any case). But could you explain why you think the vc.el change is safe (I can agree it makes sense, but I want to be extra sure the change is safe). Stefan From unknown Sun Jun 22 07:50:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18619: 24.3.93; vc-svn-ignore is broken Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Oct 2014 03:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18619 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 18619@debbugs.gnu.org Received: via spool by 18619-submit@debbugs.gnu.org id=B18619.14123085269852 (code B ref 18619); Fri, 03 Oct 2014 03:56:01 +0000 Received: (at 18619) by debbugs.gnu.org; 3 Oct 2014 03:55:26 +0000 Received: from localhost ([127.0.0.1]:59639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZtxk-0002Yn-H7 for submit@debbugs.gnu.org; Thu, 02 Oct 2014 23:55:24 -0400 Received: from mail-lb0-f179.google.com ([209.85.217.179]:59014) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZtxi-0002Yc-8B for 18619@debbugs.gnu.org; Thu, 02 Oct 2014 23:55:23 -0400 Received: by mail-lb0-f179.google.com with SMTP id l4so344265lbv.10 for <18619@debbugs.gnu.org>; Thu, 02 Oct 2014 20:55:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=l2s0guiLeRs8GCYsMMWiCEm1Y9WGBunwKxrCC41VHJg=; b=Z8z3WIXh9ZIbOTwkcHruRpDB2rrZdno8OfwRQRwfmpmFUhROtgxxCK04YAy+8zy91l po6OzckqJYrwTaEGVku/Bn61JY+hyCMvlw5O9Zr4XpPnXp8J2lHiL8iwcatfbn87iib1 cpAqQKYZ+3jRMvLe6kGhTot2Pge2x1nh4LMLxLVhBEsmZgUuwwiwWp0wZrBmzFU72Yxc FeVM4TLlpnMSwQsD1yyiIW2kKOyPRyNXnL0GbhMxuU2txYTIIpM6yUiOi+ana9PBdm6x tl0UQ4cNL5/fR/8K3QmDwnn4QG4IjAJGJ2HQSvlEAnBlhHBGWN57V87wzQFvgvmQT8ff 5KtQ== X-Received: by 10.112.54.130 with SMTP id j2mr2516944lbp.41.1412308520859; Thu, 02 Oct 2014 20:55:20 -0700 (PDT) Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id l3sm2222383laa.37.2014.10.02.20.55.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Oct 2014 20:55:20 -0700 (PDT) Message-ID: <542E1E27.9090405@yandex.ru> Date: Fri, 03 Oct 2014 07:55:19 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 References: <86lhoxucz4.fsf@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 10/03/2014 06:46 AM, Stefan Monnier wrote: > But could you explain why you think the vc.el change is safe (I can agree > it makes sense, but I want to be extra sure the change is safe). Actually, I'm not sure that it's safe. Looking at `vc-default-ignore', it seems we're expected to obtain the relative path in the backend implementation functions. This works, too, and limits the changes to `vc-svn.el'. From unknown Sun Jun 22 07:50:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18619: 24.3.93; vc-svn-ignore is broken Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Oct 2014 04:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18619 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 18619@debbugs.gnu.org Received: via spool by 18619-submit@debbugs.gnu.org id=B18619.141230931111134 (code B ref 18619); Fri, 03 Oct 2014 04:09:01 +0000 Received: (at 18619) by debbugs.gnu.org; 3 Oct 2014 04:08:31 +0000 Received: from localhost ([127.0.0.1]:59643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZuAQ-0002tW-W8 for submit@debbugs.gnu.org; Fri, 03 Oct 2014 00:08:31 -0400 Received: from mail-lb0-f170.google.com ([209.85.217.170]:58875) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZuAO-0002tN-NG for 18619@debbugs.gnu.org; Fri, 03 Oct 2014 00:08:29 -0400 Received: by mail-lb0-f170.google.com with SMTP id u10so354350lbd.15 for <18619@debbugs.gnu.org>; Thu, 02 Oct 2014 21:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=RAqefs/96K0ce3P/6zrfM9iwRrz7fiNKGspBsXoVgr0=; b=OF86Ld/ICr6O4Ri2bEev9gqHzpXkWHI10k2zz7CzkU25sDlA/zHPDpc06fjPzEj4XX Vx2lHZue5y4l8kmZVFyUZawZHiYxsNr0RimLb/vhDseVjOgfwyqaxNVN3CVVlT5QSQOV elvtIl61gxtjt2f5UDKBAwN2BuA2x92s+zEwqNwqQiKTgcmBFs5yKkRbIIeDVIzO7YHK kD0XFzaUBCcX9yY0P2VjLnJ5qcXhmDQ7e+mUe1kFF9uRVpHn0Ir2+BEP6Xh07GbXL+P8 EWAkbESizU9x5/CCUt2BZYXRXzZM+AvHReaf/h/NbBK/YIoe8ezhfZ5aSh8g9geUYSgU 5NSw== X-Received: by 10.152.197.35 with SMTP id ir3mr2883087lac.82.1412309307790; Thu, 02 Oct 2014 21:08:27 -0700 (PDT) Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id l3sm2231531laa.37.2014.10.02.21.08.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Oct 2014 21:08:27 -0700 (PDT) Message-ID: <542E213A.50408@yandex.ru> Date: Fri, 03 Oct 2014 08:08:26 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 References: <86lhoxucz4.fsf@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) The new patch: === modified file 'lisp/vc/vc-svn.el' --- lisp/vc/vc-svn.el 2014-01-01 07:43:34 +0000 +++ lisp/vc/vc-svn.el 2014-10-03 03:41:39 +0000 @@ -354,14 +354,23 @@ (concat "-r" rev)) (vc-switches 'SVN 'checkout)))) -(defun vc-svn-ignore (file &optional _directory _remove) +(defun vc-svn-ignore (file &optional directory remove) "Ignore FILE under Subversion. FILE is a file wildcard, relative to the root directory of DIRECTORY." - (vc-svn-command t 0 file "propedit" "svn:ignore")) + (let* ((ignores (vc-svn-ignore-completion-table directory)) + (file (file-relative-name file 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)))) -(defun vc-svn-ignore-completion-table (_file) - "Return the list of ignored files." - ) +(defun vc-svn-ignore-completion-table (directory) + "Return the list of ignored files in DIRECTORY." + (with-temp-buffer + (vc-svn-command t t nil "propget" "svn:ignore" (expand-file-name directory)) + (split-string (buffer-string)))) (defun vc-svn-find-admin-dir (file) "Return the administrative directory of FILE." From unknown Sun Jun 22 07:50:48 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18619: 24.3.93; vc-svn-ignore is broken Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Oct 2014 12:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18619 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Dmitry Gutov Cc: 18619@debbugs.gnu.org Received: via spool by 18619-submit@debbugs.gnu.org id=B18619.141233904625872 (code B ref 18619); Fri, 03 Oct 2014 12:25:01 +0000 Received: (at 18619) by debbugs.gnu.org; 3 Oct 2014 12:24:06 +0000 Received: from localhost ([127.0.0.1]:59849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xa1u1-0006jA-Ty for submit@debbugs.gnu.org; Fri, 03 Oct 2014 08:24:06 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:3953) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xa1tz-0006iw-9q for 18619@debbugs.gnu.org; Fri, 03 Oct 2014 08:24:04 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArYGAIDvNVNFxKjo/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCw4mEhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="91573740" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 03 Oct 2014 08:24:02 -0400 Received: by pastel.home (Postfix, from userid 20848) id 7B5E28597; Fri, 3 Oct 2014 08:24:02 -0400 (EDT) From: Stefan Monnier Message-ID: References: <86lhoxucz4.fsf@yandex.ru> <542E213A.50408@yandex.ru> Date: Fri, 03 Oct 2014 08:24:02 -0400 In-Reply-To: <542E213A.50408@yandex.ru> (Dmitry Gutov's message of "Fri, 03 Oct 2014 08:08:26 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > The new patch: Please install it into emacs-24, thank you, Stefan From unknown Sun Jun 22 07:50:48 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Dmitry Gutov Subject: bug#18619: closed (Re: bug#18619: 24.3.93; vc-svn-ignore is broken) Message-ID: References: <542EA3C2.6090404@yandex.ru> <86lhoxucz4.fsf@yandex.ru> X-Gnu-PR-Message: they-closed 18619 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 18619@debbugs.gnu.org Date: Fri, 03 Oct 2014 13:26:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1412342763-7271-1" This is a multi-part message in MIME format... ------------=_1412342763-7271-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #18619: 24.3.93; vc-svn-ignore is broken which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 18619@debbugs.gnu.org. --=20 18619: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D18619 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1412342763-7271-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 18619-done) by debbugs.gnu.org; 3 Oct 2014 13:25:31 +0000 Received: from localhost ([127.0.0.1]:59897 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xa2rS-0001rS-O1 for submit@debbugs.gnu.org; Fri, 03 Oct 2014 09:25:31 -0400 Received: from mail-lb0-f180.google.com ([209.85.217.180]:64894) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xa2rO-0001r6-2o for 18619-done@debbugs.gnu.org; Fri, 03 Oct 2014 09:25:27 -0400 Received: by mail-lb0-f180.google.com with SMTP id f15so975715lbj.39 for <18619-done@debbugs.gnu.org>; Fri, 03 Oct 2014 06:25:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=xIIJL+CNu510KJBxRoNtmL9ZVBXcXjhchJgNX1NfjH4=; b=fUrC6hEC/znJwaRv4i8oO/e9IpqRN6RfVD3zJEVd+8skpSk5YC0v81IBBds6X7Nx0T kKdr/zYSGmCEC8ZnTNhveVr/TIyXRVBoAPO469ywzkbwHAsL6NH1vfcEDoES5asbWD0s NFLLIiiRl9YHCKnquDM/D85OJSAKNor9snDG0jsJPgNB9V18c2jyHXtAT+Sb3CxpR4MY RX+6ANz1+oa0qKyIIC7srZ7OUtU/VHL+1zWZgi6JwoBPut5ZIFDSfs//EHgo17s5HYTh x8STVALfgtsVEVZda4m1BH4TCdJaOJ+3Gd6N01unWV9RJxXR/cFYKItV6A5SeBXp42sr iHiA== X-Received: by 10.112.169.37 with SMTP id ab5mr5627969lbc.27.1412342724827; Fri, 03 Oct 2014 06:25:24 -0700 (PDT) Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id w10sm2690069laz.28.2014.10.03.06.25.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Oct 2014 06:25:24 -0700 (PDT) Message-ID: <542EA3C2.6090404@yandex.ru> Date: Fri, 03 Oct 2014 17:25:22 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#18619: 24.3.93; vc-svn-ignore is broken References: <86lhoxucz4.fsf@yandex.ru> <542E213A.50408@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 18619-done Cc: 18619-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 10/03/2014 04:24 PM, Stefan Monnier wrote: > Please install it into emacs-24, thank you, Done, thanks. ------------=_1412342763-7271-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 3 Oct 2014 02:03:20 +0000 Received: from localhost ([127.0.0.1]:59606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZsDI-0006zv-3T for submit@debbugs.gnu.org; Thu, 02 Oct 2014 22:03:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48071) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZsDF-0006zm-ES for submit@debbugs.gnu.org; Thu, 02 Oct 2014 22:03:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZsD9-0002Ap-5G for submit@debbugs.gnu.org; Thu, 02 Oct 2014 22:03:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZsD9-0002Ad-1d for submit@debbugs.gnu.org; Thu, 02 Oct 2014 22:03:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZsD2-00013G-MY for bug-gnu-emacs@gnu.org; Thu, 02 Oct 2014 22:03:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZsCw-00025W-La for bug-gnu-emacs@gnu.org; Thu, 02 Oct 2014 22:03:04 -0400 Received: from mail-lb0-x22d.google.com ([2a00:1450:4010:c04::22d]:60959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZsCw-000256-Dt for bug-gnu-emacs@gnu.org; Thu, 02 Oct 2014 22:02:58 -0400 Received: by mail-lb0-f173.google.com with SMTP id 10so250046lbg.18 for ; Thu, 02 Oct 2014 19:02:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=BVprI0P9MnLA1rgSBe2TCINtWd0zACh8UnJDkk+rpqk=; b=E6C1RV9NQ3ZlXLQRtIYXaqr+vL7k2Ei9kRWHLiacyO8qcUBlI+/9q4sbkxKLk28+Rw uyqIO8vTF0RyuBd46tG11bjvabdK0+WOjnPIE69AzW4HPHXPL2q2WVyWKSGM10Q8PfF5 8Hg8rOgqRhjM9m0Vw3dwjrsNC1C3YLoSh3kaEfJc77BzamTjcQFAv7saqHnT4Aui7mrC Hk7jBq4lBLxYSikWr02Or2GK6TQc3RZ6tbBqmiTbO+hEorNDYw3gNC7hhKynIW8JsHMU g/5Ou+UPDmyBVQaIb9Y95fjihRwtYXXti3hrU/PWQRhVWKsRQ0mJspkXKs/VmemaSaPF N2iA== X-Received: by 10.112.180.137 with SMTP id do9mr2125908lbc.63.1412301777145; Thu, 02 Oct 2014 19:02:57 -0700 (PDT) Received: from axl ([178.252.98.87]) by mx.google.com with ESMTPSA id x1sm2158520lag.16.2014.10.02.19.02.56 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 02 Oct 2014 19:02:56 -0700 (PDT) From: Dmitry Gutov To: bug-gnu-emacs@gnu.org Subject: 24.3.93; vc-svn-ignore is broken Date: Fri, 03 Oct 2014 06:02:55 +0400 Message-ID: <86lhoxucz4.fsf@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Tags: patch It plainly doesn't work: gives an error when called on an unregistered file, or (maybe, haven't tested) succeeds and does nothing when called on a registered file. The way it's currently written is wrong. I don't think there's a way to do "add this file to ignores" in one command invocation. SVN has "propget" and "propset" commands, the value has to be a list of wildcards to ignore, one per line, and it needs to be set on a parent directory, not on the file itself, like the current code tries to do. The attached patch mostly takes care of this. The change to `vc-ignore' is needed because this property doesn't work with absolute paths. And passing a relative path to backend `ignore' implementations make sense anyway. In GNU Emacs 24.3.93.4 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2014-09-19 on axl Repository revision: 117510 juri@jurta.org-20140918205955-kwp5ckzrk2l4w1km Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Ubuntu 14.04.1 LTS === modified file 'lisp/vc/vc-svn.el' --- lisp/vc/vc-svn.el 2014-01-01 07:43:34 +0000 +++ lisp/vc/vc-svn.el 2014-10-03 01:51:12 +0000 @@ -354,14 +354,22 @@ (concat "-r" rev)) (vc-switches 'SVN 'checkout)))) -(defun vc-svn-ignore (file &optional _directory _remove) +(defun vc-svn-ignore (file &optional directory remove) "Ignore FILE under Subversion. FILE is a file wildcard, relative to the root directory of DIRECTORY." - (vc-svn-command t 0 file "propedit" "svn:ignore")) + (let* ((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)))) -(defun vc-svn-ignore-completion-table (_file) - "Return the list of ignored files." - ) +(defun vc-svn-ignore-completion-table (directory) + "Return the list of ignored files in DIRECTORY." + (with-temp-buffer + (vc-svn-command t t nil "propget" "svn:ignore" (expand-file-name directory)) + (split-string (buffer-string)))) (defun vc-svn-find-admin-dir (file) "Return the administrative directory of FILE." === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2014-01-01 07:43:34 +0000 +++ lisp/vc/vc.el 2014-10-03 01:58:18 +0000 @@ -1370,7 +1370,9 @@ (let* ((directory (or directory default-directory)) (backend (or (vc-responsible-backend default-directory) (error "Unknown backend")))) - (vc-call-backend backend 'ignore file directory remove))) + (vc-call-backend backend 'ignore + (file-relative-name file directory) + directory remove))) (defun vc-default-ignore (backend file &optional directory remove) "Ignore FILE under the VCS of DIRECTORY (default is `default-directory'). ------------=_1412342763-7271-1--