summaryrefslogtreecommitdiff
path: root/lisp/vc/vc-svn.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2014-10-03 17:15:05 +0400
committerDmitry Gutov <dgutov@yandex.ru>2014-10-03 17:15:05 +0400
commitc799337f12e84b4ca88f509ecea3a7e55ff4c768 (patch)
treea8fbb57ec8f02c264f938a27fd07062746bf14be /lisp/vc/vc-svn.el
parentf63bd04be9c6a1a9b09749a86ac693726994bda2 (diff)
downloademacs-c799337f12e84b4ca88f509ecea3a7e55ff4c768.tar.gz
Fix vc-svn-ignore
* lisp/vc/vc-svn.el (vc-svn-ignore-completion-table): Implement. (vc-svn-ignore): Use it. Fixes: debbugs:18619
Diffstat (limited to 'lisp/vc/vc-svn.el')
-rw-r--r--lisp/vc/vc-svn.el21
1 files changed, 15 insertions, 6 deletions
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index a336a952df1..c7568e456f5 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -354,14 +354,23 @@ This is only possible if SVN is responsible for FILE's directory.")
(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"))
-
-(defun vc-svn-ignore-completion-table (_file)
- "Return the list of ignored files."
- )
+ (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 (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."