Mercurial > emacs
comparison lisp/vc-svn.el @ 87477:b5060e79eb98
* vc-svn.el (vc-svn-parse-status): Recognize 'added, 'removed,
and 'unregistered states.
* vc-hooks.el (vc-state): Added 'removed state to documentation.
* vc-hg (vc-hg-parse-status): Recognize 'added, 'removed, and
'up-to-date state. Deal with the possibility that C for clean
might change to "=" in the next point release.
* vc-git.el (vc-git-parse-status): Recognize 'removed.
* vc.el (header comment): Better description of new dir-state.
(vc-compatible-state): Defines which states are mutually
compatible; usable with 'edited as a test for which can be committed on.
(vc-dired-hook): Turn off undo in the VC-Dired buffer, a speed tweak.
(vc-default-dired-state-info): Display 'removed state.
* vc-bzr.el (vc-bzr-dir-state): Recognize 'added.
author | Eric S. Raymond <esr@snark.thyrsus.com> |
---|---|
date | Sat, 29 Dec 2007 13:20:49 +0000 |
parents | 71fc7b1db920 |
children | 4146f1cc135e |
comparison
equal
deleted
inserted
replaced
87476:6455e422c87c | 87477:b5060e79eb98 |
---|---|
541 Set file properties accordingly. Unless FILENAME is non-nil, parse only | 541 Set file properties accordingly. Unless FILENAME is non-nil, parse only |
542 information about FILENAME and return its status." | 542 information about FILENAME and return its status." |
543 (let (file status) | 543 (let (file status) |
544 (goto-char (point-min)) | 544 (goto-char (point-min)) |
545 (while (re-search-forward | 545 (while (re-search-forward |
546 ;; Ignore the files with status in [IX?]. | 546 ;; Ignore the files with status X. |
547 "^[ ACDGMR!~][ MC][ L][ +][ S]..\\([ *]\\) +\\([-0-9]+\\) +\\([0-9?]+\\) +\\([^ ]+\\) +" nil t) | 547 "^[ ACDGIMR!?~][ MC][ L][ +][ S]..\\([ *]\\) +\\([-0-9]+\\) +\\([0-9?]+\\) +\\([^ ]+\\) +" nil t) |
548 ;; If the username contains spaces, the output format is ambiguous, | 548 ;; If the username contains spaces, the output format is ambiguous, |
549 ;; so don't trust the output's filename unless we have to. | 549 ;; so don't trust the output's filename unless we have to. |
550 (setq file (or filename | 550 (setq file (or filename |
551 (expand-file-name | 551 (expand-file-name |
552 (buffer-substring (point) (line-end-position))))) | 552 (buffer-substring (point) (line-end-position))))) |
553 (setq status (char-after (line-beginning-position))) | 553 (setq status (char-after (line-beginning-position))) |
554 (unless (eq status ??) | 554 (if (eq status ??) |
555 (vc-file-setprop file 'vc-state 'unregistered) | |
555 ;; `vc-BACKEND-registered' must not set vc-backend, | 556 ;; `vc-BACKEND-registered' must not set vc-backend, |
556 ;; which is instead set in vc-registered. | 557 ;; which is instead set in vc-registered. |
557 (unless filename (vc-file-setprop file 'vc-backend 'SVN)) | 558 (unless filename (vc-file-setprop file 'vc-backend 'SVN)) |
558 ;; Use the last-modified revision, so that searching in vc-print-log | 559 ;; Use the last-modified revision, so that searching in vc-print-log |
559 ;; output works. | 560 ;; output works. |
571 'up-to-date)) | 572 'up-to-date)) |
572 ((eq status ?A) | 573 ((eq status ?A) |
573 ;; If the file was actually copied, (match-string 2) is "-". | 574 ;; If the file was actually copied, (match-string 2) is "-". |
574 (vc-file-setprop file 'vc-working-revision "0") | 575 (vc-file-setprop file 'vc-working-revision "0") |
575 (vc-file-setprop file 'vc-checkout-time 0) | 576 (vc-file-setprop file 'vc-checkout-time 0) |
576 'edited) | 577 'added) |
577 ((memq status '(?M ?C)) | 578 ((memq status '(?M ?C)) |
578 (if (eq (char-after (match-beginning 1)) ?*) | 579 (if (eq (char-after (match-beginning 1)) ?*) |
579 'needs-merge | 580 'needs-merge |
580 'edited)) | 581 'edited)) |
581 ((eq status ?I) | 582 ((eq status ?I) |
582 (vc-file-setprop file 'vc-state 'ignored)) | 583 (vc-file-setprop file 'vc-state 'ignored)) |
583 ((eq status ??) | 584 ((eq status ?R) |
584 (vc-file-setprop file 'vc-state 'unregistered)) | 585 (vc-file-setprop file 'vc-state 'removed)) |
585 (t 'edited))))) | 586 (t 'edited))))) |
586 (if filename (vc-file-getprop filename 'vc-state)))) | 587 (if filename (vc-file-getprop filename 'vc-state)))) |
587 | 588 |
588 (defun vc-svn-dir-state-heuristic (dir) | 589 (defun vc-svn-dir-state-heuristic (dir) |
589 "Find the SVN state of all files in DIR, using only local information." | 590 "Find the SVN state of all files in DIR, using only local information." |