Provide --guess-description and --guess-summary for Mercurial revision ranges

Review Request #1333 — Created Dec. 28, 2009 and submitted

Information

RBTools

Reviewers

Extracts all commit messages from the repository and concatenates them to form the description. For the summary, the first line is picked.
We have been running a slightly edited version of this in production for months.

In diff r3: Tested the diff_between_revisions functionality.
RI
chipx86
  1. 
      
  2. rbtools/postreview.py (Diff revision 1)
     
     
     
    Rather than a \ at the end, put these all in parens. Please also use parens for the first "foo and not bar" and for the second so it's more clear.
    
    Also, the "or ..." on the second line should be aligned with the "options.guess_description"
  3. rbtools/postreview.py (Diff revision 1)
     
     
    I'd prefer this be called "revisions" or something. "therevs" is kind of weird, imho.
  4. rbtools/postreview.py (Diff revision 1)
     
     
    I'd imagine we should use splitlines=True instead of splitting manually, unless the problem is that we must first strip the contents?
    1. Well, I just copied this from a few lines above.
    2. Okay, given that we do have this code twice then, I'd much prefer to see the summary and description extraction code refactored into a utility function in that class, with the changes mentioned. The less code we have to maintain, the better.
  5. rbtools/postreview.py (Diff revision 1)
     
     
    Should just put the len() in here directly. Also, space on both sides of the "-"
  6. 
      
RI
RI
RI
Review request changed
Testing Done:
   

We have been running a slightly edited version of this in production for months.

  +
  +

In diff r3: Tested the diff_between_revisions functionality.

chipx86
  1. Looks good, thanks! Committed as 595d137.
  2.