diff options
| author | Santiago Payà i Miralta | 2014-06-06 12:38:44 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2014-06-06 12:38:44 -0400 |
| commit | 3112e4002cb1a29861bd7ae1b7ddff0dbdaa38a7 (patch) | |
| tree | c2ca213d59301e0492c8386a6c402fd69f6df0e3 | |
| parent | 90b15d91595b965b4106ea77760ba6bc1b5d0af5 (diff) | |
| download | emacs-3112e4002cb1a29861bd7ae1b7ddff0dbdaa38a7.tar.gz emacs-3112e4002cb1a29861bd7ae1b7ddff0dbdaa38a7.zip | |
* lisp/vc/vc-hg.el (vc-hg-create-tag, vc-hg-retrieve-tag): New functions.
Fixes: debbugs:17586
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/vc/vc-hg.el | 26 |
2 files changed, 25 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3b9b1e9f5b9..735a558aa62 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2014-06-06 Santiago Payà i Miralta <santiagopim@gmail.com> | 1 | 2014-06-06 Santiago Payà i Miralta <santiagopim@gmail.com> |
| 2 | 2 | ||
| 3 | * vc/vc-hg.el (vc-hg-create-tag, vc-hg-retrieve-tag): New functions | ||
| 4 | (bug#17586). | ||
| 5 | |||
| 3 | * vc/vc-hg.el (vc-hg-log-graph): New var. | 6 | * vc/vc-hg.el (vc-hg-log-graph): New var. |
| 4 | (vc-hg-print-log): Use it. | 7 | (vc-hg-print-log): Use it. |
| 5 | (vc-hg-root-log-format): Include branch name and bookmarks; ignore | 8 | (vc-hg-root-log-format): Include branch name and bookmarks; ignore |
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 28cf48f54d6..598a84a5739 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el | |||
| @@ -82,8 +82,8 @@ | |||
| 82 | ;; - annotate-current-time () NOT NEEDED | 82 | ;; - annotate-current-time () NOT NEEDED |
| 83 | ;; - annotate-extract-revision-at-line () OK | 83 | ;; - annotate-extract-revision-at-line () OK |
| 84 | ;; TAG SYSTEM | 84 | ;; TAG SYSTEM |
| 85 | ;; - create-tag (dir name branchp) NEEDED | 85 | ;; - create-tag (dir name branchp) OK |
| 86 | ;; - retrieve-tag (dir name update) NEEDED | 86 | ;; - retrieve-tag (dir name update) OK FIXME UPDATE BUFFERS |
| 87 | ;; MISCELLANEOUS | 87 | ;; MISCELLANEOUS |
| 88 | ;; - make-version-backups-p (file) ?? | 88 | ;; - make-version-backups-p (file) ?? |
| 89 | ;; - repository-hostname (dirname) ?? | 89 | ;; - repository-hostname (dirname) ?? |
| @@ -391,8 +391,26 @@ Optional arg REVISION is a revision to annotate from." | |||
| 391 | (if (match-beginning 3) | 391 | (if (match-beginning 3) |
| 392 | (match-string-no-properties 1) | 392 | (match-string-no-properties 1) |
| 393 | (cons (match-string-no-properties 1) | 393 | (cons (match-string-no-properties 1) |
| 394 | (expand-file-name (match-string-no-properties 4) | 394 | (expand-file-name (match-string-no-properties 4) |
| 395 | (vc-hg-root default-directory))))))) | 395 | (vc-hg-root default-directory))))))) |
| 396 | |||
| 397 | ;;; Tag system | ||
| 398 | |||
| 399 | (defun vc-hg-create-tag (dir name branchp) | ||
| 400 | "Attach the tag NAME to the state of the working copy." | ||
| 401 | (let ((default-directory dir)) | ||
| 402 | (and (vc-hg-command nil 0 nil "status") | ||
| 403 | (vc-hg-command nil 0 nil (if branchp "bookmark" "tag") name)))) | ||
| 404 | |||
| 405 | (defun vc-hg-retrieve-tag (dir name update) | ||
| 406 | "Retrieve the version tagged by NAME of all registered files at or below DIR." | ||
| 407 | (let ((default-directory dir)) | ||
| 408 | (vc-hg-command nil 0 nil "update" name) | ||
| 409 | ;; FIXME: update buffers if `update' is true | ||
| 410 | ;; TODO: update *vc-change-log* buffer so can see @ if --graph | ||
| 411 | )) | ||
| 412 | |||
| 413 | ;;; Miscellaneous | ||
| 396 | 414 | ||
| 397 | (defun vc-hg-previous-revision (_file rev) | 415 | (defun vc-hg-previous-revision (_file rev) |
| 398 | (let ((newrev (1- (string-to-number rev)))) | 416 | (let ((newrev (1- (string-to-number rev)))) |