1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #1310 resolved

Can't apply patch with rejected chunks when username not set

Anonymous created an issue

To repeat:

Don't set a user name

Goto a repository with an unapplied patch which will be rejected

Attempt to apply the patch

Say 'yes' to editing the file and rejected chunks

Edit the file to merge the rejected chunks and click 'Save'

At this point: the editor window closes without any error message the non-rejected files from the patch are applied to the repository the rejected file you edited is shown as an uncommitted file the patch shows as not applied in the patch queue window * noting tells you that the save failed because the user name was not set

The error handling under the save button should be improved, and also when attempting to apply a patch it should check the user name is set before starting so that you cannot get a half-applied patch.

This is with V2.1.4

Comments (4)

  1. Steve Borho

    We have routine that checks for the username being set. So if we knew which Mercurial subcommand bailed in this use-case (perhaps revert, but I can't guess why), we could check the username first.

  2. Anonymous

    Why not just call that check routine as soon as apply patch is pressed instead of waiting until it is necessary to invoke a mercurial command.

  3. Log in to comment