hgext/uncommit.py
changeset 42936 2da754532dd3
parent 42903 66048f6b5d0d
child 42952 44be33cf7a57
equal deleted inserted replaced
42935:f10a0f5eedae 42936:2da754532dd3
   109     return repo.commitctx(new)
   109     return repo.commitctx(new)
   110 
   110 
   111 @command('uncommit',
   111 @command('uncommit',
   112     [('', 'keep', None, _('allow an empty commit after uncommiting')),
   112     [('', 'keep', None, _('allow an empty commit after uncommiting')),
   113      ('', 'allow-dirty-working-copy', False,
   113      ('', 'allow-dirty-working-copy', False,
   114     _('allow uncommit with outstanding changes'))
   114     _('allow uncommit with outstanding changes')),
       
   115      (b'n', b'note', b'', _(b'store a note on uncommit'), _(b'TEXT'))
   115     ] + commands.walkopts + commands.commitopts + commands.commitopts2
   116     ] + commands.walkopts + commands.commitopts + commands.commitopts2
   116     + commands.commitopts3,
   117     + commands.commitopts3,
   117     _('[OPTION]... [FILE]...'),
   118     _('[OPTION]... [FILE]...'),
   118     helpcategory=command.CATEGORY_CHANGE_MANAGEMENT)
   119     helpcategory=command.CATEGORY_CHANGE_MANAGEMENT)
   119 def uncommit(ui, repo, *pats, **opts):
   120 def uncommit(ui, repo, *pats, **opts):
   127     If no files are specified, the commit will be pruned, unless --keep is
   128     If no files are specified, the commit will be pruned, unless --keep is
   128     given.
   129     given.
   129     """
   130     """
   130     opts = pycompat.byteskwargs(opts)
   131     opts = pycompat.byteskwargs(opts)
   131 
   132 
       
   133     cmdutil.checknotesize(ui, opts)
   132     cmdutil.resolvecommitoptions(ui, opts)
   134     cmdutil.resolvecommitoptions(ui, opts)
   133 
   135 
   134     with repo.wlock(), repo.lock():
   136     with repo.wlock(), repo.lock():
   135 
   137 
   136         m, a, r, d = repo.status()[:4]
   138         m, a, r, d = repo.status()[:4]