[PATCH STABLE] mq: rewrite strip docstrings
Faheem Mitha
faheem at email.unc.edu
Sat May 1 12:37:03 CDT 2010
Hi,
This patch is intended to improve strip docstrings. This is joint work
with ilowe. See history at http://piratepad.net/mq-docs
Since nobody knows what -b is for, we have marked it deprecated, but
nevertheless fixed the docstring to describe what it actually does.
Regards, Faheem.
# HG changeset patch
# User Faheem Mitha <faheem at email.unc.edu>
# Date 1272735289 -19800
# Branch stable
# Node ID 4a7693c61e9f76ea8ca3ae3c9c9c54255d0f3530
# Parent 59d0d715fbfa7028e50bac9a90561e6c311d6122
mq: rewrite strip docstrings
This patch is joint work with ilowe.
diff -r 59d0d715fbfa -r 4a7693c61e9f hgext/mq.py
--- a/hgext/mq.py Fri Apr 30 18:11:56 2010 +0200
+++ b/hgext/mq.py Sat May 01 23:04:49 2010 +0530
@@ -2370,11 +2370,28 @@
return 0
def strip(ui, repo, rev, **opts):
- """strip a revision and all its descendants from the repository
+ """strip a changeset and all its descendants from the repository
- If one of the working directory's parent revisions is stripped, the
- working directory will be updated to the parent of the stripped
- revision.
+ The strip command removes all changesets whose local revision
+ number is greater than or equal to REV, and then restores any
+ changesets that are not descendants of REV. If the working
+ directory has uncommitted changes, the operation is aborted unless
+ the --force flag is supplied.
+
+ If a parent of the working directory is stripped, then the working
+ directory will automatically be updated to the most recent
+ available ancestor of the stripped parent after the operation
+ completes.
+
+ Any stripped changesets are stored in ``.hg/strip-backup`` as a
+ bundle (see ``hg help bundle`` and ``hg help unbundle``). They can
+ be restored by running ``hg unbundle .hg/strip-backup/BUNDLE``,
+ where BUNDLE is the bundle file created by the strip. Note that
+ the local revision numbers will in general be different after the
+ restore.
+
+ Use the --nobackup option to discard the backup bundle once the
+ operation completes.
"""
backup = 'all'
if opts['backup']:
@@ -2803,8 +2820,10 @@
_('hg qseries [-ms]')),
"^strip":
(strip,
- [('f', 'force', None, _('force removal with local changes')),
- ('b', 'backup', None, _('bundle unrelated changesets')),
+ [('f', 'force', None, _('force removal of changesets even if the working directory
+ has uncommitted changes')),
+ ('b', 'backup', None, _('bundle only changesets with local revision number
+ greater than REV which are not descendants of REV (DEPRECATED)')),
('n', 'nobackup', None, _('no backups'))],
_('hg strip [-f] [-b] [-n] REV')),
"qtop": (top, [] + seriesopts, _('hg qtop [-s]')),
More information about the Mercurial-devel
mailing list