summaryrefslogtreecommitdiff
path: root/lisp/vc-hooks.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2010-10-31 23:13:42 -0400
committerChong Yidong <cyd@stupidchicken.com>2010-10-31 23:13:42 -0400
commit98cfec0d6935f25a54852caaa33112ea1ca4634b (patch)
tree95822bce29eaee01ee15f79a24405489e2eaf8d5 /lisp/vc-hooks.el
parent6aad7ea061dac5966904f6a6b4f36816d9c87d10 (diff)
downloademacs-98cfec0d6935f25a54852caaa33112ea1ca4634b.tar.gz
emacs-98cfec0d6935f25a54852caaa33112ea1ca4634b.tar.bz2
emacs-98cfec0d6935f25a54852caaa33112ea1ca4634b.zip
Backport VC improvements from trunk.
* vc/log-edit.el (log-edit-rewrite-fixes): New var. (log-edit-author): New dynamic var. (log-edit-changelog-ours-p, log-edit-insert-changelog-entries): Use it to return the author if different from committer. (log-edit-insert-changelog): Use them to add Author: and Fixes headers. * vc/vc-hooks.el (vc-default-mode-line-string): Doc fix. * vc/vc.el (vc-deduce-backend): New fun. Handle diff buffers. (vc-root-diff, vc-print-root-log, vc-log-incoming) (vc-log-outgoing): Use it. (vc-diff-internal): Set diff-vc-backend. * vc/diff-mode.el (diff-vc-backend): New var. * vc/vc.el (vc-diff-internal): Set `revert-buffer-function' buffer-locally to lambda that re-runs the vc diff command. (Bug#6447) * vc/log-view.el (log-view-mode-map): Bind revert-buffer. Make 'g' (AKA revert-buffer) rerun VC log, log-incoming and log-outgoing commands. * vc/vc.el (vc-log-internal-common): Add a new argument and use it to create a buffer local revert-buffer-function variable. (vc-print-log-internal, vc-log-incoming, vc-log-outgoing): Pass a revert-buffer-function lambda. Improve VC create/retrieve tag/branch. * vc.el (vc-create-tag): Do not read the directory name for VCs with repository revision granularity. Adjust the tag/branch prompt. Reset VC properties. (vc-retrieve-tag): Do not read the directory name for VCs with repository revision granularity. Reset VC properties. Add optional support for resetting VC properties. * vc-dispatcher.el (vc-resynch-window): Add new optional argument, call vc-file-clearprops when true. (vc-resynch-buffer): Add new optional argument, pass it down. (vc-resynch-buffers-in-directory): Likewise. Improve support for special markup in the VC commit message. * vc-mtn.el (vc-mtn-checkin): Support Author: and Date: markup. * vc-hg.el (vc-hg-checkin): Add support for Date:. * vc-git.el (vc-git-checkin): * vc-bzr.el (vc-bzr-checkin): Likewise. Add support for vc-log-incoming, improve vc-log-outgoing for Git. * vc-git.el (vc-git-log-view-mode): Fix font lock for incoming/outgoing logs. (vc-git-log-outgoing, vc-git-log-incoming): New functions. * vc-git.el (vc-git-log-outgoing): Use the same format as the short log. (vc-git-log-incoming): Likewise. Run "git fetch" before the log command Add bindings for vc-log-incoming and vc-log-outgoing. * vc-hooks.el (vc-prefix-map): Add bindings for vc-log-incoming and vc-log-outgoing. * vc-dir.el (vc-dir-menu-map): Add menu bindings for vc-log-incoming and vc-log-outgoing. Improve state updating for VC tag commands. * vc.el (vc-create-tag, vc-retrieve-tag): Call vc-resynch-buffer to update the state of all buffers in the directory. * vc-dir.el (vc-dir): Don't pop-up-windows. (Bug#6204) * vc.el (vc-checkin, vc-modify-change-comment): Adjust to new vc-start/finish-logentry. (vc-find-conflicted-file): New command. (vc-transfer-file): Adjust to new vc-checkin. (vc-next-action): Improve scoping. * vc-git.el (vc-git-checkin): Use log-edit-extract-headers. (vc-git-commits-coding-system): Rename from git-commits-coding-system. * vc-dispatcher.el (vc-log-edit): Shorten names for log-edit-show-files. * vc-bzr.el (vc-bzr-checkin): Use log-edit-extract-headers. (vc-bzr-conflicted-files): New function. * log-edit.el (log-edit-summary, log-edit-header) (log-edit-unknown-header): New faces. (log-edit-headers-alist): New var. (log-edit-header-contents-regexp): New const. (log-edit-match-to-eoh): New function. (log-edit-font-lock-keywords): Use them. (log-edit): Insert a "Summary:" header as default. (log-edit-mode): Mark font-lock rules as case-insensitive. (log-edit-done): Cleanup headers. (log-edit-extract-headers): New function to replace it. * vc-dispatcher.el (vc-finish-logentry): Don't mess so badly with the windows/frames. * vc-bzr.el (vc-bzr-shelve-apply): Don't use *vc-bzr-shelve*. * vc-dir.el (vc-dir-kill-line): New command. (vc-dir-mode-map): Bind it to C-k. (vc-dir-headers): Abbreviate the working dir. * vc-git.el (vc-git-revision-table): Include remote branches. New VC methods: vc-log-incoming and vc-log-outgoing. * vc.el (vc-print-log-setup-buttons, vc-log-internal-common) (vc-incoming-outgoing-internal, vc-log-incoming, vc-log-outgoing): New functions. (vc-print-log-internal): Just call vc-log-internal-common. (vc-log-view-type): New permanent local variable. * vc-hooks.el (vc-menu-map): Bind vc-log-incoming and vc-log-outgoing. * vc-bzr.el (vc-bzr-log-view-mode): Use vc-log-view-type instead of the dynamic bound vc-short-log. (vc-bzr-log-incoming, vc-bzr-log-outgoing): New functions. * vc-git.el (vc-git-log-outgoing): New function. (vc-git-log-view-mode): Use vc-log-view-type instead of the dynamic bound vc-short-log. * vc-hg.el (vc-hg-log-view-mode): Use vc-log-view-type instead of the dynamic bound vc-short-log. Highlight the tag. (vc-hg-log-incoming, vc-hg-log-outgoing): New functions. (vc-hg-outgoing, vc-hg-incoming, vc-hg-outgoing-mode): (vc-hg-incoming-mode): Remove. (vc-hg-extra-menu-map): Do not bind vc-hg-incoming and vc-hg-outgoing. Fix default-directory for vc-root-diff. * vc.el (vc-root-diff): Bind default-directory to the root directory for the diff command. * vc-hg.el (vc-hg-push, vc-hg-pull): Use `apply' when calling `vc-hg-command' with a list of flags. * vc-bzr.el (vc-bzr-log-edit-mode): Add --fixes support to log-edit-before-checkin-process. * vc.el (vc-modify-change-comment): Pass MODE to vc-start-logentry. * vc-bzr.el, vc-hg.el (log-edit-mode): Declare. * vc-dispatcher.el (vc-start-logentry): Doc fix. (log-view-process-buffer, log-edit-extra-flags): Declare. Add special markup processing for commit logs. * log-edit.el (log-edit): Add new argument MODE. Use that mode when non-nil instead of the log-view-mode. * vc.el (vc-default-log-edit-mode): New function. * vc-dispatcher.el (vc-log-edit): Add a mode argument, pass it to log-edit. Support for shelving snapshots and for showing shelves. * vc-bzr.el (vc-bzr-shelve-show, vc-bzr-shelve-show-at-point) (vc-bzr-shelve-apply-and-keep-at-point, vc-bzr-shelve-snapshot): New functions. (vc-bzr-shelve-map, vc-bzr-shelve-menu-map) (vc-bzr-extra-menu-map): Map them.
Diffstat (limited to 'lisp/vc-hooks.el')
-rw-r--r--lisp/vc-hooks.el21
1 files changed, 16 insertions, 5 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 70369df06fe..a0cf06fbe12 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -403,7 +403,7 @@ If the argument is a list, the files must all have the same back end."
(defun vc-backend-subdirectory-name (file)
- "Return where the master and lock FILEs for the current directory are kept."
+ "Return where the repository for the current directory is kept."
(symbol-name (vc-backend file)))
(defun vc-name (file)
@@ -471,13 +471,13 @@ For registered files, the value returned is one of:
USER The current version of the working file is locked by
some other USER (a string).
- 'needs-update The file has not been edited by the user, but there is
+ 'needs-update The file has not been edited by the user, but there is
a more recent version on the current branch stored
- in the master file.
+ in the repository.
'needs-merge The file has been edited by the user, and there is also
a more recent version on the current branch stored in
- the master file. This state can only occur if locking
+ the repository. This state can only occur if locking
is not used for the file.
'unlocked-changes The working version of the file is not locked,
@@ -556,7 +556,7 @@ and does not employ any heuristic at all."
unchanged))))
(defun vc-default-workfile-unchanged-p (backend file)
- "Check if FILE is unchanged by diffing against the master version.
+ "Check if FILE is unchanged by diffing against the repository version.
Return non-nil if FILE is unchanged."
(zerop (condition-case err
;; If the implementation supports it, let the output
@@ -818,6 +818,9 @@ Format:
\"BACKEND-REV\" if the file is up-to-date
\"BACKEND:REV\" if the file is edited (or locked by the calling user)
\"BACKEND:LOCKER:REV\" if the file is locked by somebody else
+ \"BACKEND@REV\" if the file was locally added
+ \"BACKEND!REV\" if the file contains conflicts or was removed
+ \"BACKEND?REV\" if the file is under VC, but is missing
This function assumes that the file is registered."
(let* ((backend-name (symbol-name backend))
@@ -947,6 +950,8 @@ current, and kill the buffer that visits the link."
(define-key map "i" 'vc-register)
(define-key map "l" 'vc-print-log)
(define-key map "L" 'vc-print-root-log)
+ (define-key map "I" 'vc-log-incoming)
+ (define-key map "O" 'vc-log-outgoing)
(define-key map "m" 'vc-merge)
(define-key map "r" 'vc-retrieve-tag)
(define-key map "s" 'vc-create-tag)
@@ -989,6 +994,12 @@ current, and kill the buffer that visits the link."
(define-key map [vc-update-change-log]
`(menu-item ,(purecopy "Update ChangeLog") vc-update-change-log
:help ,(purecopy "Find change log file and add entries from recent version control logs")))
+ (define-key map [vc-log-out]
+ `(menu-item ,(purecopy "Show Outgoing Log") vc-log-outgoing
+ :help ,(purecopy "Show a log of changes that will be sent with a push operation")))
+ (define-key map [vc-log-in]
+ `(menu-item ,(purecopy "Show Incoming Log") vc-log-incoming
+ :help ,(purecopy "Show a log of changes that will be received with a pull operation")))
(define-key map [vc-print-log]
`(menu-item ,(purecopy "Show History") vc-print-log
:help ,(purecopy "List the change log of the current file set in a window")))