comparison hgext/mq.py @ 11078:37d1b20168d1

Merge with stable
author Matt Mackall <mpm@selenic.com>
date Sat, 01 May 2010 15:15:35 -0500
parents 590b1d6ef50b ee5b112aa529
children 9c72c5c094aa
comparison
equal deleted inserted replaced
11077:132d783d6a87 11078:37d1b20168d1
2355 except: 2355 except:
2356 pass 2356 pass
2357 return 0 2357 return 0
2358 2358
2359 def strip(ui, repo, rev, **opts): 2359 def strip(ui, repo, rev, **opts):
2360 """strip a revision and all its descendants from the repository 2360 """strip a changeset and all its descendants from the repository
2361 2361
2362 If one of the working directory's parent revisions is stripped, the 2362 The strip command removes all changesets whose local revision
2363 working directory will be updated to the parent of the stripped 2363 number is greater than or equal to REV, and then restores any
2364 revision. 2364 changesets that are not descendants of REV. If the working
2365 directory has uncommitted changes, the operation is aborted unless
2366 the --force flag is supplied.
2367
2368 If a parent of the working directory is stripped, then the working
2369 directory will automatically be updated to the most recent
2370 available ancestor of the stripped parent after the operation
2371 completes.
2372
2373 Any stripped changesets are stored in ``.hg/strip-backup`` as a
2374 bundle (see ``hg help bundle`` and ``hg help unbundle``). They can
2375 be restored by running ``hg unbundle .hg/strip-backup/BUNDLE``,
2376 where BUNDLE is the bundle file created by the strip. Note that
2377 the local revision numbers will in general be different after the
2378 restore.
2379
2380 Use the --nobackup option to discard the backup bundle once the
2381 operation completes.
2365 """ 2382 """
2366 backup = 'all' 2383 backup = 'all'
2367 if opts['backup']: 2384 if opts['backup']:
2368 backup = 'strip' 2385 backup = 'strip'
2369 elif opts['nobackup']: 2386 elif opts['nobackup']:
2786 _('hg qselect [OPTION]... [GUARD]...')), 2803 _('hg qselect [OPTION]... [GUARD]...')),
2787 "qseries": 2804 "qseries":
2788 (series, 2805 (series,
2789 [('m', 'missing', None, _('print patches not in series')), 2806 [('m', 'missing', None, _('print patches not in series')),
2790 ] + seriesopts, 2807 ] + seriesopts,
2791 _('hg qseries [-ms]')), 2808 _('hg qseries [-ms]')),
2792 "strip": 2809 "strip":
2793 (strip, 2810 (strip,
2794 [('f', 'force', None, _('force removal with local changes')), 2811 [('f', 'force', None, _('force removal of changesets even if the '
2795 ('b', 'backup', None, _('bundle unrelated changesets')), 2812 'working directory has uncommitted changes')),
2796 ('n', 'nobackup', None, _('no backups'))], 2813 ('b', 'backup', None, _('bundle only changesets with local revision'
2797 _('hg strip [-f] [-b] [-n] REV')), 2814 ' number greater than REV which are not'
2798 "qtop": (top, [] + seriesopts, _('hg qtop [-s]')), 2815 ' descendants of REV (DEPRECATED)')),
2816 ('n', 'nobackup', None, _('no backups'))],
2817 _('hg strip [-f] [-b] [-n] REV')),
2818 "qtop": (top, [] + seriesopts, _('hg qtop [-s]')),
2799 "qunapplied": 2819 "qunapplied":
2800 (unapplied, 2820 (unapplied,
2801 [('1', 'first', None, _('show only the first patch'))] + seriesopts, 2821 [('1', 'first', None, _('show only the first patch'))] + seriesopts,
2802 _('hg qunapplied [-1] [-s] [PATCH]')), 2822 _('hg qunapplied [-1] [-s] [PATCH]')),
2803 "qfinish": 2823 "qfinish":