Subversion tips: Automatic keywords

Subversion has the possibility to automatically enable specific properties to new files. This can be set in the "config" file, which is stored under ...\Application Data\Subversion, by adding (or uncommenting) the following lines:

enable-auto-props = yes
*.m = svn:keywords=Id Date Author Revision HeadURL

In Matlab, you can easily open this file from the command window by the command: edit(fullfile(getenv('APPDATA'), 'Subversion', 'config'))
Alternatively, you can open this file via the Matlab start button -> Toolboxes -> Edit Subversion config

When including in your m-file the following lines, the values will be automatically added while updating with subversion:

svn:keywords
% $Id: $
% $Date: $
% $Author: $
% $Revision: $
% $HeadURL: $
  • No labels