mercurial/util.py
changeset 4281 384672d8080f
parent 4275 81402b2b294d
child 4309 d4f0405fadac
--- a/mercurial/util.py	Thu Mar 22 14:02:39 2007 -0500
+++ b/mercurial/util.py	Mon Mar 26 21:36:26 2007 -0300
@@ -585,6 +585,15 @@
         if cwd is not None and oldcwd != cwd:
             os.chdir(oldcwd)
 
+# os.path.lexists is not available on python2.3
+def lexists(filename):
+    "test whether a file with this name exists. does not follow symlinks"
+    try:
+        os.lstat(filename)
+    except:
+        return False
+    return True
+
 def rename(src, dst):
     """forcibly rename a file"""
     try: