[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vc-got 622993f 117/145: remove vc-got-stage
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vc-got 622993f 117/145: remove vc-got-stage |
Date: |
Thu, 9 Sep 2021 15:58:45 -0400 (EDT) |
branch: externals/vc-got
commit 622993fd4f135745196ee76b19cf8b193420d0c9
Author: Omar Polo <op@omarpolo.com>
Commit: Omar Polo <op@omarpolo.com>
remove vc-got-stage
---
Makefile | 2 +-
README.md | 25 -------
images/vc-dir.png | Bin 35724 -> 0 bytes
images/vc-got-stage-files.png | Bin 59967 -> 0 bytes
vc-got-stage.el | 168 ------------------------------------------
vc-got.el | 5 --
6 files changed, 1 insertion(+), 199 deletions(-)
diff --git a/Makefile b/Makefile
index b1e208b..68acf98 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
EMACS = emacs
-compile: vc-got.elc vc-got-stage.elc
+compile: vc-got.elc
clean:
rm -f *.elc
diff --git a/README.md b/README.md
index 96fb3ab..f83da89 100644
--- a/README.md
+++ b/README.md
@@ -39,31 +39,6 @@ one action that *at the moment* is better to do by hand.
Pushing,
committing, blaming etc on the other hand are fully functional.
-## Stage hunks
-
-Unlike other VC backends, `vc-got` is able to stage and commit
-individual changes. It's still WIP, but usable.
-
- - `vc-got-stage-files` guides the user through the stage process,
- like `got stage -p` (or `git add -p`). It operates on the current
- file or on the marked ones in `*vc-dir*`
- - `vc-got-stage-unstage` is similar, except that it un-stages the
- changes.
- - `vc-got-stage-diff` show the staged diff
- - `vc-got-stage-commit` commits the staged changes
-
-Here's an example of the `*vc-dir*` buffer when some edits were staged
-on a file
-
-![vc-dir buffer with a staged file](images/vc-dir.png "vc-dir buffer with a
staged file")
-
-and an example of the interactive stage operation with
-`vc-got-stage-files`
-
-![interactive stage operation](images/vc-got-stage-files.png
-"interactive stage operation")
-
-
## Contributing
The long-term plan is to get this into Emacs. This means that to
diff --git a/images/vc-dir.png b/images/vc-dir.png
deleted file mode 100644
index 8754124..0000000
Binary files a/images/vc-dir.png and /dev/null differ
diff --git a/images/vc-got-stage-files.png b/images/vc-got-stage-files.png
deleted file mode 100644
index 826c716..0000000
Binary files a/images/vc-got-stage-files.png and /dev/null differ
diff --git a/vc-got-stage.el b/vc-got-stage.el
deleted file mode 100644
index 3abba5f..0000000
--- a/vc-got-stage.el
+++ /dev/null
@@ -1,168 +0,0 @@
-;;; vc-got-stage.el --- Stage functionalities for vc-got -*- lexical-binding:
t; -*-
-
-;; Copyright (C) 2021 Omar Polo
-
-;; Author: Omar Polo <op@omarpolo.com>
-;; Keywords: vc
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; Stage-related functions for vc-got. This allows vc-got to stage
-;; and commit individual chunks and not entire filesets.
-
-;;; Code:
-
-(require 'log-edit)
-(require 'rx)
-(require 'vc)
-
-(defvar vc-got-program) ;vc-got.el
-(declare-function vc-got--diff "vc-got")
-(declare-function vc-got--unstage "vc-got" (file))
-(declare-function vc-got--status "vc-got" (status-codes dir &rest files))
-(declare-function vc-got-checkin "vc-got" (fileset comment))
-(declare-function vc-got-root "vc-got" (dir-or-file))
-
-(defvar vc-got-stage--process nil
- "The got stage process.")
-
-(defvar vc-got-stage--fileset nil
- "Remaining fileset to process.")
-
-(defun vc-got-stage--assert-proc ()
- "Assert no vc-got-stage process is running."
- (when (process-live-p vc-got-stage--process)
- (error "A vc-got-stage-files is already in progress")))
-
-(defun vc-got-stage-files (fileset)
- "Interactively stage hunks from files in FILESET."
- (interactive (list (cadr (vc-deduce-fileset))))
- (vc-got-stage--assert-proc)
- (if (not fileset)
- (message "[vc-got] nothing to stage.")
- (setq vc-got-stage--fileset fileset)
- (vc-got-stage--next)))
-
-(defun vc-got-stage--next ()
- "Process next file in stage list."
- (vc-got-stage--assert-proc)
- (let ((file (car vc-got-stage--fileset)))
- (if (not file)
- (progn (kill-buffer (process-buffer vc-got-stage--process))
- (message "[vc-got] stage done."))
- (setq vc-got-stage--fileset (cdr vc-got-stage--fileset))
- (let ((buf (get-buffer-create "*vc-got-stage*")))
- (pop-to-buffer buf)
- (with-current-buffer buf
- (buffer-disable-undo)
- (erase-buffer)
- (read-only-mode)
- (unless (derived-mode-p 'diff-mode)
- (diff-mode)))
- (setq vc-got-stage--process
- (make-process :name "got"
- :buffer buf
- :command (list vc-got-program "stage" "-p" file)
- :connection 'pty
- :filter #'vc-got-stage--filter
- :sentinel #'vc-got-stage--sentinel))))))
-
-(defun vc-got-stage--kill-separators ()
- "Kill the separator lines in interactive got stage."
- (save-excursion
- (forward-line -2)
- (kill-line)
- (goto-char (point-min))
- (kill-line)))
-
-(defun vc-got-stage--filter (proc string)
- "Filter for got stage process.
-PROC is the process, STRING part of its output."
- (let ((buf (process-buffer proc)))
- (when (buffer-live-p buf)
- (let ((inhibit-read-only t))
- (with-current-buffer buf
- (goto-char (point-max))
- (insert string)
- (save-excursion
- (beginning-of-line)
- (when (looking-at (rx bol
- (group (zero-or-one "un")
- "stage"
- (zero-or-more anychar)
- "?")))
- (let ((msg (match-string 1)))
- (kill-line) ; kill the question
- (vc-got-stage--kill-separators)
- (process-send-string buf
- (condition-case nil
- (if (y-or-n-p msg) "y\n" "n\n")
- (quit "q\n")))
- (erase-buffer)))))))))
-
-(defun vc-got-stage--sentinel (_proc event)
- "Sentinel for got stage process.
-Should be only called when EVENT is finished."
- (when (string= event "finished\n")
- (vc-got-stage--next)))
-
-;; TODO: make this interactive just as stage is
-(defun vc-got-stage-unstage (fileset)
- "Unstage staged hunks in FILESET."
- (interactive (list (cadr (vc-deduce-fileset))))
- (vc-got-stage--assert-proc)
- (if fileset
- (dolist (file fileset)
- (vc-got--unstage file))
- (vc-got--unstage nil)))
-
-(defun vc-got-stage-diff (fileset)
- "Pop a buffer with the staged diff for FILESET.
-If FILESET is nil, show the diff for every staged hunks."
- (interactive (list (cadr (vc-deduce-fileset))))
- (with-current-buffer (get-buffer-create "*vc-diff*")
- (pop-to-buffer (current-buffer))
- (let ((inhibit-read-only t))
- (erase-buffer)
- (diff-mode)
- (if fileset
- (dolist (file fileset)
- (vc-got--diff "-s" file))
- (vc-got--diff "-s")))))
-
-(defun vc-got-stage-commit ()
- "Commit staged hunks."
- (interactive)
- (let* ((default-directory (vc-got-root default-directory))
- (buf (get-buffer-create "*vc-got-stage-commit*"))
- (status (vc-got--status "MAD" "."))
- (staged-files (cl-loop for (file _ staged) in status
- when staged
- collect file)))
- (pop-to-buffer buf)
- (log-edit (lambda ()
- (interactive)
- (let ((msg (buffer-substring-no-properties (point-min)
- (point-max))))
- (kill-buffer)
- (vc-got-checkin nil msg)))
- t
- `((log-edit-listfun . ,(lambda ()
- (mapcar #'file-relative-name
- staged-files)))))))
-
-(provide 'vc-got-stage)
-;;; vc-got-stage.el ends here
diff --git a/vc-got.el b/vc-got.el
index eecd9c5..eceabc5 100755
--- a/vc-got.el
+++ b/vc-got.el
@@ -137,8 +137,6 @@
;; vc-dir-filename-mouse-map in our custom printer.
(require 'vc-dir)
-(require 'vc-got-stage)
-
(defgroup vc-got nil
"VC GoT backend."
:group 'vc)
@@ -587,9 +585,6 @@ FILES is nil, consider all the files in DIR."
"Unregister FILE."
(vc-got--remove file t t))
-;; XXX: generally speaking, files cannot be nil. But we have to
-;; handle that case too, because vc-got-stage-commit will call
-;; vc-got-checkin with fileset nil to commit the current staged hunks.
(defun vc-got-checkin (files comment &optional _rev)
"Commit FILES with COMMENT as commit message."
(with-temp-buffer
- [elpa] externals/vc-got 7a5ead6 061/145: vc-got-repository-url: avoid infinite loops in parsing, (continued)
- [elpa] externals/vc-got 7a5ead6 061/145: vc-got-repository-url: avoid infinite loops in parsing, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 0d57aba 072/145: remove the separator when showing a chunk to stage, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got d346ca6 084/145: ignore ignored files, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 67e0b4d 096/145: add note for the future, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 6ab1c7b 102/145: implement the tag creation part of vc-got-create-tag, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 887e069 090/145: make files an optional parameter, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 7726b6c 097/145: silence some checkdoc warnings, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got f701269 118/145: require log-edit to avoid a warning, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 241a3b1 111/145: implement unregister, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 0071376 125/145: change the description in the header, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 622993f 117/145: remove vc-got-stage,
ELPA Syncer <=
- [elpa] externals/vc-got 49945a0 105/145: mark ignore and ignore-completion-table as NOT NEEDED, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 807ca5a 120/145: mark completely staged files as 'up-to-date, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 9114bbc 112/145: use wrapper function instead of replicating it, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 01bf4e0 128/145: reword docstring to avoid checkdoc complain, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 65255dc 133/145: update README.md, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got c3185bf 113/145: add various -- to avoid arguments being interpreted as flags, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 8b45e61 137/145: mention version requirement for got send, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got d06f988 019/145: suggest to add .got to vc-directory-exclusion-list, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got ba12390 027/145: adding vc-got-stage, ELPA Syncer, 2021/09/09
- [elpa] externals/vc-got 21914ca 032/145: apply-impl should not be interactive, ELPA Syncer, 2021/09/09