mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
Remove limit on adjust linknode lookup
Previously we limited the changelog scan for old commits to the most recent 100,000, under the assumption that most changes would be within that time frame. This turned out to not be a good assumption, so let's remove the limitation.
This commit is contained in:
parent
afca077cf9
commit
16d12ec27c
@ -62,10 +62,7 @@ class remotefilectx(context.filectx):
|
||||
cl = self._repo.unfiltered().changelog
|
||||
ma = self._repo.manifest
|
||||
|
||||
# If we don't find it within the top 100,000 commits, it probably
|
||||
# doesn't exist, so give up early instead of wasting the user's time.
|
||||
searchlimit = max(0, len(cl) - 100000)
|
||||
for rev in range(len(cl) - 1, searchlimit, -1):
|
||||
for rev in range(len(cl) - 1, 0, -1):
|
||||
node = cl.node(rev)
|
||||
data = cl.read(node) # get changeset data (we avoid object creation)
|
||||
if path in data[3]: # checking the 'files' field.
|
||||
|
Loading…
Reference in New Issue
Block a user