Mercurial > public > mercurial-scm > hg
diff mercurial/util.py @ 917:7f3f55903496
Fix hg clone race with writer
Most read operations in hg don't need locks because we order reads and
writes for consistency. Clone is an exception to this as we're copying
entire file histories and could end up with more file history copied
than we have commits.
For now, make clone take a lock on the source repo. Non-hardlinked
clone should eventually be changed to use lockless pull.
author | mpm@selenic.com |
---|---|
date | Tue, 16 Aug 2005 14:53:47 -0800 |
parents | 302f83b85054 |
children | 22571b8d35d3 |
line wrap: on
line diff
--- a/mercurial/util.py Tue Aug 16 14:17:27 2005 -0800 +++ b/mercurial/util.py Tue Aug 16 14:53:47 2005 -0800 @@ -187,7 +187,7 @@ elif os.path.isfile(srcname): copyfile(srcname, dstname) else: - raise IOError("Not a regular file: %r" % srcname) + pass def _makelock_file(info, pathname): ld = os.open(pathname, os.O_CREAT | os.O_WRONLY | os.O_EXCL)