Page MenuHomePhabricator

Investigate replacing uses of `hg grep`/`hg manifest` with `hg locate`
Closed, ResolvedPublic

Description

We currently use hg manifest and hg grep to list and locate files, but these are potentially much less efficient than using hg locate. Particularly:

RichardJ: hg locate "set:grep(lemons) and not binary()" --rev . may be an alternative

The hg manifest replacements are probably straightforward. We also get a --print0 flag out of this.

Event Timeline

epriestley raised the priority of this task from to Low.
epriestley updated the task description. (Show Details)
epriestley added a project: Diffusion.

The hg grep search doesn't seem to be too slow. Also, by replacing it with a hg locate command you lose the line numbers which seems to be a shame.

  • It looks like DiffusionQueryPathsConduitAPIMethod has another hg manifest call, which we should switch over.
  • We can leave the hg grep calls, per comment above.
  • You could maybe refactor both hg manifest calls into a DiffusionLowLevelMercurialPathsQuery or something, possibly, if sharing the code otherwise is a pain.