Mercurial > hg
comparison tests/test-obsolete.t @ 47431:fca9c63f160e
cmdutil: make amend() take str-keyed opts
I couldn't think of a reasonable change to the signature here, so
unfortunately it keeps the existing one.
Differential Revision: https://phab.mercurial-scm.org/D10862
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 10 Jun 2021 14:55:10 -0700 |
parents | 84a93fa7ecfd |
children | 5ced12cfa41b |
comparison
equal
deleted
inserted
replaced
47430:3ee036c6f834 | 47431:fca9c63f160e |
---|---|
1476 > | 1476 > |
1477 > cmdtable = {} | 1477 > cmdtable = {} |
1478 > command = registrar.command(cmdtable) | 1478 > command = registrar.command(cmdtable) |
1479 > @command(b"amendtransient",[], _(b'hg amendtransient [rev]')) | 1479 > @command(b"amendtransient",[], _(b'hg amendtransient [rev]')) |
1480 > def amend(ui, repo, *pats, **opts): | 1480 > def amend(ui, repo, *pats, **opts): |
1481 > opts = pycompat.byteskwargs(opts) | 1481 > opts['message'] = b'Test' |
1482 > opts[b'message'] = b'Test' | 1482 > opts['logfile'] = None |
1483 > opts[b'logfile'] = None | |
1484 > cmdutil.amend(ui, repo, repo[b'.'], {}, pats, opts) | 1483 > cmdutil.amend(ui, repo, repo[b'.'], {}, pats, opts) |
1485 > ui.write(b'%s\n' % stringutil.pprint(repo.changelog.headrevs())) | 1484 > ui.write(b'%s\n' % stringutil.pprint(repo.changelog.headrevs())) |
1486 > EOF | 1485 > EOF |
1487 $ cat >> $HGRCPATH << EOF | 1486 $ cat >> $HGRCPATH << EOF |
1488 > [extensions] | 1487 > [extensions] |