Skip to content

Draft: commands: add whereami command

Arun Kulshreshtha requested to merge topic/default/whereami into branch/default

This commit adds a new hg whereami command that prints the hashes of the working directory parents. This is similar to the hg identify command (or hg log -r . -T '{node}'), except unlike hg identify, this command does not compute the status or any other information. The goal of this command is to provide the hash of the current commit with minimal latency, which in turns allows this information to be used in latency-sensitive contexts (e.g., when rendering the user's shell prompt). This is similar to using the equivalent git command (git rev-parse HEAD), which has extremely low latency.

The command name and behavior were inspired by the equivalent command from Facebook's EdenSCM CLI.

Edited by Raphaël Gomès

Merge request reports