diff options
| author | Dan Nicolaescu | 2008-04-10 07:32:25 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-04-10 07:32:25 +0000 |
| commit | 7fbb47976eca08ae8fee6ac1a64ad961ef25d9f4 (patch) | |
| tree | f2d15f2f9a6ef93d17652d22ae3aa07c307be9cb | |
| parent | 6e81a223a467cd1fcbd5ff88cab8c29766044bc1 (diff) | |
| download | emacs-7fbb47976eca08ae8fee6ac1a64ad961ef25d9f4.tar.gz 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.
| -rw-r--r-- | lisp/ChangeLog | 22 | ||||
| -rw-r--r-- | lisp/vc-cvs.el | 21 | ||||
| -rw-r--r-- | lisp/vc-hooks.el | 26 | ||||
| -rw-r--r-- | lisp/vc-svn.el | 6 | ||||
| -rw-r--r-- | lisp/vc.el | 78 |
5 files changed, 106 insertions, 47 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ac651f3a10d..09ed4033594 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | 2008-04-10 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * vc-hooks.el (vc-state): Add new state `conflict'. | ||
| 4 | (vc-after-save): Use when not if. | ||
| 5 | (vc-default-mode-line-string): Deal with the conflict state. | ||
| 6 | (vc-prefix-map): | ||
| 7 | (vc-menu-map): Bind vc-status instead of vc-directory. | ||
| 8 | |||
| 9 | * vc.el (vc-editable-p): | ||
| 10 | (vc-default-status-printer): | ||
| 11 | (vc-next-action): Deal with the conflict state. | ||
| 12 | (vc-mark-resolved): New function. | ||
| 13 | (vc-status-mode): Fix mode name. | ||
| 14 | (vc-default-comment-history): Use when not if. | ||
| 15 | (Todo): Add new entries, remove old ones. | ||
| 16 | |||
| 17 | * vc-cvs.el (vc-cvs-merge, vc-cvs-merge-news): Set conflict state. | ||
| 18 | (vc-cvs-parse-status): | ||
| 19 | (vc-cvs-after-dir-status): | ||
| 20 | * vc-svn.el (vc-svn-after-dir-status, vc-svn-parse-status): | ||
| 21 | Detect the conflict state. | ||
| 22 | |||
| 1 | 2008-04-10 Glenn Morris <rgm@gnu.org> | 23 | 2008-04-10 Glenn Morris <rgm@gnu.org> |
| 2 | 24 | ||
| 3 | * Makefile.in (MH_E_DIR): New variable. | 25 | * Makefile.in (MH_E_DIR): New variable. |
diff --git a/lisp/vc-cvs.el b/lisp/vc-cvs.el index 2a6bbf51750..fd48e5a7fee 100644 --- a/lisp/vc-cvs.el +++ b/lisp/vc-cvs.el | |||
| @@ -436,8 +436,13 @@ The changes are between FIRST-REVISION and SECOND-REVISION." | |||
| 436 | (with-current-buffer (get-buffer "*vc*") | 436 | (with-current-buffer (get-buffer "*vc*") |
| 437 | (goto-char (point-min)) | 437 | (goto-char (point-min)) |
| 438 | (if (re-search-forward "conflicts during merge" nil t) | 438 | (if (re-search-forward "conflicts during merge" nil t) |
| 439 | 1 ; signal error | 439 | (progn |
| 440 | 0))) ; signal success | 440 | (vc-file-setprop file 'vc-state 'conflict) |
| 441 | ;; signal error | ||
| 442 | 1) | ||
| 443 | (vc-file-setprop file 'vc-state 'edited) | ||
| 444 | ;; signal success | ||
| 445 | 0))) | ||
| 441 | 446 | ||
| 442 | (defun vc-cvs-merge-news (file) | 447 | (defun vc-cvs-merge-news (file) |
| 443 | "Merge in any new changes made to FILE." | 448 | "Merge in any new changes made to FILE." |
| @@ -478,7 +483,7 @@ The changes are between FIRST-REVISION and SECOND-REVISION." | |||
| 478 | 0);; indicate success to the caller | 483 | 0);; indicate success to the caller |
| 479 | ;; Conflicts detected! | 484 | ;; Conflicts detected! |
| 480 | (t | 485 | (t |
| 481 | (vc-file-setprop file 'vc-state 'edited) | 486 | (vc-file-setprop file 'vc-state 'conflict) |
| 482 | 1);; signal the error to the caller | 487 | 1);; signal the error to the caller |
| 483 | ) | 488 | ) |
| 484 | (pop-to-buffer "*vc*") | 489 | (pop-to-buffer "*vc*") |
| @@ -814,11 +819,11 @@ state." | |||
| 814 | (if (not (re-search-forward "\\=[ \t]+Status: \\(.*\\)" nil t)) | 819 | (if (not (re-search-forward "\\=[ \t]+Status: \\(.*\\)" nil t)) |
| 815 | (setq status "Unknown") | 820 | (setq status "Unknown") |
| 816 | (setq status (match-string 1))) | 821 | (setq status (match-string 1))) |
| 817 | (if (and full | 822 | (when (and full |
| 818 | (re-search-forward | 823 | (re-search-forward |
| 819 | "\\(RCS Version\\|RCS Revision\\|Repository revision\\):\ | 824 | "\\(RCS Version\\|RCS Revision\\|Repository revision\\):\ |
| 820 | \[\t ]+\\([0-9.]+\\)" | 825 | \[\t ]+\\([0-9.]+\\)" |
| 821 | nil t)) | 826 | nil t)) |
| 822 | (vc-file-setprop file 'vc-latest-revision (match-string 2))) | 827 | (vc-file-setprop file 'vc-latest-revision (match-string 2))) |
| 823 | (vc-file-setprop | 828 | (vc-file-setprop |
| 824 | file 'vc-state | 829 | file 'vc-state |
| @@ -833,6 +838,7 @@ state." | |||
| 833 | (if missing 'missing 'needs-patch)) | 838 | (if missing 'missing 'needs-patch)) |
| 834 | ((string-match "Locally Added" status) 'added) | 839 | ((string-match "Locally Added" status) 'added) |
| 835 | ((string-match "Locally Removed" status) 'removed) | 840 | ((string-match "Locally Removed" status) 'removed) |
| 841 | ((string-match "File had conflicts " status) 'conflict) | ||
| 836 | (t 'edited)))))))) | 842 | (t 'edited)))))))) |
| 837 | 843 | ||
| 838 | (defun vc-cvs-dir-state-heuristic (dir) | 844 | (defun vc-cvs-dir-state-heuristic (dir) |
| @@ -897,6 +903,7 @@ state." | |||
| 897 | (if missing 'missing 'needs-patch)) | 903 | (if missing 'missing 'needs-patch)) |
| 898 | ((string-match "Locally Added" status-str) 'added) | 904 | ((string-match "Locally Added" status-str) 'added) |
| 899 | ((string-match "Locally Removed" status-str) 'removed) | 905 | ((string-match "Locally Removed" status-str) 'removed) |
| 906 | ((string-match "File had conflicts " status-str) 'conflict) | ||
| 900 | (t 'edited))) | 907 | (t 'edited))) |
| 901 | (unless (eq status 'up-to-date) | 908 | (unless (eq status 'up-to-date) |
| 902 | (push (list file status) result)))))) | 909 | (push (list file status) result)))))) |
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: | |||
| 517 | 517 | ||
| 518 | 'removed Scheduled to be deleted from the repository on next commit. | 518 | 'removed Scheduled to be deleted from the repository on next commit. |
| 519 | 519 | ||
| 520 | 'conflict The file contains conflicts as the result of a merge. | ||
| 521 | For now the conflicts are text conflicts. In the | ||
| 522 | futures this might be extended to deal with metadata | ||
| 523 | conflicts too. | ||
| 524 | |||
| 520 | 'missing The file is not present in the file system, but the VC | 525 | 'missing The file is not present in the file system, but the VC |
| 521 | system still tracks it. | 526 | system still tracks it. |
| 522 | 527 | ||
| @@ -775,10 +780,10 @@ Before doing that, check if there are any old backups and get rid of them." | |||
| 775 | (eq (vc-checkout-model file) 'implicit) | 780 | (eq (vc-checkout-model file) 'implicit) |
| 776 | (vc-file-setprop file 'vc-state 'edited) | 781 | (vc-file-setprop file 'vc-state 'edited) |
| 777 | (vc-mode-line file) | 782 | (vc-mode-line file) |
| 778 | (if (featurep 'vc) | 783 | (when (featurep 'vc) |
| 779 | ;; If VC is not loaded, then there can't be | 784 | ;; If VC is not loaded, then there can't be |
| 780 | ;; any VC Dired buffer to synchronize. | 785 | ;; any VC Dired buffer to synchronize. |
| 781 | (vc-dired-resynch-file file))))) | 786 | (vc-dired-resynch-file file))))) |
| 782 | 787 | ||
| 783 | (defvar vc-menu-entry | 788 | (defvar vc-menu-entry |
| 784 | '(menu-item "Version Control" vc-menu-map | 789 | '(menu-item "Version Control" vc-menu-map |
| @@ -861,6 +866,9 @@ This function assumes that the file is registered." | |||
| 861 | ((eq state 'added) | 866 | ((eq state 'added) |
| 862 | (setq state-echo "Locally added file") | 867 | (setq state-echo "Locally added file") |
| 863 | (concat backend "@" rev)) | 868 | (concat backend "@" rev)) |
| 869 | ((eq state 'conflict) | ||
| 870 | (setq state-echo "File contains conflicts after the last merge") | ||
| 871 | (concat backend "!" rev)) | ||
| 864 | ((eq state 'removed) | 872 | ((eq state 'removed) |
| 865 | (setq state-echo "File removed from the VC system") | 873 | (setq state-echo "File removed from the VC system") |
| 866 | (concat backend "!" rev)) | 874 | (concat backend "!" rev)) |
| @@ -981,7 +989,7 @@ Used in `find-file-not-found-functions'." | |||
| 981 | (define-key map "a" 'vc-update-change-log) | 989 | (define-key map "a" 'vc-update-change-log) |
| 982 | (define-key map "b" 'vc-switch-backend) | 990 | (define-key map "b" 'vc-switch-backend) |
| 983 | (define-key map "c" 'vc-rollback) | 991 | (define-key map "c" 'vc-rollback) |
| 984 | (define-key map "d" 'vc-directory) | 992 | (define-key map "d" 'vc-status) |
| 985 | (define-key map "g" 'vc-annotate) | 993 | (define-key map "g" 'vc-annotate) |
| 986 | (define-key map "h" 'vc-insert-headers) | 994 | (define-key map "h" 'vc-insert-headers) |
| 987 | (define-key map "i" 'vc-register) | 995 | (define-key map "i" 'vc-register) |
| @@ -1010,11 +1018,6 @@ Used in `find-file-not-found-functions'." | |||
| 1010 | (define-key map [vc-create-snapshot] | 1018 | (define-key map [vc-create-snapshot] |
| 1011 | '(menu-item "Create Snapshot" vc-create-snapshot | 1019 | '(menu-item "Create Snapshot" vc-create-snapshot |
| 1012 | :help "Create Snapshot")) | 1020 | :help "Create Snapshot")) |
| 1013 | (define-key map [vc-directory] | ||
| 1014 | '(menu-item "VC Directory Listing" vc-directory | ||
| 1015 | :help "Show the VC status of files in a directory")) | ||
| 1016 | ;; `vc-status' is a not-quite-ready replacement for `vc-directory' | ||
| 1017 | ;; (define-key map [vc-status] '("VC Status" . vc-status)) | ||
| 1018 | (define-key map [separator1] '("----")) | 1021 | (define-key map [separator1] '("----")) |
| 1019 | (define-key map [vc-annotate] | 1022 | (define-key map [vc-annotate] |
| 1020 | '(menu-item "Annotate" vc-annotate | 1023 | '(menu-item "Annotate" vc-annotate |
| @@ -1054,6 +1057,9 @@ Used in `find-file-not-found-functions'." | |||
| 1054 | (define-key map [vc-register] | 1057 | (define-key map [vc-register] |
| 1055 | '(menu-item "Register" vc-register | 1058 | '(menu-item "Register" vc-register |
| 1056 | :help "Register file set into a version control system")) | 1059 | :help "Register file set into a version control system")) |
| 1060 | (define-key map [vc-status] | ||
| 1061 | '(menu-item "VC Status" vc-status | ||
| 1062 | :help "Show the VC status of files in a directory")) | ||
| 1057 | map)) | 1063 | map)) |
| 1058 | 1064 | ||
| 1059 | (defalias 'vc-menu-map vc-menu-map) | 1065 | (defalias 'vc-menu-map vc-menu-map) |
diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index c2c665cb275..1328765a8fe 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el | |||
| @@ -160,7 +160,7 @@ If you want to force an empty list of arguments, use t." | |||
| 160 | 160 | ||
| 161 | (defun vc-svn-after-dir-status (callback buffer) | 161 | (defun vc-svn-after-dir-status (callback buffer) |
| 162 | (let ((state-map '((?A . added) | 162 | (let ((state-map '((?A . added) |
| 163 | (?C . edited) | 163 | (?C . conflict) |
| 164 | (?D . removed) | 164 | (?D . removed) |
| 165 | (?I . ignored) | 165 | (?I . ignored) |
| 166 | (?M . edited) | 166 | (?M . edited) |
| @@ -636,7 +636,9 @@ information about FILENAME and return its status." | |||
| 636 | (vc-file-setprop file 'vc-working-revision "0") | 636 | (vc-file-setprop file 'vc-working-revision "0") |
| 637 | (vc-file-setprop file 'vc-checkout-time 0) | 637 | (vc-file-setprop file 'vc-checkout-time 0) |
| 638 | 'added) | 638 | 'added) |
| 639 | ((memq status '(?M ?C)) | 639 | ((eq status ?C) |
| 640 | (vc-file-setprop file 'vc-state 'conflict)) | ||
| 641 | ((eq status '?M) | ||
| 640 | (if (eq (char-after (match-beginning 1)) ?*) | 642 | (if (eq (char-after (match-beginning 1)) ?*) |
| 641 | 'needs-merge | 643 | 'needs-merge |
| 642 | 'edited)) | 644 | 'edited)) |
diff --git a/lisp/vc.el b/lisp/vc.el index 90621b85ecd..970b6d7ab28 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -37,10 +37,11 @@ | |||
| 37 | ;; Martin Lorentzson <martinl@gnu.org> | 37 | ;; Martin Lorentzson <martinl@gnu.org> |
| 38 | ;; Dave Love <fx@gnu.org> | 38 | ;; Dave Love <fx@gnu.org> |
| 39 | ;; Stefan Monnier <monnier@cs.yale.edu> | 39 | ;; Stefan Monnier <monnier@cs.yale.edu> |
| 40 | ;; Thien-Thi Nguyen <ttn@gnu.org> | ||
| 41 | ;; Dan Nicolaescu <dann@ics.uci.edu> | ||
| 40 | ;; J.D. Smith <jdsmith@alum.mit.edu> | 42 | ;; J.D. Smith <jdsmith@alum.mit.edu> |
| 41 | ;; Andre Spiegel <spiegel@gnu.org> | 43 | ;; Andre Spiegel <spiegel@gnu.org> |
| 42 | ;; Richard Stallman <rms@gnu.org> | 44 | ;; Richard Stallman <rms@gnu.org> |
| 43 | ;; Thien-Thi Nguyen <ttn@gnu.org> | ||
| 44 | ;; | 45 | ;; |
| 45 | ;; In July 2007 ESR returned and redesigned the mode to cope better | 46 | ;; In July 2007 ESR returned and redesigned the mode to cope better |
| 46 | ;; with modern version-control systems that do commits by fileset | 47 | ;; with modern version-control systems that do commits by fileset |
| @@ -199,7 +200,7 @@ | |||
| 199 | ;; If a backend needs to show more information than the default FILE | 200 | ;; If a backend needs to show more information than the default FILE |
| 200 | ;; and STATE in the vc-status listing, it can store that extra | 201 | ;; and STATE in the vc-status listing, it can store that extra |
| 201 | ;; information in `vc-status-fileinfo->extra'. This function can be | 202 | ;; information in `vc-status-fileinfo->extra'. This function can be |
| 202 | ;; used to display that extra information in the vc-status buffer. | 203 | ;; used to display that extra information in the *vc-status* buffer. |
| 203 | ;; | 204 | ;; |
| 204 | ;; - status-fileinfo-extra (file) | 205 | ;; - status-fileinfo-extra (file) |
| 205 | ;; | 206 | ;; |
| @@ -362,6 +363,11 @@ | |||
| 362 | ;; Modify the change comments associated with the files at the | 363 | ;; Modify the change comments associated with the files at the |
| 363 | ;; given revision. This is optional, many backends do not support it. | 364 | ;; given revision. This is optional, many backends do not support it. |
| 364 | ;; | 365 | ;; |
| 366 | ;; - mark-resolved (files) | ||
| 367 | ;; | ||
| 368 | ;; Mark conflicts as resolved. Some VC systems need to run a | ||
| 369 | ;; command to mark conflicts as resolved. | ||
| 370 | ;; | ||
| 365 | ;; HISTORY FUNCTIONS | 371 | ;; HISTORY FUNCTIONS |
| 366 | ;; | 372 | ;; |
| 367 | ;; * print-log (files &optional buffer) | 373 | ;; * print-log (files &optional buffer) |
| @@ -583,20 +589,21 @@ | |||
| 583 | ;; | 589 | ;; |
| 584 | ;; - "snapshots" should be renamed to "branches", and thoroughly reworked. | 590 | ;; - "snapshots" should be renamed to "branches", and thoroughly reworked. |
| 585 | ;; | 591 | ;; |
| 586 | ;; - the backend sometimes knows when a file it opens has been marked | 592 | ;; - when a file is in `conflict' state, turn on smerge-mode. |
| 587 | ;; by the VCS as having a "conflict". Find a way to pass this info - | 593 | ;; |
| 588 | ;; to VC so that it can turn on smerge-mode when opening such a | 594 | ;; - figure out what to do with conflicts that are not caused by the |
| 589 | ;; file. | 595 | ;; file contents, but by metadata or other causes. |
| 590 | ;; | 596 | ;; |
| 591 | ;; - add a generic mechanism for remembering the current branch names, | 597 | ;; - add a generic mechanism for remembering the current branch names, |
| 592 | ;; display the branch name in the mode-line. Replace | 598 | ;; display the branch name in the mode-line. Replace |
| 593 | ;; vc-cvs-sticky-tag with that. | 599 | ;; vc-cvs-sticky-tag with that. |
| 594 | ;; | 600 | ;; |
| 595 | ;; - vc-diff should be able to show the diff for all files in a | 601 | ;; - vc-diff should be able to show the diff for all files in a |
| 596 | ;; changeset, especially for VC systems that have per repository version numbers. | 602 | ;; changeset, especially for VC systems that have per repository |
| 597 | ;; log-view should take advantage of this. | 603 | ;; version numbers. log-view should take advantage of this. |
| 598 | ;; | 604 | ;; |
| 599 | ;; - a way to do repository wide log (instead of just per file/fileset) is needed. | 605 | ;; - a way to do repository wide log (instead of just per |
| 606 | ;; file/fileset) is needed. | ||
| 600 | ;; | 607 | ;; |
| 601 | ;; - the *VC-log* buffer needs font-locking. | 608 | ;; - the *VC-log* buffer needs font-locking. |
| 602 | ;; | 609 | ;; |
| @@ -615,7 +622,14 @@ | |||
| 615 | ;; - vc-next-action should do something about 'missing files. Maybe | 622 | ;; - vc-next-action should do something about 'missing files. Maybe |
| 616 | ;; just warn, or offer to checkout. | 623 | ;; just warn, or offer to checkout. |
| 617 | ;; | 624 | ;; |
| 618 | ;; - decide if vc-status should replace vc-dired. | 625 | ;; - display the directory names in vc-status, similar to what PCL-CVS |
| 626 | ;; does. | ||
| 627 | ;; | ||
| 628 | ;; - most vc-status backends need more work. They might need to | ||
| 629 | ;; provide custom headers, use the `extra' field and deal with all | ||
| 630 | ;; possible VC states. | ||
| 631 | ;; | ||
| 632 | ;; - add function that calls vc-status to `find-directory-functions'. | ||
| 619 | ;; | 633 | ;; |
| 620 | ;; - vc-status needs mouse bindings. | 634 | ;; - vc-status needs mouse bindings. |
| 621 | ;; | 635 | ;; |
| @@ -623,12 +637,13 @@ | |||
| 623 | ;; | 637 | ;; |
| 624 | ;; - vc-status toolbar needs more icons. | 638 | ;; - vc-status toolbar needs more icons. |
| 625 | ;; | 639 | ;; |
| 626 | ;; - the dir-status backend function should take as an argument an | 640 | ;; - vc-status needs a command to insert a file entry in the status |
| 627 | ;; optional fileset. and return the results just for that fileset. | 641 | ;; display, similar to `cvs-mode-insert'. |
| 628 | ;; This can be used to speed up status buffer updates after VC | ||
| 629 | ;; operations. | ||
| 630 | ;; | 642 | ;; |
| 631 | ;; - keep the *vc-status* buffer sorted by file name. | 643 | ;; - the dir-status backend function should take as an argument an |
| 644 | ;; optional fileset, and should return the results just for that | ||
| 645 | ;; fileset. This can be used to speed up status buffer updates | ||
| 646 | ;; after VC operations. | ||
| 632 | ;; | 647 | ;; |
| 633 | ;; - vc-status: refresh should not completely wipe out the current | 648 | ;; - vc-status: refresh should not completely wipe out the current |
| 634 | ;; contents of the vc-status buffer. | 649 | ;; contents of the vc-status buffer. |
| @@ -646,6 +661,7 @@ | |||
| 646 | 661 | ||
| 647 | (require 'vc-hooks) | 662 | (require 'vc-hooks) |
| 648 | (require 'tool-bar) | 663 | (require 'tool-bar) |
| 664 | (require 'ewoc) | ||
| 649 | 665 | ||
| 650 | (eval-when-compile | 666 | (eval-when-compile |
| 651 | (require 'cl) | 667 | (require 'cl) |
| @@ -1478,7 +1494,7 @@ Otherwise, throw an error." | |||
| 1478 | (defsubst vc-editable-p (file) | 1494 | (defsubst vc-editable-p (file) |
| 1479 | "Return non-nil if FILE can be edited." | 1495 | "Return non-nil if FILE can be edited." |
| 1480 | (or (eq (vc-checkout-model file) 'implicit) | 1496 | (or (eq (vc-checkout-model file) 'implicit) |
| 1481 | (memq (vc-state file) '(edited needs-merge)))) | 1497 | (memq (vc-state file) '(edited needs-merge conflict)))) |
| 1482 | 1498 | ||
| 1483 | (defun vc-revert-buffer-internal (&optional arg no-confirm) | 1499 | (defun vc-revert-buffer-internal (&optional arg no-confirm) |
| 1484 | "Revert buffer, keeping point and mark where user expects them. | 1500 | "Revert buffer, keeping point and mark where user expects them. |
| @@ -1667,6 +1683,9 @@ merge in the changes into your working copy." | |||
| 1667 | (read-string (format "%s revision to steal: " file)) | 1683 | (read-string (format "%s revision to steal: " file)) |
| 1668 | (vc-working-revision file)) | 1684 | (vc-working-revision file)) |
| 1669 | state))) | 1685 | state))) |
| 1686 | ;; conflict | ||
| 1687 | ((eq state 'conflict) | ||
| 1688 | (vc-mark-resolved files)) | ||
| 1670 | ;; needs-patch | 1689 | ;; needs-patch |
| 1671 | ((eq state 'needs-patch) | 1690 | ((eq state 'needs-patch) |
| 1672 | (dolist (file files) | 1691 | (dolist (file files) |
| @@ -1901,6 +1920,13 @@ After check-out, runs the normal hook `vc-checkout-hook'." | |||
| 1901 | (vc-resynch-buffer file t t) | 1920 | (vc-resynch-buffer file t t) |
| 1902 | (run-hooks 'vc-checkout-hook)) | 1921 | (run-hooks 'vc-checkout-hook)) |
| 1903 | 1922 | ||
| 1923 | (defun vc-mark-resolved (files) | ||
| 1924 | (with-vc-properties | ||
| 1925 | files | ||
| 1926 | (vc-call mark-resolved files) | ||
| 1927 | ;; XXX: Is this TRTD? Might not be. | ||
| 1928 | `((vc-state . edited)))) | ||
| 1929 | |||
| 1904 | (defun vc-steal-lock (file rev owner) | 1930 | (defun vc-steal-lock (file rev owner) |
| 1905 | "Steal the lock on FILE." | 1931 | "Steal the lock on FILE." |
| 1906 | (let (file-description) | 1932 | (let (file-description) |
| @@ -2673,9 +2699,7 @@ With prefix arg READ-SWITCHES, specify a value to override | |||
| 2673 | vc-dired-switches | 2699 | vc-dired-switches |
| 2674 | 'vc-dired-mode)))) | 2700 | 'vc-dired-mode)))) |
| 2675 | 2701 | ||
| 2676 | ;;; Experimental code for the vc-dired replacement | 2702 | ;; VC status implementation |
| 2677 | (require 'ewoc) | ||
| 2678 | |||
| 2679 | 2703 | ||
| 2680 | ;; Used to store information for the files displayed in the *VC status* buffer. | 2704 | ;; Used to store information for the files displayed in the *VC status* buffer. |
| 2681 | ;; Each item displayed corresponds to one of these defstructs. | 2705 | ;; Each item displayed corresponds to one of these defstructs. |
| @@ -2722,7 +2746,7 @@ specific headers." | |||
| 2722 | (propertize | 2746 | (propertize |
| 2723 | (format "%-20s" state) | 2747 | (format "%-20s" state) |
| 2724 | 'face (cond ((eq state 'up-to-date) 'font-lock-builtin-face) | 2748 | 'face (cond ((eq state 'up-to-date) 'font-lock-builtin-face) |
| 2725 | ((eq state 'missing) 'font-lock-warning-face) | 2749 | ((memq state '(missing conflict)) 'font-lock-warning-face) |
| 2726 | (t 'font-lock-variable-name-face)) | 2750 | (t 'font-lock-variable-name-face)) |
| 2727 | 'mouse-face 'highlight) | 2751 | 'mouse-face 'highlight) |
| 2728 | " " | 2752 | " " |
| @@ -2956,7 +2980,7 @@ specific headers." | |||
| 2956 | (defun vc-status-mode () | 2980 | (defun vc-status-mode () |
| 2957 | "Major mode for VC status. | 2981 | "Major mode for VC status. |
| 2958 | \\{vc-status-mode-map}" | 2982 | \\{vc-status-mode-map}" |
| 2959 | (setq mode-name "*VC Status*") | 2983 | (setq mode-name "VC Status") |
| 2960 | (setq major-mode 'vc-status-mode) | 2984 | (setq major-mode 'vc-status-mode) |
| 2961 | (setq buffer-read-only t) | 2985 | (setq buffer-read-only t) |
| 2962 | (set (make-local-variable 'vc-status-crt-marked) nil) | 2986 | (set (make-local-variable 'vc-status-crt-marked) nil) |
| @@ -3278,8 +3302,6 @@ that share the same state." | |||
| 3278 | ;; not needed. | 3302 | ;; not needed. |
| 3279 | (unless found-vc-status-buf (remove-hook 'after-save-hook 'vc-status-mark-buffer-changed))))) | 3303 | (unless found-vc-status-buf (remove-hook 'after-save-hook 'vc-status-mark-buffer-changed))))) |
| 3280 | 3304 | ||
| 3281 | ;;; End experimental code. | ||
| 3282 | |||
| 3283 | ;; Named-configuration entry points | 3305 | ;; Named-configuration entry points |
| 3284 | 3306 | ||
| 3285 | (defun vc-snapshot-precondition (dir) | 3307 | (defun vc-snapshot-precondition (dir) |
| @@ -3909,11 +3931,11 @@ to provide the `find-revision' operation instead." | |||
| 3909 | 3931 | ||
| 3910 | (defun vc-default-comment-history (backend file) | 3932 | (defun vc-default-comment-history (backend file) |
| 3911 | "Return a string with all log entries stored in BACKEND for FILE." | 3933 | "Return a string with all log entries stored in BACKEND for FILE." |
| 3912 | (if (vc-find-backend-function backend 'print-log) | 3934 | (when (vc-find-backend-function backend 'print-log) |
| 3913 | (with-current-buffer "*vc*" | 3935 | (with-current-buffer "*vc*" |
| 3914 | (vc-call print-log (list file)) | 3936 | (vc-call print-log (list file)) |
| 3915 | (vc-call-backend backend 'wash-log) | 3937 | (vc-call-backend backend 'wash-log) |
| 3916 | (buffer-string)))) | 3938 | (buffer-string)))) |
| 3917 | 3939 | ||
| 3918 | (defun vc-default-receive-file (backend file rev) | 3940 | (defun vc-default-receive-file (backend file rev) |
| 3919 | "Let BACKEND receive FILE from another version control system." | 3941 | "Let BACKEND receive FILE from another version control system." |