Mercurial > hg > hg-git
changeset 1023:006c837f9181
gitdirstate: use util.listdir if available
Since hg 4.3, the upstream osutil module has been moved to
mercurial.cext.osutil, but the util module also now re-exports
everything in osutil.
Thanks to Durham Goode and Yuya Nishihara for reporting and finding the
right fix for this.
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Mon, 19 Jun 2017 13:50:45 -0500 |
parents | 17f64b9bfa62 |
children | 78959c8e5e60 |
files | hggit/gitdirstate.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/gitdirstate.py +++ b/hggit/gitdirstate.py @@ -156,7 +156,10 @@ matchalways = match.always() matchtdir = match.traversedir dmap = self._map - listdir = osutil.listdir + try: + listdir = util.listdir + except AttributeError: + listdir = osutil.listdir lstat = os.lstat dirkind = stat.S_IFDIR regkind = stat.S_IFREG