util: fix mtime used in gcdir

Summary:
The parameter `mtimethreshold` should be used instead of a constant of 14 days.
This fixes an issue where sigtrace output takes a lot of space in hg rage
output.

Reviewed By: DurhamG

Differential Revision: D23819021

fbshipit-source-id: e639b01d729463a4822fa93604ce3a038fbd4a9a
This commit is contained in:
Jun Wu 2020-09-21 13:12:18 -07:00 committed by Facebook GitHub Bot
parent 2b0829b9f5
commit 15fb0f4f51

View File

@ -4774,7 +4774,7 @@ def gcdir(path, mtimethreshold):
"""
paths = [os.path.join(path, p[0]) for p in listdir(path)]
stats = statfiles(paths)
deadline = time.time() - 24 * 3600 * 14
deadline = time.time() - mtimethreshold
for path, stat in zip(paths, stats):
if stat is None:
continue