Mercurial > hg
comparison tests/test-lfs.t @ 35175:e0a1b9ee93cd
lfs: add a repo requirement for this extension once an lfs file is committed
Largefiles does the same thing (also delayed until the first largefile commit),
to prevent access to the repo without the extension. In the case of this
extension, not having the extension loaded while accessing an lfs file results
in cryptic errors about "missing processor for flag '0x2000'". If enabled
locally but not remotely, the cryptic error message is about no common
changegroup version. (It wants '03', which is currently experimental.)
The largefiles extension looks for any tracked file that starts with '.hglf/'.
Unfortunately, that doesn't work here. I didn't see any way to get the files
that were just committed, without doing a full status. But since there's no
secondary check on adding an lfs file once the extension is loaded and a
threshold set, the best practice is to only enable this locally on a repo that
needs it. That should minimize the unnecessary overhead for repos without an
lfs file.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 15 Nov 2017 23:43:15 -0500 |
parents | 5be1a5e869c1 |
children | f8f939a2926c |
comparison
equal
deleted
inserted
replaced
35164:6864c405f023 | 35175:e0a1b9ee93cd |
---|---|
18 $ echo s > smallfile | 18 $ echo s > smallfile |
19 $ hg commit -Aqm "add small file" | 19 $ hg commit -Aqm "add small file" |
20 | 20 |
21 # Commit large file | 21 # Commit large file |
22 $ echo $LONG > largefile | 22 $ echo $LONG > largefile |
23 $ grep lfs .hg/requires | |
24 [1] | |
23 $ hg commit --traceback -Aqm "add large file" | 25 $ hg commit --traceback -Aqm "add large file" |
26 $ grep lfs .hg/requires | |
27 lfs | |
24 | 28 |
25 # Ensure metadata is stored | 29 # Ensure metadata is stored |
26 $ hg debugdata largefile 0 | 30 $ hg debugdata largefile 0 |
27 version https://git-lfs.github.com/spec/v1 | 31 version https://git-lfs.github.com/spec/v1 |
28 oid sha256:f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b | 32 oid sha256:f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b |