equal
deleted
inserted
replaced
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) |