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:
Durham Goode 2016-01-27 15:56:36 -08:00
parent afca077cf9
commit 16d12ec27c

View File

@ -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.