Difference between revisions of "Committing policies"

From Gramps
Jump to: navigation, search
(Content moved out of "Brief Introduction to SVN")
 
(Change from using ChangeLog files to Subversion log messages.)
Line 1: Line 1:
;Adding new files:All the files with the translatable strings '''must''' be listed in the po/POTFILES.in file. This means that most new files must have their names added to that file.
+
==Adding New Files==
 +
All the files with the translatable strings '''must''' be listed in the po/POTFILES.in file. This means that most new files must have their names added to that file.
  
:All the files that need to be released '''must''' be listed in the Makefile.am in the same directory. Please remember to do this for new files that you add to SVN.
+
All the files that need to be released '''must''' be listed in the Makefile.am in the same directory. Please remember to do this for new files that you add to SVN.
  
:You'll also need to set several properties for new files.  For .py files, try the following:
+
You'll also need to set several properties for new files.  For .py files, try the following:
 
  svn propset svn:mime-type text/plain src/somefile.py
 
  svn propset svn:mime-type text/plain src/somefile.py
 
  svn propset svn:eol-style native src/somefile.py
 
  svn propset svn:eol-style native src/somefile.py
 
  svn propset svn:keywords 'Id' src/somefile.py
 
  svn propset svn:keywords 'Id' src/somefile.py
  
;Bugfixes in branches:Whenever a bug is fixed in a branch, it should be the committer's responsibility to make sure the fix is also committed to the trunk.
+
==Bugfixes In Branches==
 +
Whenever a bug is fixed in a branch, it should be the committer's responsibility to make sure the fix is also committed to the trunk.
  
:You can do this manually, but you can also create a patch on gramps22 branch and apply it to trunk:
+
You can do this manually, but you can also create a patch on gramps22 branch and apply it to trunk:
 
  gramps22$  svn diff -r PREV > ~/mypatch.patch
 
  gramps22$  svn diff -r PREV > ~/mypatch.patch
 
  gramps22$  cd ../trunk
 
  gramps22$  cd ../trunk
 
  trunk$  patch -p0 < ~/mypatch.patch
 
  trunk$  patch -p0 < ~/mypatch.patch
  
:Then you may have to fix things that could not be applied due to conflicts. The patch program would mark the conflicts with the <<<<<<, ======, and >>>>>> signs. You will then need to commit your changes:
+
Then you may have to fix things that could not be applied due to conflicts. The patch program would mark the conflicts with the <<<<<<, ======, and >>>>>> signs. You will then need to commit your changes:
 
  trunk$  ./svnci
 
  trunk$  ./svnci
  
:More info: http://svnbook.red-bean.com/
+
More info: http://svnbook.red-bean.com/
  
;ChangeLog entries:Every change to the code should be documented in the top-level ChangeLog file (or in per-directory ChangeLog for po and help directories). When possible, we'd like to stick to the [http://www.gnu.org/prep/standards/html_node/Change-Logs.html GNU ChangeLog standards].
+
==Log Messages==
 +
Every commit to Subversion must be accompanied by a log message. These messages will be generated into a ChangeLog when a release is made and should conform to the following guidelines:
  
:This especially goes for committing contributed code. In that case, the ChangeLog should list the contributor's name and email, not the maintainer's.
+
* Messages should attempt to describe how the change affects the functionality from the user's perspective.
 +
* It is not necessary to describe minute details about the change nor the files that are affected because that information is already stored by Subversion.
 +
* If the commit fixes a bug on the [http://bugs.gramps-project.org bug tracker], the log message shall include the bug ID and summary from the tracker.
 +
* When committing contributed code, the log message shall list the contributor's name and email.

Revision as of 20:33, 9 March 2008

Adding New Files

All the files with the translatable strings must be listed in the po/POTFILES.in file. This means that most new files must have their names added to that file.

All the files that need to be released must be listed in the Makefile.am in the same directory. Please remember to do this for new files that you add to SVN.

You'll also need to set several properties for new files. For .py files, try the following:

svn propset svn:mime-type text/plain src/somefile.py
svn propset svn:eol-style native src/somefile.py
svn propset svn:keywords 'Id' src/somefile.py

Bugfixes In Branches

Whenever a bug is fixed in a branch, it should be the committer's responsibility to make sure the fix is also committed to the trunk.

You can do this manually, but you can also create a patch on gramps22 branch and apply it to trunk:

gramps22$  svn diff -r PREV > ~/mypatch.patch
gramps22$  cd ../trunk
trunk$  patch -p0 < ~/mypatch.patch

Then you may have to fix things that could not be applied due to conflicts. The patch program would mark the conflicts with the <<<<<<, ======, and >>>>>> signs. You will then need to commit your changes:

trunk$  ./svnci

More info: http://svnbook.red-bean.com/

Log Messages

Every commit to Subversion must be accompanied by a log message. These messages will be generated into a ChangeLog when a release is made and should conform to the following guidelines:

  • Messages should attempt to describe how the change affects the functionality from the user's perspective.
  • It is not necessary to describe minute details about the change nor the files that are affected because that information is already stored by Subversion.
  • If the commit fixes a bug on the bug tracker, the log message shall include the bug ID and summary from the tracker.
  • When committing contributed code, the log message shall list the contributor's name and email.