Mercurial > public > mercurial-scm > hg-stable
diff mercurial/scmutil.py @ 14961:5523529bd1af
walkrepos: use getattr instead of hasattr for samestat
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 15:45:11 -0500 |
parents | dca59d5be12d |
children | cc2c22511707 |
line wrap: on
line diff
--- a/mercurial/scmutil.py Mon Jul 25 15:43:55 2011 -0500 +++ b/mercurial/scmutil.py Mon Jul 25 15:45:11 2011 -0500 @@ -324,10 +324,10 @@ def errhandler(err): if err.filename == path: raise err - if followsym and hasattr(os.path, 'samestat'): + samestat = getattr(os.path, 'samestat', None) + if followsym and samestat is not None: def adddir(dirlst, dirname): match = False - samestat = os.path.samestat dirstat = os.stat(dirname) for lstdirstat in dirlst: if samestat(dirstat, lstdirstat):