mercurial/util.py
changeset 13313 0c493e5ce8e9
parent 13282 c01eea6c455b
parent 13305 035684c6b69a
child 13316 d119403fd266
--- a/mercurial/util.py	Thu Jan 27 13:29:21 2011 -0600
+++ b/mercurial/util.py	Thu Jan 27 17:22:37 2011 -0600
@@ -918,6 +918,8 @@
                     # shares if the file is open.
                     fd = open(f)
                     nlink = nlinks(f)
+                    if nlink < 1:
+                        nlink = 2 # force mktempcopy (issue1922)
                     fd.close()
             except (OSError, IOError), e:
                 if e.errno != errno.ENOENT: