Changeset 7a6d938fba2d…
Parent 6f9eeb2e09d4…
by Andrew Pritchard <andrewp@fogcreek.com>
Changes to 4 files · Browse files at 7a6d938fba2d Showing diff from parent 6f9eeb2e09d4 Diff from another changeset...
@@ -8,7 +8,7 @@ somewhere, and you only fetch the big files that you need when you need
them.
-lfiles works by maintaining a *standin* in .hglfiles/ for each big file.
+lfiles works by maintaining a *standin* in .hglf/ for each big file.
The standins are small (41 bytes: an SHA-1 hash plus newline) and are
tracked by Mercurial. Big file revisions are identified by the SHA-1 hash
of their contents, which is written to the standin. lfiles uses that
|
@@ -265,10 +265,10 @@ link(cachepath(repo, hash), systemcachepath(repo.ui, hash))
def getstandinmatcher(repo, pats=[], opts={}):
- '''Return a match object that applies pats to <repo>/.hglf.'''
+ '''Return a match object that applies pats to the standin directory'''
standindir = repo.pathto(shortname)
if pats:
- # patterns supplied: search .hglf relative to current dir
+ # patterns supplied: search standin directory relative to current dir
cwd = repo.getcwd()
if os.path.isabs(cwd):
# cwd is an absolute path for hg -R <reponame>
@@ -279,7 +279,7 @@ # no patterns: relative to repo root
pats = [standindir]
else:
- # no patterns and no .hglf dir: return matcher that matches nothing
+ # no patterns and no standin dir: return matcher that matches nothing
match = match_.match(repo.root, None, [], exact=True)
match.matchfn = lambda f: False
return match
|
@@ -415,8 +415,8 @@ def override_match(repo, pats=[], opts={}, globbed=False,
default='relpath'):
newpats = []
- # The patterns were previously mangled to add .hglfiles, we need to
- # remove that now
+ # The patterns were previously mangled to add the standin
+ # directory; we need to remove that now
for pat in pats:
if match_.patkind(pat) is None and lfutil.shortname in pat:
newpats.append(pat.replace(lfutil.shortname, ''))
|
@@ -49,7 +49,7 @@ class lfiles_ctx(ctx.__class__):
def files(self):
filenames = super(lfiles_ctx, self).files()
- return [re.sub(r'^\.hglf/', '', filename) for filename
+ return [re.sub('^\\'+lfutil.shortname+'/', '', filename) for filename
in filenames]
def manifest(self):
man1 = super(lfiles_ctx, self).manifest()
@@ -389,7 +389,7 @@ repo.__class__ = lfiles_repo
def checkrequireslfiles(ui, repo, **kwargs):
- if 'largefiles' not in repo.requirements and lfutil.any_('.hglf/' in f[0] \
+ if 'largefiles' not in repo.requirements and lfutil.any_(lfutil.shortname+'/' in f[0] \
for f in repo.store.datafiles()):
# work around bug in mercurial 1.9 whereby requirements is a list
|
Loading...