emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/vc-hg.el,v


From: Dan Nicolaescu
Subject: [Emacs-diffs] Changes to emacs/lisp/vc-hg.el,v
Date: Fri, 18 Jan 2008 23:33:00 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Dan Nicolaescu <dann>   08/01/18 23:32:59

Index: vc-hg.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-hg.el,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- vc-hg.el    9 Jan 2008 05:15:07 -0000       1.44
+++ vc-hg.el    18 Jan 2008 23:32:57 -0000      1.45
@@ -480,13 +480,8 @@
 
 (define-derived-mode vc-hg-incoming-mode vc-hg-log-view-mode "Hg-Incoming")
 
-
 ;; XXX Experimental function for the vc-dired replacement.
-(defun vc-hg-dir-status (dir)
-  "Return a list of conses (file . state) for DIR."
-  (with-temp-buffer
-    (vc-hg-command (current-buffer) nil dir "status")
-    (goto-char (point-min))
+(defun vc-hg-after-dir-status (update-function buff)
     (let ((status-char nil)
          (file nil)
          (translation '((?= . up-to-date)
@@ -499,6 +494,7 @@
                         (?? . unregistered)))
          (translated nil)
          (result nil))
+      (goto-char (point-min))
       (while (not (eobp))
        (setq status-char (char-after))
        (setq file 
@@ -508,7 +504,17 @@
        (when (and translated (not (eq (cdr translated) 'up-to-date)))
          (push (cons file (cdr translated)) result))
        (forward-line))
-      result)))
+      (funcall update-function result buff)))
+
+;; XXX Experimental function for the vc-dired replacement.
+(defun vc-hg-dir-status (dir update-function status-buffer)
+  "Return a list of conses (file . state) for DIR."
+  (with-current-buffer
+      (get-buffer-create
+       (expand-file-name " *VC-hg* tmp status" dir))
+    (vc-hg-command (current-buffer) 'async dir "status")
+    (vc-exec-after 
+     `(vc-hg-after-dir-status (quote ,update-function) ,status-buffer))))
 
 ;; XXX this adds another top level menu, instead figure out how to
 ;; replace the Log-View menu.




reply via email to

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