--- a/mercurial/util.py Tue Jul 22 13:03:31 2008 -0500
+++ b/mercurial/util.py Wed Jul 23 16:14:45 2008 +0200
@@ -1500,7 +1500,7 @@
mode += "b" # for that other OS
nlink = -1
- if mode[0] != "r":
+ if mode not in ("r", "rb"):
try:
nlink = nlinks(f)
except OSError: