X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/10c7e43106d56781fe23fe0ce02c6f19eea52c5e..d0fc47eda0459c486dd114eee8674df1a6e4bc6a:/lisp/vc-hg.el diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 7d4150fbb2..bfc4846a5d 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -42,12 +42,15 @@ ;; * registered (file) OK ;; * state (file) OK ;; - state-heuristic (file) NOT NEEDED +;; - dir-status (dir update-function) OK +;; - dir-status-files (dir files ds uf) OK +;; - status-extra-headers (dir) OK +;; - status-printer (fileinfo) OK ;; * working-revision (file) OK ;; - latest-on-branch-p (file) ?? ;; * checkout-model (files) OK ;; - workfile-unchanged-p (file) OK ;; - mode-line-string (file) NOT NEEDED -;; - prettify-state-info (file) OK ;; STATE-CHANGING FUNCTIONS ;; * register (files &optional rev comment) OK ;; * create-repo () OK @@ -138,12 +141,11 @@ ;;;###autoload (load "vc-hg") ;;;###autoload (vc-hg-registered file)))) -;; Modelled after the similar function in vc-bzr.el +;; Modeled after the similar function in vc-bzr.el (defun vc-hg-registered (file) "Return non-nil if FILE is registered with hg." (when (vc-hg-root file) ; short cut (let ((state (vc-hg-state file))) ; expensive - (vc-file-setprop file 'vc-state state) (and state (not (memq state '(ignored unregistered))))))) (defun vc-hg-state (file) @@ -272,7 +274,7 @@ (split-string (buffer-substring-no-properties (point-min) (point-max)))))) -;; Modelled after the similar function in vc-cvs.el +;; Modeled after the similar function in vc-cvs.el (defun vc-hg-revision-completion-table (files) (lexical-let ((files files) table) @@ -330,7 +332,7 @@ Optional arg REVISION is a revision to annotate from." (when (<= newrev tip-revision) (number-to-string newrev)))) -;; Modelled after the similar function in vc-bzr.el +;; Modeled after the similar function in vc-bzr.el (defun vc-hg-delete-file (file) "Delete FILE and delete it in the hg repository." (condition-case () @@ -338,7 +340,7 @@ Optional arg REVISION is a revision to annotate from." (file-error nil)) (vc-hg-command nil 0 file "remove" "--after" "--force")) -;; Modelled after the similar function in vc-bzr.el +;; Modeled after the similar function in vc-bzr.el (defun vc-hg-rename-file (old new) "Rename file from OLD to NEW using `hg mv'." (vc-hg-command nil 0 new "mv" old)) @@ -355,7 +357,7 @@ COMMENT is ignored." (defalias 'vc-hg-responsible-p 'vc-hg-root) -;; Modelled after the similar function in vc-bzr.el +;; Modeled after the similar function in vc-bzr.el (defun vc-hg-could-register (file) "Return non-nil if FILE could be registered under hg." (and (vc-hg-responsible-p file) ; shortcut @@ -366,7 +368,7 @@ COMMENT is ignored." ;; registered. (error)))) -;; XXX This would remove the file. Is that correct? +;; FIXME: This would remove the file. Is that correct? ;; (defun vc-hg-unregister (file) ;; "Unregister FILE from hg." ;; (vc-hg-command nil nil file "remove")) @@ -383,7 +385,7 @@ REV is ignored." (vc-hg-command buffer 0 file "cat" "-r" rev) (vc-hg-command buffer 0 file "cat")))) -;; Modelled after the similar function in vc-bzr.el +;; Modeled after the similar function in vc-bzr.el (defun vc-hg-checkout (file &optional editable rev) "Retrieve a revision of FILE. EDITABLE is ignored. @@ -395,11 +397,11 @@ REV is the revision to check out into WORKFILE." (vc-hg-command t 0 file "cat" "-r" rev) (vc-hg-command t 0 file "cat"))))) -;; Modelled after the similar function in vc-bzr.el +;; Modeled after the similar function in vc-bzr.el (defun vc-hg-workfile-unchanged-p (file) (eq 'up-to-date (vc-hg-state file))) -;; Modelled after the similar function in vc-bzr.el +;; Modeled after the similar function in vc-bzr.el (defun vc-hg-revert (file &optional contents-done) (unless contents-done (with-temp-buffer (vc-hg-command t 0 file "revert")))) @@ -500,6 +502,11 @@ REV is the revision to check out into WORKFILE." (vc-exec-after `(vc-hg-after-dir-status (quote ,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)))) + (defun vc-hg-status-extra-header (name &rest commands) (concat (propertize name 'face 'font-lock-type-face) (propertize @@ -520,7 +527,7 @@ REV is the revision to check out into WORKFILE." ;; (vc-hg-status-extra-header "Global id : " "id" "-i") ))) -;; XXX this adds another top level menu, instead figure out how to +;; FIXME: this adds another top level menu, instead figure out how to ;; replace the Log-View menu. (easy-menu-define log-view-mode-menu vc-hg-outgoing-mode-map "Hg-outgoing Display Menu"