mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Compare commits
5 commits
1b2b433fc0
...
02afd1305b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02afd1305b | ||
|
|
7d4e2107b3 | ||
|
|
b8cefd6c43 | ||
|
|
34331ae6f9 | ||
|
|
f15e98afb6 |
5 changed files with 62 additions and 41 deletions
|
|
@ -1499,11 +1499,11 @@ the current VC fileset
|
|||
@end ifnottex
|
||||
|
||||
The above example is typical for a decentralized version control
|
||||
system like Bazaar, Git, or Mercurial. Other systems can show other
|
||||
statuses. For instance, CVS shows the @samp{needs-update} status if
|
||||
the repository has changes that have not been applied to the work
|
||||
file. RCS and SCCS show the name of the user locking a file as its
|
||||
status.
|
||||
system like Bazaar, Git, or Mercurial (@pxref{VCS Repositories}). Other
|
||||
systems can show other statuses. For instance, CVS shows the
|
||||
@samp{needs-update} status if the repository has changes that have not
|
||||
been applied to the work file. RCS and SCCS show the name of the user
|
||||
locking a file as its status.
|
||||
|
||||
@ifnottex
|
||||
On CVS, the @code{vc-dir} command normally contacts the repository,
|
||||
|
|
@ -1520,6 +1520,14 @@ are working offline or the network is slow.
|
|||
@code{vc-directory-exclusion-list}. Its default value contains
|
||||
directories that are used internally by version control systems.
|
||||
|
||||
At the top of the buffer Emacs displays some information about the
|
||||
repository, such as the name of the backend in use and the working
|
||||
directory. In addition, for decentralized VCS, if you have outgoing
|
||||
commits (@pxref{VC Change Log}), Emacs displays a line @w{"Outgoing : N
|
||||
unpushed revisions"} where @var{N} is a number. You can click on this
|
||||
text to execute the @code{vc-log-outgoing} command (@pxref{VC Change
|
||||
Log}).
|
||||
|
||||
@node VC Directory Commands
|
||||
@subsubsection VC Directory Commands
|
||||
|
||||
|
|
|
|||
7
etc/NEWS
7
etc/NEWS
|
|
@ -1748,6 +1748,11 @@ This contains the list of regular expressions used to match "Re:" and
|
|||
international variants of it when modifying the Subject field in
|
||||
replies.
|
||||
|
||||
** mairix
|
||||
|
||||
---
|
||||
*** 'mairix-search' now keeps its own minibuffer history.
|
||||
|
||||
** Imap
|
||||
|
||||
---
|
||||
|
|
@ -2539,7 +2544,7 @@ bindings:
|
|||
- 'C-x v O L' is bound to 'vc-log-outgoing'
|
||||
- 'C-x v O D' is bound to 'vc-root-diff-outgoing'.
|
||||
|
||||
---
|
||||
+++
|
||||
*** New display of outgoing revisions count in VC-Dir.
|
||||
If there are outgoing revisions, VC-Dir now includes a count of how many
|
||||
in its headers, to remind you to push them.
|
||||
|
|
|
|||
|
|
@ -200,6 +200,8 @@ Currently there are `threads' and `flags'.")
|
|||
|
||||
;;;; Internal variables
|
||||
|
||||
(defvar mairix-search-history nil
|
||||
"Minibuffer history for `mairix-search'.")
|
||||
(defvar mairix-last-search nil)
|
||||
(defvar mairix-searches-changed nil)
|
||||
|
||||
|
|
@ -334,7 +336,7 @@ If THREADS is non-nil, also display whole threads of found
|
|||
messages. Results will be put into the default search file."
|
||||
(interactive
|
||||
(list
|
||||
(read-string "Query: ")
|
||||
(read-string "Query: " nil 'mairix-search-history)
|
||||
(y-or-n-p "Include threads? ")))
|
||||
(when (mairix-call-mairix
|
||||
(split-string search)
|
||||
|
|
|
|||
|
|
@ -259,17 +259,17 @@ VC commands are globally reachable under the prefix \\[vc-prefix-map]:
|
|||
(kill-local-variable 'vc-parent-buffer))
|
||||
(setplist (intern (expand-file-name file) vc-file-prop-obarray) nil))
|
||||
|
||||
(defun vc--repo-setprop (property value)
|
||||
(defun vc--repo-setprop (backend property value)
|
||||
"Set per-repository VC PROPERTY to VALUE and return the value."
|
||||
(vc-file-setprop (vc-root-dir) property value))
|
||||
(vc-file-setprop (vc-root-dir backend) property value))
|
||||
|
||||
(defun vc--repo-getprop (property)
|
||||
(defun vc--repo-getprop (backend property)
|
||||
"Get per-repository VC PROPERTY."
|
||||
(vc-file-getprop (vc-root-dir) property))
|
||||
(vc-file-getprop (vc-root-dir backend) property))
|
||||
|
||||
(defun vc--repo-clearprops ()
|
||||
(defun vc--repo-clearprops (backend)
|
||||
"Clear all VC whole-repository properties."
|
||||
(vc-file-clearprops (vc-root-dir)))
|
||||
(vc-file-clearprops (vc-root-dir backend)))
|
||||
|
||||
|
||||
;; We keep properties on each symbol naming a backend as follows:
|
||||
|
|
|
|||
|
|
@ -3239,17 +3239,17 @@ saving the buffer."
|
|||
(called-interactively-p 'interactive))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun vc-root-dir ()
|
||||
(defun vc-root-dir (&optional backend)
|
||||
"Return the root directory for the current VC tree.
|
||||
Return nil if the root directory cannot be identified."
|
||||
(let ((backend (vc-deduce-backend)))
|
||||
(if backend
|
||||
(condition-case err
|
||||
(vc-call-backend backend 'root default-directory)
|
||||
(vc-not-supported
|
||||
(unless (eq (cadr err) 'root)
|
||||
(signal (car err) (cdr err)))
|
||||
nil)))))
|
||||
Return nil if the root directory cannot be identified.
|
||||
BACKEND is the VC backend."
|
||||
(and-let* ((backend (or backend (vc-deduce-backend))))
|
||||
(condition-case err
|
||||
(vc-call-backend backend 'root default-directory)
|
||||
(vc-not-supported
|
||||
(unless (eq (cadr err) 'root)
|
||||
(signal (car err) (cdr err)))
|
||||
nil))))
|
||||
|
||||
;;;###autoload
|
||||
(defun vc-revision-other-window (rev)
|
||||
|
|
@ -4032,14 +4032,15 @@ The command prompts for the branch whose change log to show."
|
|||
;; determine and so should be remembered.
|
||||
(if-let* ((_ (not refresh))
|
||||
(record (assoc upstream-location
|
||||
(vc--repo-getprop 'vc-incoming-revision))))
|
||||
(vc--repo-getprop backend 'vc-incoming-revision))))
|
||||
(cdr record)
|
||||
(let ((res (vc-call-backend backend 'incoming-revision
|
||||
upstream-location refresh)))
|
||||
(if-let* ((alist (vc--repo-getprop 'vc-incoming-revision)))
|
||||
(if-let* ((alist (vc--repo-getprop backend 'vc-incoming-revision)))
|
||||
(setf (alist-get upstream-location alist nil nil #'equal)
|
||||
res)
|
||||
(vc--repo-setprop 'vc-incoming-revision
|
||||
(vc--repo-setprop backend
|
||||
'vc-incoming-revision
|
||||
`((,upstream-location . ,res))))
|
||||
(or res
|
||||
(user-error "No incoming revision -- local-only branch?")))))
|
||||
|
|
@ -4056,12 +4057,13 @@ can be a remote branch name."
|
|||
(vc-incoming-outgoing-internal backend upstream-location
|
||||
"*vc-incoming*" 'log-incoming)))
|
||||
|
||||
(defun vc-default-log-incoming (_backend buffer upstream-location)
|
||||
(vc--with-backend-in-rootdir ""
|
||||
(let ((incoming (vc--incoming-revision backend upstream-location 'refresh)))
|
||||
(vc-call-backend backend 'print-log (list rootdir) buffer t
|
||||
incoming
|
||||
(vc-call-backend backend 'mergebase incoming)))))
|
||||
(defun vc-default-log-incoming (backend buffer upstream-location)
|
||||
(let ((incoming (vc--incoming-revision backend upstream-location
|
||||
'refresh))
|
||||
(default-directory (vc-root-dir backend)))
|
||||
(vc-call-backend backend 'print-log (list default-directory)
|
||||
buffer t incoming
|
||||
(vc-call-backend backend 'mergebase incoming))))
|
||||
|
||||
;;;###autoload
|
||||
(defun vc-log-outgoing (&optional upstream-location)
|
||||
|
|
@ -4075,12 +4077,12 @@ can be a remote branch name."
|
|||
(vc-incoming-outgoing-internal backend upstream-location
|
||||
"*vc-outgoing*" 'log-outgoing)))
|
||||
|
||||
(defun vc-default-log-outgoing (_backend buffer upstream-location)
|
||||
(vc--with-backend-in-rootdir ""
|
||||
(let ((incoming (vc--incoming-revision backend upstream-location)))
|
||||
(vc-call-backend backend 'print-log (list rootdir) buffer t
|
||||
""
|
||||
(vc-call-backend backend 'mergebase incoming)))))
|
||||
(defun vc-default-log-outgoing (backend buffer upstream-location)
|
||||
(let ((incoming (vc--incoming-revision backend upstream-location))
|
||||
(default-directory (vc-root-dir backend)))
|
||||
(vc-call-backend backend 'print-log (list default-directory)
|
||||
buffer t ""
|
||||
(vc-call-backend backend 'mergebase incoming))))
|
||||
|
||||
(defun vc--count-outgoing (backend)
|
||||
"Return number of changes that will be sent with a `vc-push'."
|
||||
|
|
@ -4234,10 +4236,14 @@ tip revision are merged into the working file."
|
|||
(cond
|
||||
;; If a pull operation is defined, use it.
|
||||
((vc-find-backend-function backend 'pull)
|
||||
(vc-call-backend backend 'pull arg))
|
||||
(vc-call-backend backend 'pull arg)
|
||||
;; FIXME: Ideally we would only clear out the stored value for the
|
||||
;; REMOTE-LOCATION from which we are pulling.
|
||||
(vc-run-delayed
|
||||
(vc--repo-setprop backend 'vc-incoming-revision nil)))
|
||||
;; If VCS has `merge-news' functionality (CVS and SVN), use it.
|
||||
((vc-find-backend-function backend 'merge-news)
|
||||
(save-some-buffers ; save buffers visiting files
|
||||
(save-some-buffers ; save buffers visiting files
|
||||
nil (lambda ()
|
||||
(and (buffer-modified-p)
|
||||
(let ((file (buffer-file-name)))
|
||||
|
|
@ -4278,7 +4284,7 @@ It also signals an error in a Bazaar bound branch."
|
|||
;; FIXME: Ideally we would only clear out the
|
||||
;; REMOTE-LOCATION to which we are pushing.
|
||||
(vc-run-delayed
|
||||
(vc--repo-setprop 'vc-incoming-revision nil)))
|
||||
(vc--repo-setprop backend 'vc-incoming-revision nil)))
|
||||
(user-error "VC push is unsupported for `%s'" backend))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue