equal
deleted
inserted
replaced
23 encoding, |
23 encoding, |
24 error, |
24 error, |
25 httpconnection, |
25 httpconnection, |
26 match as matchmod, |
26 match as matchmod, |
27 pycompat, |
27 pycompat, |
|
28 requirements, |
28 scmutil, |
29 scmutil, |
29 sparse, |
30 sparse, |
30 util, |
31 util, |
31 vfs as vfsmod, |
32 vfs as vfsmod, |
32 ) |
33 ) |
195 the repo root, but it is saved in .hg/largefiles/dirstate. |
196 the repo root, but it is saved in .hg/largefiles/dirstate. |
196 """ |
197 """ |
197 vfs = repo.vfs |
198 vfs = repo.vfs |
198 lfstoredir = longname |
199 lfstoredir = longname |
199 opener = vfsmod.vfs(vfs.join(lfstoredir)) |
200 opener = vfsmod.vfs(vfs.join(lfstoredir)) |
|
201 use_dirstate_v2 = requirements.DIRSTATE_V2_REQUIREMENT in repo.requirements |
200 lfdirstate = largefilesdirstate( |
202 lfdirstate = largefilesdirstate( |
201 opener, |
203 opener, |
202 ui, |
204 ui, |
203 repo.root, |
205 repo.root, |
204 repo.dirstate._validate, |
206 repo.dirstate._validate, |
205 lambda: sparse.matcher(repo), |
207 lambda: sparse.matcher(repo), |
206 repo.nodeconstants, |
208 repo.nodeconstants, |
|
209 use_dirstate_v2, |
207 ) |
210 ) |
208 |
211 |
209 # If the largefiles dirstate does not exist, populate and create |
212 # If the largefiles dirstate does not exist, populate and create |
210 # it. This ensures that we create it on the first meaningful |
213 # it. This ensures that we create it on the first meaningful |
211 # largefiles operation in a new clone. |
214 # largefiles operation in a new clone. |