Hi emacs, I wish to fix the lisp/vc/vc-hg.el (vc-hg-create-tag) and (vc-hg-retrieve-tag) funcions. These functions are not yet implemented in the module. In the create-tag function a `bookmark' is created instead a `branch' when branchp is non-nil, as is a soft branch and may be a more used branching behaviour (citation needed). In the retrieve-tag function a FIXME is yet needed (not compulsory) and would be nice update the *vc-change-log* buffer so the `@' symbol is displayed in the log graph in the retrieved revision. 2014-05-25 Santiago PayĆ  i Miralta * lisp/vc/vc-hg.el (vc-hg-create-tag): New implemented function. * lisp/vc/vc-hg.es (vc-hg-retrieve-tag): New implemented function. From 7efe806a53b8636f9195b03cb5043ddeed732ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Pay=C3=A0=20i=20Miralta?= Date: Sun, 25 May 2014 19:28:50 +0200 Subject: [PATCH] * lisp/vc/vc-hg.el (vc-hg-create-tag)(vc-hg-retrieve-tag): Fix needed functions. In the create-tag function a `bookmark' is created instead a `branch' when branchp is non-nil, as is a soft branch and may be a more used branching behaviour (citation needed). In the retrieve-tag function a FIXME is yet needed (not compulsory) and would be nice update the *vc-change-log* buffer so the `@' symbol is displayed in the log graph in the retrieved revision. --- lisp/vc/vc-hg.el | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 05b53a3..bbc8c91 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -82,8 +82,8 @@ ;; - annotate-current-time () NOT NEEDED ;; - annotate-extract-revision-at-line () OK ;; TAG SYSTEM -;; - create-tag (dir name branchp) NEEDED -;; - retrieve-tag (dir name update) NEEDED +;; - create-tag (dir name branchp) OK +;; - retrieve-tag (dir name update) OK FIXME UPDATE BUFFERS ;; MISCELLANEOUS ;; - make-version-backups-p (file) ?? ;; - repository-hostname (dirname) ?? @@ -382,6 +382,26 @@ Optional arg REVISION is a revision to annotate from." (expand-file-name (match-string-no-properties 4) (vc-hg-root default-directory))))))) +;;; Tag system + +(defun vc-hg-create-tag (dir name branchp) + "Attach the tag NAME to the state of the working copy." + (let ((default-directory dir)) + (and (vc-hg-command nil 0 nil "status") + (if branchp + (vc-hg-command nil 0 nil "bookmark" name) + (vc-hg-command nil 0 nil "tag" name))))) + +(defun vc-hg-retrieve-tag (dir name update) + "Retrieve the version tagged by NAME of all registered files at or below DIR." + (let ((default-directory dir)) + (vc-hg-command nil 0 nil "update" name) + ;; FIXME: update buffers if `update' is true + ;; TODO: update *vc-change-log* buffer so can see @ if --graph + )) + +;;; Miscellaneous + (defun vc-hg-previous-revision (_file rev) (let ((newrev (1- (string-to-number rev)))) (when (>= newrev 0) -- 1.7.9.5