mercurial/hg.py
changeset 292 09364bcebdf0
parent 291 2c4f2be05587
child 296 a3d83bf86755
child 297 0dbcf3c9ff20
equal deleted inserted replaced
291:2c4f2be05587 292:09364bcebdf0
   277             f = os.path.join(p, urllib.quote(path))
   277             f = os.path.join(p, urllib.quote(path))
   278             return httprangereader(f)
   278             return httprangereader(f)
   279 
   279 
   280         f = os.path.join(p, path)
   280         f = os.path.join(p, path)
   281 
   281 
   282         if mode != "r":
   282         mode += "b" # for that other OS
       
   283 
       
   284         if mode[0] != "r":
   283             try:
   285             try:
   284                 s = os.stat(f)
   286                 s = os.stat(f)
   285             except OSError:
   287             except OSError:
   286                 d = os.path.dirname(f)
   288                 d = os.path.dirname(f)
   287                 if not os.path.isdir(d):
   289                 if not os.path.isdir(d):