unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: bug-gnu-emacs <bug-gnu-emacs@gnu.org>
Subject: bug#2964: vc-dir support for vc-mtn.el
Date: Sat, 11 Apr 2009 08:31:48 -0700 (PDT)	[thread overview]
Message-ID: <200904111531.n3BFVmsM012824@godzilla.ics.uci.edu> (raw)

vc-mtn.el does not support vc-dir.

The patch below adds that support.  It reuses some regexps from elsewhere in the file.
Archiving here so that it can be applied whenever it's acceptable.

Index: vc-mtn.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-mtn.el,v
retrieving revision 1.23
diff -u -3 -p -c -r1.23 vc-mtn.el
cvs diff: conflicting specifications of output style
*** vc-mtn.el         1 Apr 2009 20:01:19 -0000 1.23
--- vc-mtn.el         11 Apr 2009 07:44:39 -0000
*************** If nil, use the value of `vc-diff-switch
*** 106,111 ****
--- 106,126 ----
         ((match-end 2) 'added)
              (t 'up-to-date)))))
  
+ (defun vc-mtn-after-dir-status (update-function)
+   (let (result)
+     (goto-char (point-min))
+     (re-search-forward "Current branch: \\(.*\\)\nChanges against parent \\(.*\\)" nil t)
+     (while (re-search-forward
+         "^  \\(?:\\(patched  \\)\\|\\(added    \\)\\)\\(.*\\)$" nil t)
+       (cond  ((match-end 1) (push (list (match-string 3) 'edited) result))
+            ((match-end 2) (push (list (match-string 3) 'added) result))))
+     (funcall update-function result)))
+ 
+ (defun vc-mtn-dir-status (dir update-function)
+   (vc-mtn-command (current-buffer) 'async dir "status")
+   (vc-exec-after
+    `(vc-mtn-after-dir-status (quote ,update-function))))
+ 
  (defun vc-mtn-working-revision (file)
    ;; If `mtn' fails or returns status>0, or if the search fails, just
    ;; return nil.







             reply	other threads:[~2009-04-11 15:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200908261835.n7QIZMTP023389@godzilla.ics.uci.edu>
2009-04-11 15:31 ` Dan Nicolaescu [this message]
2009-08-26 18:40   ` bug#2964: marked as done (vc-dir support for vc-mtn.el) Emacs bug Tracking System

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=200904111531.n3BFVmsM012824@godzilla.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=2964@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@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).