##// END OF EJS Templates
mq: rewrite strip docstrings...
Faheem Mitha -
r11073:ee5b112a stable
parent child Browse files
Show More
@@ -2370,11 +2370,28 b' def save(ui, repo, **opts):'
2370 return 0
2370 return 0
2371
2371
2372 def strip(ui, repo, rev, **opts):
2372 def strip(ui, repo, rev, **opts):
2373 """strip a revision and all its descendants from the repository
2373 """strip a changeset and all its descendants from the repository
2374
2375 The strip command removes all changesets whose local revision
2376 number is greater than or equal to REV, and then restores any
2377 changesets that are not descendants of REV. If the working
2378 directory has uncommitted changes, the operation is aborted unless
2379 the --force flag is supplied.
2374
2380
2375 If one of the working directory's parent revisions is stripped, the
2381 If a parent of the working directory is stripped, then the working
2376 working directory will be updated to the parent of the stripped
2382 directory will automatically be updated to the most recent
2377 revision.
2383 available ancestor of the stripped parent after the operation
2384 completes.
2385
2386 Any stripped changesets are stored in ``.hg/strip-backup`` as a
2387 bundle (see ``hg help bundle`` and ``hg help unbundle``). They can
2388 be restored by running ``hg unbundle .hg/strip-backup/BUNDLE``,
2389 where BUNDLE is the bundle file created by the strip. Note that
2390 the local revision numbers will in general be different after the
2391 restore.
2392
2393 Use the --nobackup option to discard the backup bundle once the
2394 operation completes.
2378 """
2395 """
2379 backup = 'all'
2396 backup = 'all'
2380 if opts['backup']:
2397 if opts['backup']:
@@ -2800,14 +2817,17 b' cmdtable = {'
2800 (series,
2817 (series,
2801 [('m', 'missing', None, _('print patches not in series')),
2818 [('m', 'missing', None, _('print patches not in series')),
2802 ] + seriesopts,
2819 ] + seriesopts,
2803 _('hg qseries [-ms]')),
2820 _('hg qseries [-ms]')),
2804 "^strip":
2821 "^strip":
2805 (strip,
2822 (strip,
2806 [('f', 'force', None, _('force removal with local changes')),
2823 [('f', 'force', None, _('force removal of changesets even if the '
2807 ('b', 'backup', None, _('bundle unrelated changesets')),
2824 'working directory has uncommitted changes')),
2808 ('n', 'nobackup', None, _('no backups'))],
2825 ('b', 'backup', None, _('bundle only changesets with local revision'
2809 _('hg strip [-f] [-b] [-n] REV')),
2826 ' number greater than REV which are not'
2810 "qtop": (top, [] + seriesopts, _('hg qtop [-s]')),
2827 ' descendants of REV (DEPRECATED)')),
2828 ('n', 'nobackup', None, _('no backups'))],
2829 _('hg strip [-f] [-b] [-n] REV')),
2830 "qtop": (top, [] + seriesopts, _('hg qtop [-s]')),
2811 "qunapplied":
2831 "qunapplied":
2812 (unapplied,
2832 (unapplied,
2813 [('1', 'first', None, _('show only the first patch'))] + seriesopts,
2833 [('1', 'first', None, _('show only the first patch'))] + seriesopts,
@@ -55,7 +55,7 b' list of commands:'
55 qseries print the entire series file
55 qseries print the entire series file
56 qtop print the name of the current patch
56 qtop print the name of the current patch
57 qunapplied print the patches not yet applied
57 qunapplied print the patches not yet applied
58 strip strip a revision and all its descendants from the repository
58 strip strip a changeset and all its descendants from the repository
59
59
60 use "hg -v help mq" to show aliases and global options
60 use "hg -v help mq" to show aliases and global options
61 adding a
61 adding a
General Comments 0
You need to be logged in to leave comments. Login now