On Sun, Jun 30, 2019 at 10:42 PM Ludovic Chabant <ludo...@chabant.com> wrote:
> # HG changeset patch > # User Ludovic Chabant <ludo...@chabant.com> > # Date 1561959530 0 > # Mon Jul 01 05:38:50 2019 +0000 > # Branch stable > # Node ID 89e3ab4dcbc56ee72ce1d4d17527337e01d99467 > # Parent 90daf413dfc7a7e4762e6445f05c52b123c6188f > py3: broad pass for python3 compatibility > > - ran mercurial's bytify-strings script > - excluded some places where we use strings to pass to setattr() > - re-decode some template funcions' docstrings that were previously encoded > (probably by the hgloader?) > > diff --git a/hgext3rd/evolve/__init__.py b/hgext3rd/evolve/__init__.py > --- a/hgext3rd/evolve/__init__.py > +++ b/hgext3rd/evolve/__init__.py > -@eh.wrapfunction(mercurial.cmdutil, 'tryimportone') > +@eh.wrapfunction(mercurial.cmdutil, b'tryimportone') > def tryimportone(orig, ui, repo, hunk, parents, opts, *args, **kwargs): > - expected = {'node': None} > - if not util.safehasattr(hunk, 'get'): # hg < 4.6 > + expected = {b'node': None} > + if not util.safehasattr(hunk, b'get'): # hg < 4.6 > oldextract = patch.extract > > def extract(*args, **kwargs): > @@ -845,12 +845,12 @@ > _getnodefrompatch(hunk, expected) > ret = orig(ui, repo, hunk, parents, opts, *args, **kwargs) > created = ret[1] > - if (opts['obsolete'] and None not in (created, expected['node']) > - and created != expected['node']): > - tr = repo.transaction('import-obs') > + if (opts[b'obsolete'] and None not in (created, expected[b'node']) > Should opts[x], opts.get(x), etc really use bytes? They usually get passed as **opts, which means their keys are str, I think.
_______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel