Difference between revisions of "SVN Commit Tips"

From Gramps
Jump to: navigation, search
m (Some procedural recommendations)
Line 1: Line 1:
 
= Some procedural recommendations =
 
= Some procedural recommendations =
  
1. Always do ''svn up'' before a commit, and look especially for conflicts
+
1. Always do ''svn up'' before a commit, and look especially for conflicts marked 'C'. If necessary get advice about handling conflicts.
marked 'C'. If necessary get advice about handling conflicts.
 
  
2. Always do ''svn st'' and look for modifications 'M' that are unexpected
+
2. Always do ''svn st'' and look for modifications 'M' that are unexpected or unintended. This is a *very important* sanity check. Checking the '?'
or unintended. This is a *very important* sanity check. Checking the '?'
 
 
reports for forgotten additions is also worth remembering.
 
reports for forgotten additions is also worth remembering.
  
3. I personally prefer to explicitly name my commit targets via 'svn ci
+
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:
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)
 
(a) check advisory (2)
  
(b) quit (no save) your edit session if you see a filename you did not
+
(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').
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'''
 
'''And here are a couple of incidental suggestions'''
  
* avoid grouping unrelated changes; better to divide into separate
+
* avoid grouping unrelated changes; better to divide into separate commits for the following reasons: a better log entry; easier  
commits for the following reasons: a better log entry; easier
 
 
troubleshooting/reverting. (and probably more).
 
troubleshooting/reverting. (and probably more).
  
* similar to above, it may be better to make small incremental changes
+
* similar to above, it may be better to make small incremental changes than one big one (if possible). Interim changes should not introduce
than one big one (if possible). Interim changes should not introduce
 
 
breakage, of course.
 
breakage, of course.
  
* logs are important -- please give some thought to the log message: the
+
* logs are important -- please give some thought to the log message: the ideal first sentence would be short, meaningful, and suggestive. Include
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.
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
+
..jgsack: well, those are my self-reminders anyway. Others may have other ways of saying it or other things to emphasize.
of saying it or other things to emphasize.
 
  
 
----
 
----

Revision as of 03:41, 28 November 2008

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.