I am doing push using mercurial hg to bitbucket.org using https.
There is a bunch of changes to text files and also binary files added. So I would like to capture the real traffic of this command in http format to analyze. How can I make it? Or at least inspecting an example of captured human-readable push would be great.
There is a link for mercurial wire protocol, but no example how it might really look.
There are a couple of proxies (http://mitmproxy.org/ is popular, I really like http://www.charlesproxy.com/) which can MITM the HTTPS connection… However, it might be simpler to start a local Mercurial server, then sniff that connection:
Then fire up your packet sniffer watching on the loopback interface, and from another shell:
And here’s a bit of what it looks like: