Mercurial > evolve
changeset 4956:0fe5d74134d6 stable
compat: compatibility for pathuril.dirs vs util.dirs
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 13 Nov 2019 13:43:46 +0700 |
parents | 0d1893c1044c |
children | e8302f760a54 |
files | hgext3rd/evolve/cmdrewrite.py hgext3rd/evolve/compat.py |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/cmdrewrite.py Mon Nov 11 03:40:20 2019 +0700 +++ b/hgext3rd/evolve/cmdrewrite.py Wed Nov 13 13:43:46 2019 +0700 @@ -522,7 +522,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)
--- a/hgext3rd/evolve/compat.py Mon Nov 11 03:40:20 2019 +0700 +++ b/hgext3rd/evolve/compat.py Wed Nov 13 13:43:46 2019 +0700 @@ -45,6 +45,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, )