Adjust initial clone and push behaviour
This is a refactor and user experience overhaul for initial clones and the behaviour of initial pushes. The commits are generally ordered by riskiness or invasiveness: The first commits increase test coverage and serve to make some of the later changes easier to see. Then follows a few refactorings and cleanups, and finally some changesets that actually change behaviour. I don't expect to get all this in at once
One highlight is that the results of an initial clone should now be much more consistent and correspond to user expectations.
Another important change is to no longer “invent” bookmarks and paths. Some of the current behaviour I found odd was:
- Imply a default and set corresponding remote pseudotags if you pull from a location directly.
- Invent a
master
bookmark when pushing from a repository that has no bookmarks to an empty Git repository. - Output updated references when pushing to a named path, but not a specific location.
I think such behaviour is likely to cause more problems for users, eventually. Although we should try to conform to the regular Mercurial behaviour, we shouldn't do so unless we know it's right. Especially for push, it's much better to nothing than to do something wrong. And we shouldn't pretend to handle all bookmark-related issues for the user, unless we can keep doing so. (And that leads me to the next change: Don't create bookmarks and branches unless the user requested it. But that's not covered here.)