# HG changeset patch # User mpm@selenic.com # Date 1126291595 25200 # Node ID db950da49539585149b829aa1215038104eb8a6c # Parent e3ea354d99b24fa4f69b778b81a1efc37687d6eb Fix dangling symlink bug in dirstate walk code diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -252,7 +252,8 @@ class dirstate: if seen(np): continue p = os.path.join(top, f) - st = os.stat(p) + # don't trip over symlinks + st = os.lstat(p) if stat.S_ISDIR(st.st_mode): ds = os.path.join(nd, f +'/') if statmatch(ds, st):