add separator between commits

Review Request #1465 — Created March 8, 2010 and discarded



Reviewers add separator between commits

When posting a git / git-svn review with --guess-description, add a
separator between commit logs. The separator is a 72-character line of a
user-specified character. The default is empty.
posting this review request :-) (with no separator; also tested specifying separator with a git-svn repo, trying both single-commit and multiple-commit requests)
  1. Would you mind also updating the post-review docs in the Review Board source tree with the new parameter?
    1. Okay. That is a different repo, though? Or...?
    2. Okay, I found them, will post another request presently.
    3. Had some problems with that. FTR, I e-mailed the patch to Christian instead.
    4. Okay, managed to get reviewboard checked out from github instead of gitorious; doc changes are now up here:
  2. rbtools/ (Diff revision 1)
    Blank lines around conditionals.
  3. rbtools/ (Diff revision 1)
    Can do: sep = "".ljust(...)
    Or: sep = 72 * options.commit_separator
    which should do the same thing.
    1. Thanks for the tip... my Python is still a bit green :-).
  4. rbtools/ (Diff revision 1)
    Would be nice to guard against the user having specified multiple characters.
  5. rbtools/ (Diff revision 1)
    Same here.
Review request changed

Change Summary:

Update based on comments... need to find "post-review docs in the Review Board source tree" yet, but hopefully the .py is okay now. Thanks again for the feedback!


Revision 2 (+31 -10)

Show changes

  1. Looks good for the most part.
    Mind writing a unit test?
    1. How would I go about that?
  2. rbtools/ (Diff revision 2)
    I think you mean % (sep or "")
    1. No, I definitely don't :-). I want a literal '%s' as part of the pretty-format string ('git log' will put the subject there), and I want 'sep', if it is set, concatenated to the format string.
  3. rbtools/ (Diff revision 2)
    Can you rename this to --git-commit-separator?
    Going to try to start prefixing parameters with their SCM until they're "promoted" to working with more.
    1. Won't that be a compatibility headache in the future, though? Or do you keep the option around both with and without 'git-'?