Optimize Mercurial summary and description population; change behavior

Review Request #5436 — Created Feb. 8, 2014 and discarded

indygreg
RBTools
master
rbtools

Optimize Mercurial summary and description population; change behavior

The main goal of this patch is to change the --guess-description
behavior of the Mercurial client to not put a redundant summary line
in the guessed description.

To accomplish this, the functions for summary and description guessing
were merged. This means we only invoke `hg` once to get both the summary
and description. This is a slight performance win.

A new test to cover the new behavior is introduced. Existing test cases
have been adapted to contain multi-line commit messages so the code
is adequately tested.

Ran tests locally. I don't have hg-subversion installed, so I didn't run those tests.

david
  1. Because other SCMs have the same issue (git, bazaar, perforce, etc.), I think I'd prefer that this be done in 'rbt post' by checking if the first line of self.options.description is the same as self.options.summary.

    1. That makes sense to me. I'll refactor this when I have time (likely not for a few days). Feel free to beat me to it.

    2. I misse this change, but I beat you to it.

      https://reviews.reviewboard.org/r/5457/

  2. 
      
IN
Review request changed

Status: Discarded

Change Summary:

Obsoleted by https://reviews.reviewboard.org/r/5457/
Loading...