diff options
| author | Glenn Morris | 2011-01-18 19:49:00 -0800 |
|---|---|---|
| committer | Glenn Morris | 2011-01-18 19:49:00 -0800 |
| commit | 5dd4f3f7c7057b423e2d73c691761d52e5fd695a (patch) | |
| tree | 1b81d22d905a969ac140cd9c474fa5cc1157a8e1 | |
| parent | 29208e8237a91a28fc5ab30f020ddc65c9ec14b7 (diff) | |
| download | emacs-5dd4f3f7c7057b423e2d73c691761d52e5fd695a.tar.gz emacs-5dd4f3f7c7057b423e2d73c691761d52e5fd695a.zip | |
vc-svn fix for bug#7861.
* lisp/vc/vc-svn.el (vc-svn-after-dir-status, vc-svn-parse-status):
Also check the property status.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/vc/vc-svn.el | 27 |
2 files changed, 22 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7282231025e..0fcc4687ce3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-01-19 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * vc/vc-svn.el (vc-svn-after-dir-status, vc-svn-parse-status): | ||
| 4 | Also check the property status. (Bug#7861) | ||
| 5 | |||
| 1 | 2011-01-18 Michael Albinus <michael.albinus@gmx.de> | 6 | 2011-01-18 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 7 | ||
| 3 | * net/tramp.el (tramp-debug-message): Extend function exclude | 8 | * net/tramp.el (tramp-debug-message): Extend function exclude |
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index 2a4a79f0ec6..d0b6e3841fa 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el | |||
| @@ -171,15 +171,18 @@ want to force an empty list of arguments, use t." | |||
| 171 | (?? . unregistered) | 171 | (?? . unregistered) |
| 172 | ;; This is what vc-svn-parse-status does. | 172 | ;; This is what vc-svn-parse-status does. |
| 173 | (?~ . edited))) | 173 | (?~ . edited))) |
| 174 | (re (if remote "^\\(.\\)......? \\([ *]\\) +\\(?:[-0-9]+\\)? \\(.*\\)$" | 174 | (re (if remote "^\\(.\\)\\(.\\).....? \\([ *]\\) +\\(?:[-0-9]+\\)? \\(.*\\)$" |
| 175 | ;; Subexp 2 is a dummy in this case, so the numbers match. | 175 | ;; Subexp 3 is a dummy in this case, so the numbers match. |
| 176 | "^\\(.\\)....\\(.\\) \\(.*\\)$")) | 176 | "^\\(.\\)\\(.\\)...\\(.\\) \\(.*\\)$")) |
| 177 | result) | 177 | result) |
| 178 | (goto-char (point-min)) | 178 | (goto-char (point-min)) |
| 179 | (while (re-search-forward re nil t) | 179 | (while (re-search-forward re nil t) |
| 180 | (let ((state (cdr (assq (aref (match-string 1) 0) state-map))) | 180 | (let ((state (cdr (assq (aref (match-string 1) 0) state-map))) |
| 181 | (filename (match-string 3))) | 181 | (propstat (cdr (assq (aref (match-string 2) 0) state-map))) |
| 182 | (and remote (string-equal (match-string 2) "*") | 182 | (filename (match-string 4))) |
| 183 | (if (memq propstat '(conflict edited)) | ||
| 184 | (setq state propstat)) | ||
| 185 | (and remote (string-equal (match-string 3) "*") | ||
| 183 | ;; FIXME are there other possible combinations? | 186 | ;; FIXME are there other possible combinations? |
| 184 | (cond ((eq state 'edited) (setq state 'needs-merge)) | 187 | (cond ((eq state 'edited) (setq state 'needs-merge)) |
| 185 | ((not state) (setq state 'needs-update)))) | 188 | ((not state) (setq state 'needs-update)))) |
| @@ -643,7 +646,7 @@ and that it passes `vc-svn-global-switches' to it before FLAGS." | |||
| 643 | "Parse output of \"svn status\" command in the current buffer. | 646 | "Parse output of \"svn status\" command in the current buffer. |
| 644 | Set file properties accordingly. Unless FILENAME is non-nil, parse only | 647 | Set file properties accordingly. Unless FILENAME is non-nil, parse only |
| 645 | information about FILENAME and return its status." | 648 | information about FILENAME and return its status." |
| 646 | (let (file status) | 649 | (let (file status propstat) |
| 647 | (goto-char (point-min)) | 650 | (goto-char (point-min)) |
| 648 | (while (re-search-forward | 651 | (while (re-search-forward |
| 649 | ;; Ignore the files with status X. | 652 | ;; Ignore the files with status X. |
| @@ -653,7 +656,9 @@ information about FILENAME and return its status." | |||
| 653 | (setq file (or filename | 656 | (setq file (or filename |
| 654 | (expand-file-name | 657 | (expand-file-name |
| 655 | (buffer-substring (point) (line-end-position))))) | 658 | (buffer-substring (point) (line-end-position))))) |
| 656 | (setq status (char-after (line-beginning-position))) | 659 | (setq status (char-after (line-beginning-position)) |
| 660 | ;; Status of the item's properties ([ MC]). | ||
| 661 | propstat (char-after (1+ (line-beginning-position)))) | ||
| 657 | (if (eq status ??) | 662 | (if (eq status ??) |
| 658 | (vc-file-setprop file 'vc-state 'unregistered) | 663 | (vc-file-setprop file 'vc-state 'unregistered) |
| 659 | ;; Use the last-modified revision, so that searching in vc-print-log | 664 | ;; Use the last-modified revision, so that searching in vc-print-log |
| @@ -664,7 +669,7 @@ information about FILENAME and return its status." | |||
| 664 | (vc-file-setprop | 669 | (vc-file-setprop |
| 665 | file 'vc-state | 670 | file 'vc-state |
| 666 | (cond | 671 | (cond |
| 667 | ((eq status ?\ ) | 672 | ((and (eq status ?\ ) (eq propstat ?\ )) |
| 668 | (if (eq (char-after (match-beginning 1)) ?*) | 673 | (if (eq (char-after (match-beginning 1)) ?*) |
| 669 | 'needs-update | 674 | 'needs-update |
| 670 | (vc-file-setprop file 'vc-checkout-time | 675 | (vc-file-setprop file 'vc-checkout-time |
| @@ -675,9 +680,11 @@ information about FILENAME and return its status." | |||
| 675 | (vc-file-setprop file 'vc-working-revision "0") | 680 | (vc-file-setprop file 'vc-working-revision "0") |
| 676 | (vc-file-setprop file 'vc-checkout-time 0) | 681 | (vc-file-setprop file 'vc-checkout-time 0) |
| 677 | 'added) | 682 | 'added) |
| 678 | ((eq status ?C) | 683 | ;; Conflict in contents or properties. |
| 684 | ((or (eq status ?C) (eq propstat ?C)) | ||
| 679 | (vc-file-setprop file 'vc-state 'conflict)) | 685 | (vc-file-setprop file 'vc-state 'conflict)) |
| 680 | ((eq status '?M) | 686 | ;; Modified contents or properties. |
| 687 | ((or (eq status ?M) (eq propstat ?M)) | ||
| 681 | (if (eq (char-after (match-beginning 1)) ?*) | 688 | (if (eq (char-after (match-beginning 1)) ?*) |
| 682 | 'needs-merge | 689 | 'needs-merge |
| 683 | 'edited)) | 690 | 'edited)) |