Is it possible to view in the Mercurial logs all instances where a user performed an hg push -f when pushing their changes?
Is it possible to view in the Mercurial logs all instances where a user
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m pretty sure it is not. Mercurial, out-of-the-box, does not track the history of commands.
If you want to explicitly log such actions, you’ll need to use Mercurial’s hooks to get the information to log. Probably you would be looking at
pre-pushorpost-push.Other than that, you could manually infer a few of the instances, such as any multiple heads. New named branches require
-fto push them, so any named branches may have been done that way. Any multiple heads on the same branch (unnamed branches) that have not been merged were obviously forced pushes. If they have been merged, you’ll never know whether the push already had the merge or whether it was forced and then merged later.