hgext/amend.py
changeset 47428 54849b65dc5f
parent 47427 6ce89165eaa0
child 48875 6000f5b25c9b
equal deleted inserted replaced
47427:6ce89165eaa0 47428:54849b65dc5f
    14 
    14 
    15 from mercurial.i18n import _
    15 from mercurial.i18n import _
    16 from mercurial import (
    16 from mercurial import (
    17     cmdutil,
    17     cmdutil,
    18     commands,
    18     commands,
    19     pycompat,
       
    20     registrar,
    19     registrar,
    21 )
    20 )
    22 
    21 
    23 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
    22 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
    24 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
    23 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
    64     Similar to :hg:`commit --amend`, but reuse the commit message without
    63     Similar to :hg:`commit --amend`, but reuse the commit message without
    65     invoking editor, unless ``--edit`` was set.
    64     invoking editor, unless ``--edit`` was set.
    66 
    65 
    67     See :hg:`help commit` for more details.
    66     See :hg:`help commit` for more details.
    68     """
    67     """
    69     cmdutil.checknotesize(ui, pycompat.byteskwargs(opts))
    68     cmdutil.check_note_size(opts)
    70 
    69 
    71     with repo.wlock(), repo.lock():
    70     with repo.wlock(), repo.lock():
    72         if not opts.get('logfile'):
    71         if not opts.get('logfile'):
    73             opts['message'] = opts.get('message') or repo[b'.'].description()
    72             opts['message'] = opts.get('message') or repo[b'.'].description()
    74         opts['amend'] = True
    73         opts['amend'] = True