Difference between revisions of "SVN Commit Tips"

From Gramps
Jump to: navigation, search
(Some procedural recommendations)
Line 1: Line 1:
 +
[[Category:Developers/General]]
 +
 
= Some procedural recommendations =
 
= Some procedural recommendations =
  

Revision as of 17:53, 2 February 2009


Some procedural recommendations

1. Always do svn up before a commit, and look especially for conflicts marked 'C'. If necessary get advice about handling conflicts.

2. Always do svn st and look for modifications 'M' that are unexpected or unintended. This is a *very important* sanity check. Checking the '?' reports for forgotten additions is also worth remembering.

3. I personally prefer to explicitly name my commit targets via 'svn ci X Y Z ..', but if you do simply 'svn ci' (or use a utility commit script), it is especially important to:

(a) check advisory (2)

(b) quit (no save) your edit session if you see a filename you did not expect -- svn will prompt whether you want to abort or commit without a log entry (say 'abort').

And here are a couple of incidental suggestions

  • avoid grouping unrelated changes; better to divide into separate commits for the following reasons: a better log entry; easier troubleshooting/reverting. (and probably more).
  • similar to above, it may be better to make small incremental changes than one big one (if possible). Interim changes should not introduce breakage, of course.
  • logs are important -- please give some thought to the log message: the ideal first sentence would be short, meaningful, and suggestive. Include a tracker issue #NNNN there, if appropriate. Additional explanation is encouraged if it would be something you yourself would appreciate when reading it six months from now. If relevant, emphasize impact of change from user's point of view.

..jgsack: well, those are my self-reminders anyway. Others may have other ways of saying it or other things to emphasize.