bookmarks: fix formatting of exchange message (issue4439)
The message formatting was crashing when doing explicit pulling `hg pull -B X`.
This changeset fix it and improved the test coverage.
Run Mercurial tests with Vagrant:$ vagrant up$ vagrant ssh -c ./run-tests.sh