all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#17586: * lisp/vc/vc-hg.el (vc-hg-create-tag)(vc-hg-retrieve-tag): Fix needed functions.
@ 2014-05-25 17:29 Santiago Payà i Miralta
  2014-06-06 16:39 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Santiago Payà i Miralta @ 2014-05-25 17:29 UTC (permalink / raw
  To: 17586

[-- Attachment #1: Type: text/plain, Size: 3172 bytes --]

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 <santiagopim@gmail.com>

        * 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?= <santiagopim@gmail.com>
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

[-- Attachment #2: Type: text/html, Size: 11080 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#17586: * lisp/vc/vc-hg.el (vc-hg-create-tag)(vc-hg-retrieve-tag): Fix needed functions.
  2014-05-25 17:29 bug#17586: * lisp/vc/vc-hg.el (vc-hg-create-tag)(vc-hg-retrieve-tag): Fix needed functions Santiago Payà i Miralta
@ 2014-06-06 16:39 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2014-06-06 16:39 UTC (permalink / raw
  To: Santiago Payà i Miralta; +Cc: 17586

> 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.

Installed into `trunk', after fixing the patch's wrapping, as well as
the code's indentation.


        Stefan





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-06 16:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-25 17:29 bug#17586: * lisp/vc/vc-hg.el (vc-hg-create-tag)(vc-hg-retrieve-tag): Fix needed functions Santiago Payà i Miralta
2014-06-06 16:39 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.