comparison hgext/uncommit.py @ 40293:c303d65d2e34

help: assigning categories to existing commands I'm separating this into its own commit so people can bikeshed over the actual categorization (vs the support for categories). These categories are based on the help implementation we've been using internally at Google, and have had zero complaints. Differential Revision: https://phab.mercurial-scm.org/D5067
author rdamazio@google.com
date Sat, 13 Oct 2018 02:17:41 -0700
parents 3bd22c4d3711
children fa88170c10bb
comparison
equal deleted inserted replaced
40292:9c6473d2038b 40293:c303d65d2e34
136 ds.copy(src, dst) 136 ds.copy(src, dst)
137 137
138 @command('uncommit', 138 @command('uncommit',
139 [('', 'keep', False, _('allow an empty commit after uncommiting')), 139 [('', 'keep', False, _('allow an empty commit after uncommiting')),
140 ] + commands.walkopts, 140 ] + commands.walkopts,
141 _('[OPTION]... [FILE]...')) 141 _('[OPTION]... [FILE]...'),
142 helpcategory=command.CATEGORY_CHANGE_MANAGEMENT)
142 def uncommit(ui, repo, *pats, **opts): 143 def uncommit(ui, repo, *pats, **opts):
143 """uncommit part or all of a local changeset 144 """uncommit part or all of a local changeset
144 145
145 This command undoes the effect of a local commit, returning the affected 146 This command undoes the effect of a local commit, returning the affected
146 files to their uncommitted state. This means that files modified or 147 files to their uncommitted state. This means that files modified or
188 def predecessormarkers(ctx): 189 def predecessormarkers(ctx):
189 """yields the obsolete markers marking the given changeset as a successor""" 190 """yields the obsolete markers marking the given changeset as a successor"""
190 for data in ctx.repo().obsstore.predecessors.get(ctx.node(), ()): 191 for data in ctx.repo().obsstore.predecessors.get(ctx.node(), ()):
191 yield obsutil.marker(ctx.repo(), data) 192 yield obsutil.marker(ctx.repo(), data)
192 193
193 @command('^unamend', []) 194 @command('^unamend', [], helpcategory=command.CATEGORY_CHANGE_MANAGEMENT)
194 def unamend(ui, repo, **opts): 195 def unamend(ui, repo, **opts):
195 """undo the most recent amend operation on a current changeset 196 """undo the most recent amend operation on a current changeset
196 197
197 This command will roll back to the previous version of a changeset, 198 This command will roll back to the previous version of a changeset,
198 leaving working directory in state in which it was before running 199 leaving working directory in state in which it was before running