emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117284: * lisp/vc/vc-hg.el (vc-hg-create-tag, vc-hg


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r117284: * lisp/vc/vc-hg.el (vc-hg-create-tag, vc-hg-retrieve-tag): New functions.
Date: Fri, 06 Jun 2014 16:38:50 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117284
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17586
author: Santiago PayĆ  i Miralta <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2014-06-06 12:38:44 -0400
message:
  * lisp/vc/vc-hg.el (vc-hg-create-tag, vc-hg-retrieve-tag): New functions.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/vc/vc-hg.el               vchg.el-20091113204419-o5vbwnq5f7feedwu-5062
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-06-06 16:11:53 +0000
+++ b/lisp/ChangeLog    2014-06-06 16:38:44 +0000
@@ -1,5 +1,8 @@
 2014-06-06  Santiago PayĆ  i Miralta  <address@hidden>
 
+       * vc/vc-hg.el (vc-hg-create-tag, vc-hg-retrieve-tag): New functions
+       (bug#17586).
+
        * vc/vc-hg.el (vc-hg-log-graph): New var.
        (vc-hg-print-log): Use it.
        (vc-hg-root-log-format): Include branch name and bookmarks; ignore

=== modified file 'lisp/vc/vc-hg.el'
--- a/lisp/vc/vc-hg.el  2014-06-06 16:11:53 +0000
+++ b/lisp/vc/vc-hg.el  2014-06-06 16:38:44 +0000
@@ -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)             ??
@@ -391,8 +391,26 @@
       (if (match-beginning 3)
          (match-string-no-properties 1)
        (cons (match-string-no-properties 1)
-             (expand-file-name (match-string-no-properties 4)
-                               (vc-hg-root default-directory)))))))
+      (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")
+         (vc-hg-command nil 0 nil (if branchp "bookmark" "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))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]