bash-git-prompt icon indicating copy to clipboard operation
bash-git-prompt copied to clipboard

Add mercurial-support

Open jwalt opened this issue 7 years ago • 2 comments

This addresses #222. The set of displayable information is not exactly the same due to differences in how hg and git work, but this comes close and displays other useful information in places where hg differs from git.

Sorry for trashing gitstatus.sh, wrapping the existing code in a function seemed to be the easiest way.

jwalt avatar May 23 '17 17:05 jwalt

Hi Jörg,

I've offered to jump in to get this reviewed. I contribute to mercurial and would love to see this merged too. Would you be able to rebase this patch on top of master? That'll make it easier for me to test locally, so we can see if this can be landed!

Thanks!

mjpieters avatar Aug 02 '18 20:08 mjpieters

Hi @jwalt,

could you please rebase this PR on top of master?

Thanks a lot

magicmonty avatar Aug 03 '18 13:08 magicmonty

Hi @jwalt, I don't know if you are still interested in this feature, but if so, I'd suggest the following changes in order to have separate the concerns better:

  1. Create a new script which is called "git-support.sh`.
  2. Move all git operations used anywhere in the repository out to this script into well named really short (usually one-liners) functions.
  3. Source the git-operatoins.sh in the script which needs git

this would be a good first merge request by separating git from the rest of the logic.

The next one would then be, to create a mercurial-support.sh script, and implement the same functions as it was done in the git-support.sh, and make the sourcing then a little bit smarter to decide if it is git or mercurial.

If you can work in this changes, I'm happy to merge this for you.

guenhter avatar Oct 20 '22 05:10 guenhter