# HG changeset patch # User Anton Shestakov # Date 1573627426 -25200 # Node ID 379ce8ba150db937cbbe47438faa23a85a2671dc # Parent 31cd40b1bb67158db0e7f0e9419342b3f29f1ca9 compat: compatibility for pathuril.dirs vs util.dirs diff -r 31cd40b1bb67 -r 379ce8ba150d hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Fri Nov 15 10:59:47 2019 +0100 +++ b/hgext3rd/evolve/cmdrewrite.py Wed Nov 13 13:43:46 2019 +0700 @@ -524,7 +524,7 @@ # if not everything tracked in that directory can be # uncommitted. if badfiles: - badfiles -= set([f for f in util.dirs(eligible)]) + badfiles -= set([f for f in compat.dirs(eligible)]) try: uipathfn = scmutil.getuipathfn(repo) diff -r 31cd40b1bb67 -r 379ce8ba150d hgext3rd/evolve/compat.py --- a/hgext3rd/evolve/compat.py Fri Nov 15 10:59:47 2019 +0100 +++ b/hgext3rd/evolve/compat.py Wed Nov 13 13:43:46 2019 +0700 @@ -46,6 +46,13 @@ displaygraph = cmdutil.displaygraph changesetdiffer = None +# hg <= 5.3 (c21aca51b392) +try: + from mercurial import pathutil + dirs = pathutil.dirs +except (AttributeError, ImportError): + dirs = util.dirs + from . import ( exthelper, )