diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2008-04-10 07:32:25 +0000 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2008-04-10 07:32:25 +0000 |
commit | 7fbb47976eca08ae8fee6ac1a64ad961ef25d9f4 (patch) | |
tree | f2d15f2f9a6ef93d17652d22ae3aa07c307be9cb /lisp/vc-hooks.el | |
parent | 6e81a223a467cd1fcbd5ff88cab8c29766044bc1 (diff) | |
download | emacs-7fbb47976eca08ae8fee6ac1a64ad961ef25d9f4.tar.gz emacs-7fbb47976eca08ae8fee6ac1a64ad961ef25d9f4.tar.bz2 emacs-7fbb47976eca08ae8fee6ac1a64ad961ef25d9f4.zip |
* vc-hooks.el (vc-state): Add new state `conflict'.
(vc-after-save): Use when not if.
(vc-default-mode-line-string): Deal with the conflict state.
(vc-prefix-map):
(vc-menu-map): Bind vc-status instead of vc-directory.
* vc.el (vc-editable-p):
(vc-default-status-printer):
(vc-next-action): Deal with the conflict state.
(vc-mark-resolved): New function.
(vc-status-mode): Fix mode name.
(vc-default-comment-history): Use when not if.
(Todo): Add new entries, remove old ones.
* vc-cvs.el (vc-cvs-merge, vc-cvs-merge-news): Set conflict state.
(vc-cvs-parse-status):
(vc-cvs-after-dir-status):
* vc-svn.el (vc-svn-after-dir-status, vc-svn-parse-status):
Detect the conflict state.
Diffstat (limited to 'lisp/vc-hooks.el')
-rw-r--r-- | lisp/vc-hooks.el | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 674d906840d..93a98e01bc1 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -517,6 +517,11 @@ For registered files, the value returned is one of: 'removed Scheduled to be deleted from the repository on next commit. + 'conflict The file contains conflicts as the result of a merge. + For now the conflicts are text conflicts. In the + futures this might be extended to deal with metadata + conflicts too. + 'missing The file is not present in the file system, but the VC system still tracks it. @@ -775,10 +780,10 @@ Before doing that, check if there are any old backups and get rid of them." (eq (vc-checkout-model file) 'implicit) (vc-file-setprop file 'vc-state 'edited) (vc-mode-line file) - (if (featurep 'vc) - ;; If VC is not loaded, then there can't be - ;; any VC Dired buffer to synchronize. - (vc-dired-resynch-file file))))) + (when (featurep 'vc) + ;; If VC is not loaded, then there can't be + ;; any VC Dired buffer to synchronize. + (vc-dired-resynch-file file))))) (defvar vc-menu-entry '(menu-item "Version Control" vc-menu-map @@ -861,6 +866,9 @@ This function assumes that the file is registered." ((eq state 'added) (setq state-echo "Locally added file") (concat backend "@" rev)) + ((eq state 'conflict) + (setq state-echo "File contains conflicts after the last merge") + (concat backend "!" rev)) ((eq state 'removed) (setq state-echo "File removed from the VC system") (concat backend "!" rev)) @@ -981,7 +989,7 @@ Used in `find-file-not-found-functions'." (define-key map "a" 'vc-update-change-log) (define-key map "b" 'vc-switch-backend) (define-key map "c" 'vc-rollback) - (define-key map "d" 'vc-directory) + (define-key map "d" 'vc-status) (define-key map "g" 'vc-annotate) (define-key map "h" 'vc-insert-headers) (define-key map "i" 'vc-register) @@ -1010,11 +1018,6 @@ Used in `find-file-not-found-functions'." (define-key map [vc-create-snapshot] '(menu-item "Create Snapshot" vc-create-snapshot :help "Create Snapshot")) - (define-key map [vc-directory] - '(menu-item "VC Directory Listing" vc-directory - :help "Show the VC status of files in a directory")) - ;; `vc-status' is a not-quite-ready replacement for `vc-directory' - ;; (define-key map [vc-status] '("VC Status" . vc-status)) (define-key map [separator1] '("----")) (define-key map [vc-annotate] '(menu-item "Annotate" vc-annotate @@ -1054,6 +1057,9 @@ Used in `find-file-not-found-functions'." (define-key map [vc-register] '(menu-item "Register" vc-register :help "Register file set into a version control system")) + (define-key map [vc-status] + '(menu-item "VC Status" vc-status + :help "Show the VC status of files in a directory")) map)) (defalias 'vc-menu-map vc-menu-map) |