Mercurial > hg > mercurial-crew-with-dirclash
comparison contrib/mq.el @ 4425:a57ac6049e22
mq.el: allow mq-diff to take a git option.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue, 08 May 2007 11:54:39 -0700 |
parents | 1d31302c4522 |
children | 807c7b99ff13 |
comparison
equal
deleted
inserted
replaced
4424:1d31302c4522 | 4425:a57ac6049e22 |
---|---|
345 (let ((root (hg-root))) | 345 (let ((root (hg-root))) |
346 (unless root | 346 (unless root |
347 (error "Not in an MQ repository!")) | 347 (error "Not in an MQ repository!")) |
348 (find-file (concat root ".hg/patches/series")))) | 348 (find-file (concat root ".hg/patches/series")))) |
349 | 349 |
350 (defun mq-diff () | 350 (defun mq-diff (&optional git) |
351 "Display a diff of the topmost applied patch." | 351 "Display a diff of the topmost applied patch. |
352 (interactive) | 352 With a prefix argument, display a git-compatible diff." |
353 (interactive "P") | |
353 (hg-view-output ((format "MQ: Diff of %s" (mq-patch-info "qtop"))) | 354 (hg-view-output ((format "MQ: Diff of %s" (mq-patch-info "qtop"))) |
354 (call-process (hg-binary) nil t nil "qdiff") | 355 (if git |
356 (call-process (hg-binary) nil t nil "qdiff" "--git") | |
357 (call-process (hg-binary) nil t nil "qdiff")) | |
355 (diff-mode) | 358 (diff-mode) |
356 (font-lock-fontify-buffer))) | 359 (font-lock-fontify-buffer))) |
357 | 360 |
358 | 361 |
359 (provide 'mq) | 362 (provide 'mq) |