Improve the editing experience when patching or landing commits.

Review Request #10672 — Created Sept. 1, 2019 and submitted

chipx86
RBTools
release-1.0.x
1a48501...
rbtools

This change reworks the code that handles creating a commit when
patching (using rbt patch -c) or landing (using rbt land -e) to
improve the editing experience and error handling.

Both Git and Mercurial provide a custom filename for the editor,
mirroring the format of the filenames normally used by those tools. This
gives editors a change to perform syntax highlighting, line length
limits, etc.

If the user deletes the entire contents of the commit message, the
commit won't be created. Instead, a message will be shown explaining the
situation and next steps.

There are also some fixes for command line arguments for specifying
author information for Git and Mercurial, improved error handling all
throughout, and better file tracking in Mercurial.

In addition, we now have extensive test coverage for commit creation for
both Git and Mercurial.

Unit tests pass for Git and Mercurial.

Manually tested locally patching changes from both Git and Mercurial
in the commit editor mode. Verified that the correct message was used
when editing the commit, and that a suitable set of instructions was
provided when canceling the commit.

Also verified tracking of edited and new files in Mercurial.

chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.0.x (bc2032c)
Loading...