Hacker News new | past | comments | ask | show | jobs | submit login

Doesn't have two separate concepts for "branches" and "bookmarks" which is extremely confusing compared to the simple Git DAG.

Not having to add crucial functionality like stashes by editing the config to add a new module.

Better UI. For example to get full hash of the current commit, the recommended way to do it in git is `git rev-parse HEAD`. In hg it's `hg log -l 1 --template '{node}\n' -r .` Yes really.

Easy to customize logs.

Magit exists.




Git's idea of branches confuses a lot of new users. Their expect them to work like Mercurial's. Bookmarks were added for Git compatibility.

The Mercurial command to get the short hash of the current commit is "hg id -i". You can get the long hash by adding "—debug". The "hg log" command shows a more general way to do it and could be shorter.

Mercurial logs are also easy to customize.


You'd think it would be `hg id`, but it doesn't work without connection to remote repository and is extremely slow with large repositories with uncommited changes, so it's not the correct answer. --debug option also prints info other than hash and can't be customized.

>Mercurial logs are also easy to customize.

I wanted to customize logging string so that it shows (sequential commit id) - (other stuff), but there's no way to make sequential commit id to line up neatly when it goes from 9 to 10, or from 99 to 100. So making a pretty one-line log is impossible. Maybe it was fixed since then, I wouldn't know.


"hg id" works offline. Adding "--debug" only makes the hash longer. It can be customized with a template like "hg log".

Looking for uncommitted changes is what makes it slow. The fsmonitor extension makes it faster. Adding "-r ." skips it.

The "pad" function was added in 2014.[1]

[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2014...




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: