X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/5c09de04ca053874f37281e22ea5556590875be2..a9ba094b81d899218e8762a66377b2fe71274d35:/lisp/vc/vc-hg.el diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index bc125e2cfa..ba882a3ec5 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -459,16 +459,10 @@ REV is ignored." (vc-hg-command buffer 0 file "cat" "-r" rev) (vc-hg-command buffer 0 file "cat")))) -(defun vc-hg-ignore (file) - "Ignore FILE under Mercurial." - (with-temp-buffer - (insert-file-contents - (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 (point-min) (point-max) hgignore)))))) +(defun vc-hg-find-ignore-file (file) + "Return the root directory of the repository of FILE." + (expand-file-name ".hgignore" + (vc-hg-root file))) ;; Modeled after the similar function in vc-bzr.el (defun vc-hg-checkout (file &optional _editable rev) @@ -614,13 +608,13 @@ REV is the revision to check out into WORKFILE." (defun vc-hg-dir-status (dir update-function) (vc-hg-command (current-buffer) 'async dir "status" "-C") - (vc-exec-after - `(vc-hg-after-dir-status (quote ,update-function)))) + (vc-run-delayed + (vc-hg-after-dir-status update-function))) (defun vc-hg-dir-status-files (dir files _default-state update-function) (apply 'vc-hg-command (current-buffer) 'async dir "status" "-C" files) - (vc-exec-after - `(vc-hg-after-dir-status (quote ,update-function)))) + (vc-run-delayed + (vc-hg-after-dir-status update-function))) (defun vc-hg-dir-extra-header (name &rest commands) (concat (propertize name 'face 'font-lock-type-face) @@ -714,7 +708,8 @@ then attempts to update the working directory." args (cddr args))) (apply 'vc-do-async-command buffer root hg-program command args) - (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'hg))) + (with-current-buffer buffer + (vc-run-delayed (vc-compilation-mode 'hg))) (vc-set-async-update buffer))))) (defun vc-hg-merge-branch () @@ -723,7 +718,7 @@ This runs the command \"hg merge\"." (let* ((root (vc-hg-root default-directory)) (buffer (format "*vc-hg : %s*" (expand-file-name root)))) (apply 'vc-do-async-command buffer root vc-hg-program '("merge")) - (with-current-buffer buffer (vc-exec-after '(vc-compilation-mode 'hg))) + (with-current-buffer buffer (vc-run-delayed (vc-compilation-mode 'hg))) (vc-set-async-update buffer))) ;;; Internal functions