Patchwork D3626: tests: port inline extensions in test-obsolete.t to Python 3

login
register
mail settings
Submitter phabricator
Date May 19, 2018, 8:55 p.m.
Message ID <d19311ef6e1d3b0aeaa006736dca0f9c@localhost.localdomain>
Download mbox | patch
Permalink /patch/31751/
State Not Applicable
Headers show

Comments

phabricator - May 19, 2018, 8:55 p.m.
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




To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

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',