emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114233: * vc/vc-svn.el (vc-svn-parse-status): If th


From: Glenn Morris
Subject: [Emacs-diffs] trunk r114233: * vc/vc-svn.el (vc-svn-parse-status): If there are multiple files
Date: Thu, 12 Sep 2013 06:21:38 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114233
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15322
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-09-11 23:21:33 -0700
message:
  * vc/vc-svn.el (vc-svn-parse-status): If there are multiple files
  in the status output, assume `filename' is the first.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/vc/vc-svn.el              vcsvn.el-20091113204419-o5vbwnq5f7feedwu-2575
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-09-12 06:10:12 +0000
+++ b/lisp/ChangeLog    2013-09-12 06:21:33 +0000
@@ -1,5 +1,8 @@
 2013-09-12  Glenn Morris  <address@hidden>
 
+       * vc/vc-svn.el (vc-svn-parse-status): If there are multiple files
+       in the status output, assume `filename' is the first.  (Bug#15322)
+
        * vc/vc.el (vc-deduce-fileset): Doc fix.
 
        * calc/calc-help.el (Info-goto-node):

=== modified file 'lisp/vc/vc-svn.el'
--- a/lisp/vc/vc-svn.el 2013-09-04 21:09:42 +0000
+++ b/lisp/vc/vc-svn.el 2013-09-12 06:21:33 +0000
@@ -674,19 +674,23 @@
 
 (defun vc-svn-parse-status (&optional filename)
   "Parse output of \"svn status\" command in the current buffer.
-Set file properties accordingly.  Unless FILENAME is non-nil, parse only
-information about FILENAME and return its status."
-  (let (file status propstat)
+Set file properties accordingly.  If FILENAME is non-nil, return its status."
+  (let (multifile file status propstat)
     (goto-char (point-min))
     (while (re-search-forward
             ;; Ignore the files with status X.
            "^\\(?:\\?\\|[ ACDGIMR!~][ MC][ L][ +][ S]..\\([ *]\\) 
+\\([-0-9]+\\) +\\([0-9?]+\\) +\\([^ ]+\\)\\) +" nil t)
       ;; If the username contains spaces, the output format is ambiguous,
       ;; so don't trust the output's filename unless we have to.
-      (setq file (or filename
+      (setq file (or (unless multifile filename)
                      (expand-file-name
-                      (buffer-substring (point) (line-end-position)))))
-      (setq status (char-after (line-beginning-position))
+                      (buffer-substring (point) (line-end-position))))
+            ;; If we are parsing the result of running status on a directory,
+            ;; there could be multiple files in the output.
+            ;; We assume that filename, if supplied, applies to the first
+            ;; listed file (ie, the directory).  Bug#15322.
+            multifile t
+            status (char-after (line-beginning-position))
             ;; Status of the item's properties ([ MC]).
             propstat (char-after (1+ (line-beginning-position))))
       (if (eq status ??)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]