mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
largefiles: don't hash all largefiles when initializing a lfdirstate
The largefiles will be hashed on demand if necessary ... and sometimes it isn't necessary.
This commit is contained in:
parent
9a6bd8ef12
commit
9c2c68a468
@ -9,7 +9,6 @@
|
|||||||
'''largefiles utility code: must not import other modules in this package.'''
|
'''largefiles utility code: must not import other modules in this package.'''
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import errno
|
|
||||||
import platform
|
import platform
|
||||||
import shutil
|
import shutil
|
||||||
import stat
|
import stat
|
||||||
@ -127,14 +126,7 @@ def openlfdirstate(ui, repo, create=True):
|
|||||||
matcher = getstandinmatcher(repo)
|
matcher = getstandinmatcher(repo)
|
||||||
for standin in repo.dirstate.walk(matcher, [], False, False):
|
for standin in repo.dirstate.walk(matcher, [], False, False):
|
||||||
lfile = splitstandin(standin)
|
lfile = splitstandin(standin)
|
||||||
hash = readstandin(repo, lfile)
|
|
||||||
lfdirstate.normallookup(lfile)
|
lfdirstate.normallookup(lfile)
|
||||||
try:
|
|
||||||
if hash == hashfile(repo.wjoin(lfile)):
|
|
||||||
lfdirstate.normal(lfile)
|
|
||||||
except OSError, err:
|
|
||||||
if err.errno != errno.ENOENT:
|
|
||||||
raise
|
|
||||||
return lfdirstate
|
return lfdirstate
|
||||||
|
|
||||||
def lfdirstatestatus(lfdirstate, repo, rev):
|
def lfdirstatestatus(lfdirstate, repo, rev):
|
||||||
|
Loading…
Reference in New Issue
Block a user