comparison mercurial/util.py @ 4086:cc8a52229620

Fix accessing the repo through a symlink.
author Jun Inoue <jun.lambda@gmail.com>
date Thu, 15 Feb 2007 05:18:23 -0200
parents c620376b8fd6
children 587c6c652f82
comparison
equal deleted inserted replaced
4080:ef14fdb675da 4086:cc8a52229620
361 try: 361 try:
362 name_st = os.stat(name) 362 name_st = os.stat(name)
363 except OSError: 363 except OSError:
364 break 364 break
365 if samestat(name_st, root_st): 365 if samestat(name_st, root_st):
366 if not rel:
367 # name was actually the same as root (maybe a symlink)
368 return ''
366 rel.reverse() 369 rel.reverse()
367 name = os.path.join(*rel) 370 name = os.path.join(*rel)
368 audit_path(name) 371 audit_path(name)
369 return pconvert(name) 372 return pconvert(name)
370 dirname, basename = os.path.split(name) 373 dirname, basename = os.path.split(name)