tags:

views:

44

answers:

2

Can Mercurial print command success messages instead of no response in the output prompt?

+3  A: 

It returns a value, hence you can wrap it around a script.

Lo'oris
That's not exactly the answer to my question, I specifically want to know if it can actually print a success message, but this is useful to know.
Chris Marisic
A: 

you could writepost-<command>hooks to output whatever you want on succesful commands. I don't see what the benefit would be however.

the book has a tutorial on hooks doing almost exactly what you want but with commit . note with a post-command hook you shouldn't need to check the result for success as the hook will only be run if the command was successful.

jk
This definitely seems like the correct answer, however I know 0 python any chance I could get some help on what I'd want this to look like? `if $HG_RESULT == 0 echo Reverted successfully`
Chris Marisic
you dont need to use python. the book has a good guide on how to set up hook via the shell.
jk