Commit 5c09de04 authored by Xue Fuqiao's avatar Xue Fuqiao
Browse files

vc-ignore fixes.

* vc/vc-svn.el (vc-svn-ignore): Remove `interactive'.  Use `*vc*'
buffer for output.

* vc/vc-hg.el (vc-hg-ignore): Remove `interactive'; do not assume
point-min==1; fix search string; fix parentheses missing.

* vc/vc-git.el (vc-git-ignore): Remove `interactive'; do not
assume point-min==1; fix search string; fix parentheses missing.

* vc/vc-cvs.el (vc-cvs-ignore): Remove `interactive'.

* vc/vc-bzr.el (vc-bzr-ignore): Remove `interactive'.  Use `*vc*'
buffer for output.
parent d2067333
2013-07-30 Xue Fuqiao <xfq.free@gmail.com>
* vc/vc-svn.el (vc-svn-ignore): Remove `interactive'. Use `*vc*'
buffer for output.
* vc/vc-hg.el (vc-hg-ignore): Remove `interactive'; do not assume
point-min==1; fix search string; fix parentheses missing.
* vc/vc-git.el (vc-git-ignore): Remove `interactive'; do not
assume point-min==1; fix search string; fix parentheses missing.
* vc/vc-cvs.el (vc-cvs-ignore): Remove `interactive'.
* vc/vc-bzr.el (vc-bzr-ignore): Remove `interactive'. Use `*vc*'
buffer for output.
2013-07-29 Eli Zaretskii <eliz@gnu.org>
* frame.el (frame-notice-user-settings): Avoid inflooping when the
......
......@@ -653,9 +653,7 @@ REV non-nil gets an error."
(defun vc-bzr-ignore (file)
"Ignore FILE under Bazaar."
(interactive)
(vc-bzr-command "ignore" (get-buffer-create "*vc-ignore*") 0
file))
(vc-bzr-command "ignore" t 0 file))
(defun vc-bzr-checkout (_file &optional _editable rev)
(if rev (error "Operation not supported")
......
......@@ -1228,7 +1228,6 @@ is non-nil."
(defun vc-cvs-ignore (file)
"Ignore FILE under CVS."
(interactive)
(cvs-append-to-ignore (file-name-directory file) file))
(defun cvs-append-to-ignore (dir str &optional old-dir)
......
......@@ -682,15 +682,14 @@ It is based on `log-edit-mode', and has Git-specific extensions.")
(defun vc-git-ignore (file)
"Ignore FILE under Git."
(interactive)
(with-temp-buffer
(insert-file-contents
(let (gitignore (concat (file-name-as-directory (vc-git-root
default-directory)) ".gitignore"))
(unless (search-forward file nil t)
(let ((gitignore (concat (file-name-as-directory (vc-git-root
default-directory)) ".gitignore")))
(unless (search-forward (concat "\n" file "\n") nil t)
(goto-char (point-max))
(insert (concat "\n" file "\n"))
(write-region 1 (point-max) gitignore))))))
(write-region (point-min) (point-max) gitignore))))))
(defun vc-git-checkout (file &optional _editable rev)
(vc-git-command nil 0 file "checkout" (or rev "HEAD")))
......
......@@ -461,15 +461,14 @@ REV is ignored."
(defun vc-hg-ignore (file)
"Ignore FILE under Mercurial."
(interactive)
(with-temp-buffer
(insert-file-contents
(let (hgignore (concat (file-name-as-directory (vc-hg-root
default-directory)) ".hgignore"))
(unless (search-forward file nil t)
(let ((hgignore (concat (file-name-as-directory (vc-hg-root
default-directory)) ".hgignore")))
(unless (search-forward (concat "\n" file "\n") nil t)
(goto-char (point-max))
(insert (concat "\n" file "\n"))
(write-region 1 (point-max) hgignore))))))
(write-region (point-min) (point-max) hgignore))))))
;; Modeled after the similar function in vc-bzr.el
(defun vc-hg-checkout (file &optional _editable rev)
......
......@@ -354,9 +354,7 @@ This is only possible if SVN is responsible for FILE's directory.")
(defun vc-svn-ignore (file)
"Ignore FILE under Subversion."
(interactive)
(vc-svn-command (get-buffer-create "*vc-ignore*") 0
file "propedit" "svn:ignore"))
(vc-svn-command t 0 file "propedit" "svn:ignore"))
(defun vc-svn-checkout (file &optional editable rev)
(message "Checking out %s..." file)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment