[PATCH] mq: fix the deprecation comment for qsave & qrestore

Dan Villiom Podlaski Christiansen danchr at gmail.com
Mon Sep 20 06:33:27 CDT 2010


# HG changeset patch
# User Dan Villiom Podlaski Christiansen <danchr at gmail.com>
# Date 1284982262 -7200
# Node ID 0b965ece4f058ed0c66bee26425233adc07b5842
# Parent  6ca072791661e53c9596570490247c0519e12e7e
mq: fix the deprecation comment for qsave & qrestore.

Changeset bcf90e712dc3 deprecated qsave and qrestore. In the
deprecating comment, users were referred to 'rebase --mq' which -- at
the time the message was written -- didn't exist. Currently, on the
default branch, rebase *does* take a '--mq' option, but it probably
doesn't do what Dirkjan expected it to do when he wrote the message.

In the original, deprecating commit, little context was provided as to
why this change was made. Based on my recollection, concensus at the
Paris Sprint in February 2010 was that one of the problems with MQ was
that it exposed far too many commands. Notable among these were qsave
& qrestore: very few core developers understood what they did and even
fewer (none, IIRC) actually used them. However, they couldn't be
removed; not only do the usual backwards compatibility reasons apply,
but the hg book refers to them.

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -2376,7 +2376,7 @@ def rename(ui, repo, patch, name=None, *
 def restore(ui, repo, rev, **opts):
     """restore the queue state saved by a revision (DEPRECATED)
 
-    This command is deprecated, use rebase --mq instead."""
+    This command is deprecated, use :hg:`rebase` instead."""
     rev = repo.lookup(rev)
     q = repo.mq
     q.restore(repo, rev, delete=opts.get('delete'),
@@ -2387,7 +2387,7 @@ def restore(ui, repo, rev, **opts):
 def save(ui, repo, **opts):
     """save current queue state (DEPRECATED)
 
-    This command is deprecated, use rebase --mq instead."""
+    This command is deprecated, use :hg:`rebase` instead."""
     q = repo.mq
     message = cmdutil.logmessage(opts)
     ret = q.save(repo, msg=message)


More information about the Mercurial-devel mailing list