# HG changeset patch # User Bryan O'Sullivan # Date 2007-05-08 18:54:39 # Node ID 807c7b99ff137e6300e2860c64a37acf829ac3dd # Parent a57ac6049e2257b6520107a1a4047d8efb2b700f imported patch mq-refresh-git.patch diff --git a/contrib/mq.el b/contrib/mq.el --- a/contrib/mq.el +++ b/contrib/mq.el @@ -197,13 +197,14 @@ If PATCH is nil, pop at most one patch." (message "Refreshing %s... done." patch) (error "Refreshing %s... %s" patch (hg-chomp (cdr ret))))))) -(defun mq-refresh () - "Refresh the topmost applied patch." - (interactive) +(defun mq-refresh (&optional git) + "Refresh the topmost applied patch. +With a prefix argument, generate a git-compatible patch." + (interactive "P") (let ((root (hg-root))) (unless root (error "Cannot refresh outside of a repository!")) - (mq-refresh-internal root))) + (apply 'mq-refresh-internal root (if git '("--git"))))) (defun mq-patch-info (cmd &optional msg) (let* ((ret (hg-run cmd))