Show More
@@ -554,6 +554,23 b' current frame."' | |||||
554 | (cdr state) |
|
554 | (cdr state) | |
555 | 'normal))))) |
|
555 | 'normal))))) | |
556 |
|
556 | |||
|
557 | (defun hg-status (&rest paths) | |||
|
558 | "Return status of PATHS as an alist. | |||
|
559 | Each entry is a pair (FILE-NAME . STATUS)." | |||
|
560 | (let ((s (apply 'hg-run "status" "-marduc" paths)) | |||
|
561 | result) | |||
|
562 | (dolist (entry (split-string (hg-chomp (cdr s)) "\n") (nreverse result)) | |||
|
563 | (let ((state (cdr (assoc (substring entry 0 2) | |||
|
564 | '(("M " . modified) | |||
|
565 | ("A " . added) | |||
|
566 | ("R " . removed) | |||
|
567 | ("! " . deleted) | |||
|
568 | ("C " . normal) | |||
|
569 | ("I " . ignored) | |||
|
570 | ("? " . nil))))) | |||
|
571 | (name (substring entry 2))) | |||
|
572 | (setq result (cons (cons name state) result))))))) | |||
|
573 | ||||
557 | (defmacro hg-view-output (args &rest body) |
|
574 | (defmacro hg-view-output (args &rest body) | |
558 | "Execute BODY in a clean buffer, then quickly display that buffer. |
|
575 | "Execute BODY in a clean buffer, then quickly display that buffer. | |
559 | If the buffer contains one line, its contents are displayed in the |
|
576 | If the buffer contains one line, its contents are displayed in the |
General Comments 0
You need to be logged in to leave comments.
Login now