# HG changeset patch # User Kostia Balytskyi <ikos...@fb.com> # Date 1474560467 25200 # Thu Sep 22 09:07:47 2016 -0700 # Branch stable # Node ID ac125f907dfe8f85d0c2771b3f71eaec788d9ea0 # Parent 8f902ec9ed9a296d92c2c2df1536af8c44b5321c evolve: fix the way evolve checks whether dirstate.write has arguments
Earlier dirstate.write had the following signature: def write(self, tr=_token) Since it had a default argument, func_defaults would list it. In 52ff07e1de9150a8cec8e6cbe02125fb67978b8d the signature was changed to be def write(self, tr), thus making the func_defaults check incorrect. This breaks some evolve tests. diff --git a/hgext/evolve.py b/hgext/evolve.py --- a/hgext/evolve.py +++ b/hgext/evolve.py @@ -1024,7 +1024,7 @@ def bmactive(repo): ### dirstate compatibility layer < hg 3.6 def writedirstate(dirstate, tr): - if dirstate.write.func_defaults is not None: # mercurial 3.6 and above + if dirstate.write.func_code.co_argcount: # mercurial 3.6 and above return dirstate.write(tr) return dirstate.write() _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel