Issues

Pushing a new named branch should not require enabling the "Force pull or push" option

When you create a new anonymous branch in a local repo and you try to push your changes to a remote repo, TortoiseHg will show you an error message saying that you must enable the "Force pull or push" option if you want to increase the number of heads on the remote repository. This makes perfect sense since in bare mercurial you would need to use the "-f" (force) command line option to successfully push your changes to the remote repository.

However, when you create a new named branch in your local repository and then you try to push it you also get an error message such as:

In order to be able to complete the push you also must enable the "Force pull or push" option.

I believe that this behavior is not correct for several reasons:
- The error message does not mention the "force pull or push" option at all. Thus, it does not make sense (IMHO) that in order to fix this error you must enable that option. It also makes it hard for the user to find how to fix the issue on its own.
- It subtly discourages the use of named branches.
- It subtly encourages users to enable the "Force pull or push" option when working with named branches, which may result in them pushing multiple anonymous branch heads more easily than they would otherwise.

I think that the proper behavior would be for TortoiseHg to show a confirmation dialog rather than an error message when the user tries to push a new named branch, regardless of the state of the "Force pull or push" setting.

The behavior of TortoiseHg when trying to push a new anonymous branch should stay the same.

This would let users make it hard on themselves to push multiple anonymous branch heads into a remote repository, while still letting them push new named branches (after confirmation).

Comments (3)

I agree that this change would be very helpful! Wiki macro error: User 'amadawn' not found. has perfectly described exactly what I feel about the drawbacks of the current behaviour and how it should behave.