diff options
| -rw-r--r-- | lisp/vc/vc-hg.el | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index c4d6092d100..8d9493ec210 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el | |||
| @@ -259,6 +259,14 @@ highlighting the Log View buffer." | |||
| 259 | (defvar vc-hg-log-graph nil | 259 | (defvar vc-hg-log-graph nil |
| 260 | "If non-nil, use `--graph' in the short log output.") | 260 | "If non-nil, use `--graph' in the short log output.") |
| 261 | 261 | ||
| 262 | (defvar vc-hg-log-format (concat "changeset: {rev}:{node|short}\n" | ||
| 263 | "{tags % 'tag: {tag}\n'}" | ||
| 264 | "{if(parents, 'parents: {parents}\n')}" | ||
| 265 | "user: {author}\n" | ||
| 266 | "Date: {date|date}\n" | ||
| 267 | "summary: {desc}\n\n") | ||
| 268 | "Mercurial log template for `vc-hg-print-log' long format.") | ||
| 269 | |||
| 262 | (defun vc-hg-print-log (files buffer &optional shortlog start-revision limit) | 270 | (defun vc-hg-print-log (files buffer &optional shortlog start-revision limit) |
| 263 | "Print commit log associated with FILES into specified BUFFER. | 271 | "Print commit log associated with FILES into specified BUFFER. |
| 264 | If SHORTLOG is non-nil, use a short format based on `vc-hg-root-log-format'. | 272 | If SHORTLOG is non-nil, use a short format based on `vc-hg-root-log-format'. |
| @@ -276,9 +284,11 @@ If LIMIT is non-nil, show no more than this many entries." | |||
| 276 | (nconc | 284 | (nconc |
| 277 | (when start-revision (list (format "-r%s:0" start-revision))) | 285 | (when start-revision (list (format "-r%s:0" start-revision))) |
| 278 | (when limit (list "-l" (format "%s" limit))) | 286 | (when limit (list "-l" (format "%s" limit))) |
| 279 | (when shortlog `(,@(if vc-hg-log-graph '("--graph")) | 287 | (if shortlog |
| 280 | "--template" | 288 | `(,@(if vc-hg-log-graph '("--graph")) |
| 281 | ,(car vc-hg-root-log-format))) | 289 | "--template" |
| 290 | ,(car vc-hg-root-log-format)) | ||
| 291 | `("--template" ,vc-hg-log-format)) | ||
| 282 | vc-hg-log-switches))))) | 292 | vc-hg-log-switches))))) |
| 283 | 293 | ||
| 284 | (defvar log-view-message-re) | 294 | (defvar log-view-message-re) |
| @@ -345,7 +355,7 @@ If LIMIT is non-nil, show no more than this many entries." | |||
| 345 | 355 | ||
| 346 | (defun vc-hg-expanded-log-entry (revision) | 356 | (defun vc-hg-expanded-log-entry (revision) |
| 347 | (with-temp-buffer | 357 | (with-temp-buffer |
| 348 | (vc-hg-command t nil nil "log" "-r" revision) | 358 | (vc-hg-command t nil nil "log" "-r" revision "--template" vc-hg-log-format) |
| 349 | (goto-char (point-min)) | 359 | (goto-char (point-min)) |
| 350 | (unless (eobp) | 360 | (unless (eobp) |
| 351 | ;; Indent the expanded log entry. | 361 | ;; Indent the expanded log entry. |