# HG changeset patch # User Nicolas Dumazet # Date 1279265635 -32400 # Node ID ce95d8b87d22033f6d8a9a8208b8a84521ae2614 # Parent 76454cbc11e48d692262843d0c87e81bbb2c053c context: use os.lstat instead of os.stat to fetch file size When file is a link, we want the size of the link itself, not the size of the file it points to. diff -r 76454cbc11e4 -r ce95d8b87d22 mercurial/context.py --- a/mercurial/context.py Fri Jul 16 14:44:30 2010 +0200 +++ b/mercurial/context.py Fri Jul 16 16:33:55 2010 +0900 @@ -925,7 +925,7 @@ return [] def size(self): - return os.stat(self._repo.wjoin(self._path)).st_size + return os.lstat(self._repo.wjoin(self._path)).st_size def date(self): t, tz = self._changectx.date() try: