all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#37214: [PATCH] vc-svn error messages are used as ignore list
@ 2019-08-28 18:54 Wolfgang Scherer
       [not found] ` <handler.37214.B.156701847419761.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Scherer @ 2019-08-28 18:54 UTC (permalink / raw)
  To: 37214

Function `vc-svn-ignore-completion-table' in `lisp/vc/vc-svn.el'
does not work properly.

If the property "svn:ignore" does not exist, an error message is
written to the output buffer, which is then used as a list of
ignored files.

The output buffer is split whitespace, which creates problems
with whitespace in file names.

The attached patch fixes both problems.







^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#37214: [PATCH] vc-svn error messages are used as ignore list
       [not found] ` <handler.37214.B.156701847419761.ack@debbugs.gnu.org>
@ 2019-08-28 19:06   ` Wolfgang Scherer
  2019-09-15 13:16     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Scherer @ 2019-08-28 19:06 UTC (permalink / raw)
  To: 37214

[-- Attachment #1: Type: text/plain, Size: 23 bytes --]

Forgot the patch file.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Do-not-use-error-messages-as-list-of-ignored-files.patch --]
[-- Type: text/x-patch; name="0001-Do-not-use-error-messages-as-list-of-ignored-files.patch", Size: 1167 bytes --]

From 877dc0839bd4682488c8ea35e9f24a4445bc03fc Mon Sep 17 00:00:00 2001
From: Wolfgang Scherer <wolfgang.scherer@gmx.de>
Date: Wed, 28 Aug 2019 20:03:30 +0200
Subject: [PATCH] Do not use error messages as list of ignored files

* lisp/vc/vc-svn.el: (vc-svn-ignore-completion-table) Ignore buffer
contents, if exit status is not 0.  Split buffer by lines.
---
 lisp/vc/vc-svn.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index 3c50c8f..f25a00d 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -366,8 +366,8 @@ FILE is a file wildcard, relative to the root directory of DIRECTORY."
 (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))))
+    (if (= (vc-svn-command t t nil "propget" "svn:ignore" (expand-file-name directory)) 0)
+        (split-string (buffer-string) "\n"))))

 (defun vc-svn-find-admin-dir (file)
   "Return the administrative directory of FILE."
--
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#37214: [PATCH] vc-svn error messages are used as ignore list
  2019-08-28 19:06   ` Wolfgang Scherer
@ 2019-09-15 13:16     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-09-15 13:16 UTC (permalink / raw)
  To: Wolfgang Scherer; +Cc: 37214

Wolfgang Scherer <Wolfgang.Scherer@gmx.de> writes:

> * lisp/vc/vc-svn.el: (vc-svn-ignore-completion-table) Ignore buffer
> contents, if exit status is not 0.  Split buffer by lines.

I don't use svn, but:


[...]

> -    (vc-svn-command t t nil "propget" "svn:ignore" (expand-file-name directory))
> -    (split-string (buffer-string))))
> +    (if (= (vc-svn-command t t nil "propget" "svn:ignore" (expand-file-name directory)) 0)
> +        (split-string (buffer-string) "\n"))))

This looked "obviously correct", so I've applied it without testing
(after a slight stylistic change).  If this leads to errors with actual
svn users, please revert.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-15 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-28 18:54 bug#37214: [PATCH] vc-svn error messages are used as ignore list Wolfgang Scherer
     [not found] ` <handler.37214.B.156701847419761.ack@debbugs.gnu.org>
2019-08-28 19:06   ` Wolfgang Scherer
2019-09-15 13:16     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.