# HG changeset patch # User Benoit Boissinot # Date 1130976821 28800 # Node ID 91c0e8d7ddcfc5b56d879d512a6d189926220b33 # Parent c3ffdb2c4091fb126165f460c6af1a5c03df9bfb fix a bug in dirstate.changes when cwd != repo.root - use lstat instead of stat - add a testcase (thanks to Johannes Hofmann) diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -380,7 +380,8 @@ class dirstate: nonexistent = True if not st: try: - st = os.lstat(fn) + f = os.path.join(self.root, fn) + st = os.lstat(f) except OSError, inst: if inst.errno != errno.ENOENT: raise diff --git a/tests/test-hgignore b/tests/test-hgignore --- a/tests/test-hgignore +++ b/tests/test-hgignore @@ -40,3 +40,6 @@ echo "--" ; hg status echo "relglob:*" > .hgignore echo "--" ; hg status + +cd dir +echo "--" ; hg status diff --git a/tests/test-hgignore.out b/tests/test-hgignore.out --- a/tests/test-hgignore.out +++ b/tests/test-hgignore.out @@ -32,3 +32,5 @@ A dir/b.o ? dir/c.o -- A dir/b.o +-- +A b.o