Support Mercurial repositories as an alternative to Git
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What variant of Codex are you using?
App, IDE Extension
What feature would you like to see?
I would like Codex to support Mercurial (hg) repositories in addition to Git repositories.
Currently, several Codex features assume that the workspace is backed by Git and specifically look for a .git repository. For example, the Undo functionality in Codex does not work when the project is a Mercurial repository, even though the project is fully version-controlled through hg.
Ideally, Codex should detect the version control system used by the workspace and use the corresponding VCS operations where appropriate.
For example:
.git repository → use Git
.hg repository → use Mercurial
At minimum, features such as Undo/revert, repository status detection, diffs, and change tracking should not require Git specifically when an equivalent operation is available through Mercurial.
Why would this be useful?
There are still projects and organizations that use Mercurial as their primary version control system.
Codex itself can already execute hg commands through the shell, so it can work with the source code in a Mercurial repository, but some of the higher-level Codex UI functionality becomes unavailable because the application assumes Git.
Suggested approach
It might be useful to introduce a small VCS abstraction internally rather than having Codex features depend directly on Git.
Conceptually, Codex could detect something like:
.git → Git backend
.hg → Mercurial backend
and expose common operations such as:
status
diff
revert
repository root
tracked files
through the appropriate backend.
For Mercurial, equivalents already exist for most of the operations Codex would need, for example:
hg status
hg diff
hg revert
hg root
This would also make it easier to support additional version control systems in the future without making individual Codex features depend directly on Git.
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by locating the Git-specific handling behind Undo/revert, repository status, diffs, change tracking, and repository-root detection; compare those paths with the listed hg commands. Done means a .hg workspace is detected and these equivalent operations work without requiring .git.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100