[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vc-got 8014bde 101/145: implement half create-tag
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vc-got 8014bde 101/145: implement half create-tag |
Date: |
Thu, 9 Sep 2021 15:58:42 -0400 (EDT) |
branch: externals/vc-got
commit 8014bde1e7ea7f7d61b9cbd5907e41413ed7a36f
Author: Omar Polo <op@omarpolo.com>
Commit: Omar Polo <op@omarpolo.com>
implement half create-tag
Now vc-got should be able to create branches. Creating tags is more
difficult thought, because got requires a message (i.e. wants
"annotated" tags and not lightweight ones.
---
vc-got.el | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/vc-got.el b/vc-got.el
index b9c71b2..f70e048 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -89,7 +89,9 @@
;; - mergebase NOT IMPLEMENTED
;;
;; TAG SYSTEM
-;; - create-tag NOT IMPLEMENTED
+;; - create-tag PARTIALLY IMPLEMENTED
+;; figure out how to read a message for the tag; can only create
+;; branches.
;; - retrieve-tag NOT IMPLEMENTED
;;
;; MISCELLANEOUS NOT IMPLEMENTED
@@ -390,6 +392,16 @@ files on disk."
(push (match-string 2) table))
table)))))
+(defun vc-got--branch (name)
+ "Try to create and switch to the branch called NAME."
+ (let (process-file-side-effects)
+ (vc-got-with-worktree default-directory
+ (with-temp-buffer
+ (if (zerop (vc-got--call "branch" name))
+ t
+ (error "[vc-got] can't create branch %s: %s" name
+ (buffer-string)))))))
+
;; Backend properties
@@ -785,6 +797,19 @@ Value is returned as floating point fractional number of
days."
(match-string-no-properties 1))))
+;; Tag system
+
+(defun vc-got-create-tag (_dir name branchp)
+ "Attach the tag NAME to the state of the worktree.
+DIR is ignored (tags are global, not per-file).
+If BRANCHP is true, NAME should create a new branch."
+ ;; TODO: vc reccomends to ensure that all the file are in a clean
+ ;; state, but is it useful?
+ (if branchp
+ (vc-got--branch name)
+ (error "[vc-got] create tags is not implemented (yet)")))
+
+
;; Miscellaneous
(defun vc-got-previous-revision (file rev)
- [elpa] externals/vc-got a323f60 071/145: show list of files when committing staged stuff, (continued)
- [elpa] externals/vc-got a323f60 071/145: show list of files when committing staged stuff, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got daae979 066/145: implement vc-got-stage-commit to commit staged changes, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got dcb5b83 083/145: extract the filtering to its own function, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 76d978f 082/145: minor tweaks, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got cb97383 085/145: ignore ignored files but not up-to-date ones, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 445e2bd 087/145: typo, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 2d039a2 089/145: fix vc-dir listing on sub-directories, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 2b7241a 086/145: revamp readme, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 5fb2f47 099/145: implement revision-completion-table, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 0a3316a 091/145: implement log-view-mode, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 8014bde 101/145: implement half create-tag,
ELPA Syncer <=
- [elpa] externals/vc-got e9a5df0 098/145: make vc-annotate-show-diff-revision-at-line works, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 567c17a 093/145: vc-got trims '----' by itself now, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 1870c8b 094/145: add a space when prompting for the push/pull operations, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got c151c25 095/145: implement vc-got-find-file-hook, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 8ec0bb7 107/145: guard vc-got-diff against nil files, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got db89d6f 114/145: add a wrapper for the update command, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got ae2ad57 123/145: don't need mark-resolved and find-admin-dir, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 09d5937 103/145: implement retrieve-tag and complete the tag system!, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got e104d04 122/145: update the year, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got d3ca33b 116/145: add the required "headers" for a package, ELPA Syncer, 2021/09/09