# HG changeset patch # User Bryan O'Sullivan # Date 2007-05-08 18:54:39 # Node ID a57ac6049e2257b6520107a1a4047d8efb2b700f # Parent 1d31302c45223f5b94b3c935977a60d4cca2cd9a mq.el: allow mq-diff to take a git option. diff --git a/contrib/mq.el b/contrib/mq.el --- a/contrib/mq.el +++ b/contrib/mq.el @@ -347,11 +347,14 @@ directory is modified." (error "Not in an MQ repository!")) (find-file (concat root ".hg/patches/series")))) -(defun mq-diff () - "Display a diff of the topmost applied patch." - (interactive) +(defun mq-diff (&optional git) + "Display a diff of the topmost applied patch. +With a prefix argument, display a git-compatible diff." + (interactive "P") (hg-view-output ((format "MQ: Diff of %s" (mq-patch-info "qtop"))) - (call-process (hg-binary) nil t nil "qdiff") + (if git + (call-process (hg-binary) nil t nil "qdiff" "--git") + (call-process (hg-binary) nil t nil "qdiff")) (diff-mode) (font-lock-fontify-buffer)))