From: Wolfgang Scherer <Wolfgang.Scherer@gmx.de>
To: 37216@debbugs.gnu.org
Subject: bug#37216: [PATCH] vc-svn-ignore sets incorrect properties for relative filenames
Date: Thu, 29 Aug 2019 01:39:48 +0200 [thread overview]
Message-ID: <3df2dec6-18c5-ff65-cfa0-408bc5212b4e@gmx.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 182 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Set-correct-svn-ignore-property-for-relative-filenam.patch --]
[-- Type: text/x-patch; name="0001-Set-correct-svn-ignore-property-for-relative-filenam.patch", Size: 1678 bytes --]
From dc6484a72161c251e213d40ea1b750b3a366608c Mon Sep 17 00:00:00 2001
From: Wolfgang Scherer <wolfgang.scherer@gmx.de>
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.
---
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
--- 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."
--
2.7.4
next reply other threads:[~2019-08-28 23:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 23:39 Wolfgang Scherer [this message]
2019-09-15 13:07 ` bug#37216: [PATCH] vc-svn-ignore sets incorrect properties for relative filenames Lars Ingebrigtsen
2019-10-07 4:59 ` Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3df2dec6-18c5-ff65-cfa0-408bc5212b4e@gmx.de \
--to=wolfgang.scherer@gmx.de \
--cc=37216@debbugs.gnu.org \
/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 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.