aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2014-10-03 17:15:05 +0400
committerDmitry Gutov2014-10-03 17:15:05 +0400
commitc799337f12e84b4ca88f509ecea3a7e55ff4c768 (patch)
treea8fbb57ec8f02c264f938a27fd07062746bf14be
parentf63bd04be9c6a1a9b09749a86ac693726994bda2 (diff)
downloademacs-c799337f12e84b4ca88f509ecea3a7e55ff4c768.tar.gz
emacs-c799337f12e84b4ca88f509ecea3a7e55ff4c768.zip
Fix vc-svn-ignore
* lisp/vc/vc-svn.el (vc-svn-ignore-completion-table): Implement. (vc-svn-ignore): Use it. Fixes: debbugs:18619
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc/vc-svn.el21
2 files changed, 20 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a2f8ba55ceb..40faa8a43fe 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-10-03 Dmitry Gutov <dgutov@yandex.ru>
2
3 * vc/vc-svn.el (vc-svn-ignore-completion-table): Implement.
4 (vc-svn-ignore): Use it. (Bug#18619)
5
12014-10-03 Martin Rudalics <rudalics@gmx.at> 62014-10-03 Martin Rudalics <rudalics@gmx.at>
2 7
3 * frame.el (toggle-frame-maximized, toggle-frame-fullscreen): 8 * frame.el (toggle-frame-maximized, toggle-frame-fullscreen):
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.")
354 (concat "-r" rev)) 354 (concat "-r" rev))
355 (vc-switches 'SVN 'checkout)))) 355 (vc-switches 'SVN 'checkout))))
356 356
357(defun vc-svn-ignore (file &optional _directory _remove) 357(defun vc-svn-ignore (file &optional directory remove)
358 "Ignore FILE under Subversion. 358 "Ignore FILE under Subversion.
359FILE is a file wildcard, relative to the root directory of DIRECTORY." 359FILE is a file wildcard, relative to the root directory of DIRECTORY."
360 (vc-svn-command t 0 file "propedit" "svn:ignore")) 360 (let* ((ignores (vc-svn-ignore-completion-table directory))
361 361 (file (file-relative-name file directory))
362(defun vc-svn-ignore-completion-table (_file) 362 (ignores (if remove
363 "Return the list of ignored files." 363 (delete file ignores)
364 ) 364 (push file ignores))))
365 (vc-svn-command nil 0 nil nil "propset" "svn:ignore"
366 (mapconcat #'identity ignores "\n")
367 (expand-file-name directory))))
368
369(defun vc-svn-ignore-completion-table (directory)
370 "Return the list of ignored files in DIRECTORY."
371 (with-temp-buffer
372 (vc-svn-command t t nil "propget" "svn:ignore" (expand-file-name directory))
373 (split-string (buffer-string))))
365 374
366(defun vc-svn-find-admin-dir (file) 375(defun vc-svn-find-admin-dir (file)
367 "Return the administrative directory of FILE." 376 "Return the administrative directory of FILE."