This is implementation of git-like remote bookmark (branch in git terminology) tracking for Mercurial. There is not a lot of documentation, but you can read tests to get idea of how this works.
Right now you can get them by cloning repo: http://hg.piranha.org.ua/remote-bookmarks/
Enable as a regular extension then:
[extensions]
remote-bookmarks = path/to/cloned/repo/remote-bookmarks.py
Docs: