[PATCH] lfs: add a comment to describe subtle local blobstore open() behavior
Matt Harbison
mharbison72 at gmail.com
Sat Jan 6 03:28:26 UTC 2018
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1515206909 18000
# Fri Jan 05 21:48:29 2018 -0500
# Node ID 410d48b16de6db0f2500264e8d5952bad6a5df27
# Parent 8b958d21b19d659f3d8d802b327cec58095f8e7a
lfs: add a comment to describe subtle local blobstore open() behavior
diff --git a/hgext/lfs/blobstore.py b/hgext/lfs/blobstore.py
--- a/hgext/lfs/blobstore.py
+++ b/hgext/lfs/blobstore.py
@@ -103,6 +103,12 @@
def open(self, oid):
"""Open a read-only file descriptor to the named blob, in either the
usercache or the local store."""
+ # The usercache is the most likely place to hold the file. Commit will
+ # write to both it and the local store, as will anything that downloads
+ # the blobs. However, things like clone without an update won't
+ # populate the local store. For an init + push of a local clone,
+ # the usercache is the only place it _could_ be. If not present, the
+ # missing file msg here will indicate the local repo, not the usercache.
if self.cachevfs.exists(oid):
return self.cachevfs(oid, 'rb')
More information about the Mercurial-devel
mailing list