comparison mercurial/util.py @ 13313:0c493e5ce8e9

merge with stable
author Matt Mackall <mpm@selenic.com>
date Thu, 27 Jan 2011 17:22:37 -0600
parents c01eea6c455b 035684c6b69a
children d119403fd266
comparison
equal deleted inserted replaced
13304:e4b02eb825b1 13313:0c493e5ce8e9
916 else: 916 else:
917 # nlinks() may behave differently for files on Windows 917 # nlinks() may behave differently for files on Windows
918 # shares if the file is open. 918 # shares if the file is open.
919 fd = open(f) 919 fd = open(f)
920 nlink = nlinks(f) 920 nlink = nlinks(f)
921 if nlink < 1:
922 nlink = 2 # force mktempcopy (issue1922)
921 fd.close() 923 fd.close()
922 except (OSError, IOError), e: 924 except (OSError, IOError), e:
923 if e.errno != errno.ENOENT: 925 if e.errno != errno.ENOENT:
924 raise 926 raise
925 nlink = 0 927 nlink = 0