##// END OF EJS Templates
mq.el: allow mq-diff to take a git option.
Bryan O'Sullivan -
r4425:a57ac604 default
parent child Browse files
Show More
@@ -347,11 +347,14 directory is modified."
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
General Comments 0
You need to be logged in to leave comments. Login now