Skip to content

Conversation

useche
Copy link

@useche useche commented Sep 21, 2025

Mercurial follows a very similar patter to Git: (1) It has an index pointing to the latest changes in the repo (dirstate) and (2) we are able to cat the file content of files in the repository.

This patch does three two things:

  1. Format diff.lua with lua_ls. If this is not ok, I can add a revert of it.
  2. Parameterize Git handling so that it accept a generic index, command to find the repo directory, and command to get files in the repo. Methods are renamed s/git_/dvcs_/ to make it clear that they are more generic now.
  3. Add mercurial support by populating the parameters created above with the correct values.

Originally pr #1878.

useche added 8 commits June 29, 2025 12:13
the final idea is to add support for `mercurial`, that has a similar
structure to git's. Parameterizing these functions makes the addition of
mercurial trivial. The patch renames those functions as `s/git_/dvcs_/`
to reflect their more generic nature.
so that next time we try to use `dvcs_cache`, we can start from scratch.
This is important when other `gen_sources` are using `dvcs_cache` as
well.
in particular, this patch fixes:
1. `s/watch_index_opts/opts/`
2. `s/dvcs/vcs/`
3. `s/hg/mercurial/`
4. Format with `stylua`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants