From: Glenn Morris <rgm@gnu.org>
To: 1046@emacsbugs.donarmstrong.com
Cc: Nick Roberts <nickrob@gnu.org>
Subject: bug#1046: 23.0.60; vc-dir with Subversion
Date: Wed, 01 Oct 2008 12:05:02 -0400 [thread overview]
Message-ID: <waabdojo7l.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <uhprmkepug.fsf@fencepost.gnu.org> (Glenn Morris's message of "Wed, 01 Oct 2008 03:28:39 -0400")
Slight revision to distinguish needs-update and needs-merge.
Perhaps there are other states.
*** vc-svn.el 7 Sep 2008 20:24:29 -0000 1.96
--- vc-svn.el 1 Oct 2008 16:00:28 -0000
***************
*** 146,152 ****
"SVN-specific state heuristic."
(vc-svn-state file 'local))
! (defun vc-svn-after-dir-status (callback)
(let ((state-map '((?A . added)
(?C . conflict)
(?D . removed)
--- 146,152 ----
"SVN-specific state heuristic."
(vc-svn-state file 'local))
! (defun vc-svn-after-dir-status (callback &optional remote)
(let ((state-map '((?A . added)
(?C . conflict)
(?D . removed)
***************
*** 156,166 ****
(?? . unregistered)
;; This is what vc-svn-parse-status does.
(?~ . edited)))
result)
(goto-char (point-min))
! (while (re-search-forward "^\\(.\\)..... \\(.*\\)$" nil t)
(let ((state (cdr (assq (aref (match-string 1) 0) state-map)))
! (filename (match-string 2)))
(when state
(setq result (cons (list filename state) result)))))
(funcall callback result)))
--- 156,173 ----
(?? . unregistered)
;; This is what vc-svn-parse-status does.
(?~ . edited)))
+ (re (if remote "^\\(.\\)..... \\([ *]\\) +[-0-9]+ +\\(.*\\)$"
+ ;; Subexp 2 is a dummy in this case, so the numbers match.
+ "^\\(.\\)....\\(.\\) \\(.*\\)$"))
result)
(goto-char (point-min))
! (while (re-search-forward re nil t)
(let ((state (cdr (assq (aref (match-string 1) 0) state-map)))
! (filename (match-string 3)))
! (and remote (string-equal (match-string 2) "*")
! (setq state (if (eq state 'edited)
! 'needs-merge
! 'needs-update)))
(when state
(setq result (cons (list filename state) result)))))
(funcall callback result)))
***************
*** 169,177 ****
"Run 'svn status' for DIR and update BUFFER via CALLBACK.
CALLBACK is called as (CALLBACK RESULT BUFFER), where
RESULT is a list of conses (FILE . STATE) for directory DIR."
! (vc-svn-command (current-buffer) 'async nil "status")
(vc-exec-after
! `(vc-svn-after-dir-status (quote ,callback))))
(defun vc-svn-status-extra-headers (dir)
"Generate extra status headers for a Subversion working copy."
--- 176,187 ----
"Run 'svn status' for DIR and update BUFFER via CALLBACK.
CALLBACK is called as (CALLBACK RESULT BUFFER), where
RESULT is a list of conses (FILE . STATE) for directory DIR."
! ;; FIXME should this rather be all the files in dir?
! (let ((remote (not (vc-stay-local-p dir))))
! (vc-svn-command (current-buffer) 'async nil "status"
! (if remote "-u"))
(vc-exec-after
! `(vc-svn-after-dir-status (quote ,callback) ,remote))))
(defun vc-svn-status-extra-headers (dir)
"Generate extra status headers for a Subversion working copy."
next prev parent reply other threads:[~2008-10-01 16:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-28 7:33 bug#1046: 23.0.60; vc-dir with Subversion Nick Roberts
2008-10-01 7:28 ` Glenn Morris
2008-10-01 16:05 ` Glenn Morris [this message]
2008-10-01 23:03 ` Glenn Morris
2008-10-04 8:53 ` Nick Roberts
2008-10-04 19:54 ` Glenn Morris
2008-10-06 14:18 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=waabdojo7l.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=1046@emacsbugs.donarmstrong.com \
--cc=nickrob@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).