diff options
| author | Glenn Morris | 2013-09-11 23:21:33 -0700 |
|---|---|---|
| committer | Glenn Morris | 2013-09-11 23:21:33 -0700 |
| commit | a6ae021fd380c089f25ebbc341fb1c989827ae32 (patch) | |
| tree | 6fdc57937d38d13a70b92b9014e4f769502b2760 | |
| parent | 40e64f0cbd0a3457b29b3e38d1424c37b7b4a03f (diff) | |
| download | emacs-a6ae021fd380c089f25ebbc341fb1c989827ae32.tar.gz emacs-a6ae021fd380c089f25ebbc341fb1c989827ae32.zip | |
* vc/vc-svn.el (vc-svn-parse-status): If there are multiple files
in the status output, assume `filename' is the first.
Fixes: debbugs:15322
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/vc/vc-svn.el | 16 |
2 files changed, 13 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37f63216ff6..37005de6776 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2013-09-12 Glenn Morris <rgm@gnu.org> | 1 | 2013-09-12 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * vc/vc-svn.el (vc-svn-parse-status): If there are multiple files | ||
| 4 | in the status output, assume `filename' is the first. (Bug#15322) | ||
| 5 | |||
| 3 | * vc/vc.el (vc-deduce-fileset): Doc fix. | 6 | * vc/vc.el (vc-deduce-fileset): Doc fix. |
| 4 | 7 | ||
| 5 | * calc/calc-help.el (Info-goto-node): | 8 | * calc/calc-help.el (Info-goto-node): |
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el index afc76c09742..bfd608c0467 100644 --- a/lisp/vc/vc-svn.el +++ b/lisp/vc/vc-svn.el | |||
| @@ -674,19 +674,23 @@ and that it passes `vc-svn-global-switches' to it before FLAGS." | |||
| 674 | 674 | ||
| 675 | (defun vc-svn-parse-status (&optional filename) | 675 | (defun vc-svn-parse-status (&optional filename) |
| 676 | "Parse output of \"svn status\" command in the current buffer. | 676 | "Parse output of \"svn status\" command in the current buffer. |
| 677 | Set file properties accordingly. Unless FILENAME is non-nil, parse only | 677 | Set file properties accordingly. If FILENAME is non-nil, return its status." |
| 678 | information about FILENAME and return its status." | 678 | (let (multifile file status propstat) |
| 679 | (let (file status propstat) | ||
| 680 | (goto-char (point-min)) | 679 | (goto-char (point-min)) |
| 681 | (while (re-search-forward | 680 | (while (re-search-forward |
| 682 | ;; Ignore the files with status X. | 681 | ;; Ignore the files with status X. |
| 683 | "^\\(?:\\?\\|[ ACDGIMR!~][ MC][ L][ +][ S]..\\([ *]\\) +\\([-0-9]+\\) +\\([0-9?]+\\) +\\([^ ]+\\)\\) +" nil t) | 682 | "^\\(?:\\?\\|[ ACDGIMR!~][ MC][ L][ +][ S]..\\([ *]\\) +\\([-0-9]+\\) +\\([0-9?]+\\) +\\([^ ]+\\)\\) +" nil t) |
| 684 | ;; If the username contains spaces, the output format is ambiguous, | 683 | ;; If the username contains spaces, the output format is ambiguous, |
| 685 | ;; so don't trust the output's filename unless we have to. | 684 | ;; so don't trust the output's filename unless we have to. |
| 686 | (setq file (or filename | 685 | (setq file (or (unless multifile filename) |
| 687 | (expand-file-name | 686 | (expand-file-name |
| 688 | (buffer-substring (point) (line-end-position))))) | 687 | (buffer-substring (point) (line-end-position)))) |
| 689 | (setq status (char-after (line-beginning-position)) | 688 | ;; If we are parsing the result of running status on a directory, |
| 689 | ;; there could be multiple files in the output. | ||
| 690 | ;; We assume that filename, if supplied, applies to the first | ||
| 691 | ;; listed file (ie, the directory). Bug#15322. | ||
| 692 | multifile t | ||
| 693 | status (char-after (line-beginning-position)) | ||
| 690 | ;; Status of the item's properties ([ MC]). | 694 | ;; Status of the item's properties ([ MC]). |
| 691 | propstat (char-after (1+ (line-beginning-position)))) | 695 | propstat (char-after (1+ (line-beginning-position)))) |
| 692 | (if (eq status ??) | 696 | (if (eq status ??) |