D3626: tests: port inline extensions in test-obsolete.t to Python 3
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Sat May 19 20:55:18 UTC 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG5a87bf0bd343: tests: port inline extensions in test-obsolete.t to Python 3 (authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D3626?vs=8833&id=8834
REVISION DETAIL
https://phab.mercurial-scm.org/D3626
AFFECTED FILES
tests/test-obsolete.t
CHANGE DETAILS
diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t
--- a/tests/test-obsolete.t
+++ b/tests/test-obsolete.t
@@ -1318,16 +1318,18 @@
$ cat >$TESTTMP/test_extension.py << EOF
> from __future__ import absolute_import
> from mercurial.i18n import _
- > from mercurial import cmdutil, registrar
+ > from mercurial import cmdutil, pycompat, registrar
+ > from mercurial.utils import stringutil
>
> cmdtable = {}
> command = registrar.command(cmdtable)
> @command(b"amendtransient",[], _(b'hg amendtransient [rev]'))
> def amend(ui, repo, *pats, **opts):
- > opts['message'] = 'Test'
- > opts['logfile'] = None
- > cmdutil.amend(ui, repo, repo['.'], {}, pats, opts)
- > ui.write(b'%s\n' % repo.changelog.headrevs())
+ > opts = pycompat.byteskwargs(opts)
+ > opts[b'message'] = b'Test'
+ > opts[b'logfile'] = None
+ > cmdutil.amend(ui, repo, repo[b'.'], {}, pats, opts)
+ > ui.write(b'%s\n' % stringutil.pprint(repo.changelog.headrevs()))
> EOF
$ cat >> $HGRCPATH << EOF
> [extensions]
@@ -1365,7 +1367,7 @@
> hidden = repoview.filterrevs(repo, b'visible')
> if sorted(hidden1) != sorted(hidden):
> print("cache inconsistency")
- > bkmstoreinst._repo.currenttransaction().addpostclose('test_extension', trhook)
+ > bkmstoreinst._repo.currenttransaction().addpostclose(b'test_extension', trhook)
> orig(bkmstoreinst, *args, **kwargs)
> def extsetup(ui):
> extensions.wrapfunction(bookmarks.bmstore, '_recordchange',
To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list