;;; vc-hg.el --- VC backend for the mercurial version control system
-;; Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Ivan Kanis
;; Keywords: tools
(defun vc-hg-dir-state (dir)
(with-temp-buffer
(buffer-disable-undo) ;; Because these buffers can get huge
- (vc-hg-command (current-buffer) nil nil "status" "-A")
+ (vc-hg-command (current-buffer) nil dir "status" "-A")
(goto-char (point-min))
(let ((status-char nil)
(file nil))
(set (make-local-variable 'log-view-font-lock-keywords)
(append
log-view-font-lock-keywords
- ;; Handle the case:
- ;; user: foo@bar
- '(("^user:[ \t]+\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)"
- (1 'change-log-email))
+ '(
;; Handle the case:
;; user: FirstName LastName <foo@bar>
("^user:[ \t]+\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]"
(1 'change-log-name)
(2 'change-log-email))
+ ;; Handle the cases:
+ ;; user: foo@bar
+ ;; and
+ ;; user: foo
+ ("^user:[ \t]+\\([A-Za-z0-9_.+-]+\\(?:@[A-Za-z0-9_.-]+\\)?\\)"
+ (1 'change-log-email))
("^date: \\(.+\\)" (1 'change-log-date))
("^summary:[ \t]+\\(.+\\)" (1 'log-view-message))))))
(defun vc-hg-dir-status (dir)
"Return a list of conses (file . state) for DIR."
(with-temp-buffer
- (vc-hg-command (current-buffer) nil nil "status" "-A")
+ (vc-hg-command (current-buffer) nil dir "status")
(goto-char (point-min))
(let ((status-char nil)
(file nil)