mercurial/dirstate.py
changeset 1228 db950da49539
parent 1224 cc61d366bc3b
child 1230 6eac821c202c
--- 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):