SVN
From UFO:AI
Contents |
About SVN
SVN usage
Branches/Tags Releases
Read more about that here: Releases/SVN
Merging changes
You can merge changes from trunk into a branch (or vice versa) by using the following commands:
e.g you have made a change in trunk with revision 123. This change should now be merged into the branch_2.0.
cd ufoai_2.0 svn merge -r122:123 https://ufoai.svn.sourceforge.net/svnroot/ufoai/ufoai/trunk svn commit
or vice versa:
cd trunk svn merge -r122:123 https://ufoai.svn.sourceforge.net/svnroot/ufoai/ufoai/branches/ufoai_2.0 svn commit
Note: The -r 122:123 tells svn to use the difference between these two revisions from the source and merge them into the working copy.
Read more about svn merge or best practices for merging.
Note that subversion 1.5 will have improved merging functionality.
Mime-types and EOL style
Prepare Subversion to automagically set EOL and mime-types
Subversion has a nice option named auto-props that takes care of most of the svn properties on adding a file to SVN.
First make sure that enable-auto-props = yes is set in the config file.
Then place the following text below the [auto-props] section in the config file:
# Text files *.c = svn:eol-style=native *.cpp = svn:eol-style=native *.h = svn:eol-style=native *.dsp = svn:eol-style=CRLF *.dsw = svn:eol-style=CRLF *.sh = svn:eol-style=native; svn:mime-type=text/x-sh; svn:executable *.txt = svn:eol-style=native; svn:mime-type=text/plain *.htm = svn:eol-style=native; svn:mime-type=text/html *.html = svn:eol-style=native; svn:mime-type=text/html Makefile = svn:eol-style=native *.ac = svn:eol-style=native *.am = svn:eol-style=native *.m = svn:eol-style=native *.pl = svn:eol-style=native; svn:mime-type=text/x-perl; svn:executable *.pdb = svn:eol-style=native; svn:mime-type=text/x-perl *.py = svn:eol-style=native; svn:mime-type=text/x-python; svn:executable *.po = svn:eol-style=native *.qe4 = svn:eol-style=native *.rc = svn:eol-style=native *.tex = svn:eol-style=native *.ufo = svn:eol-style=native *.ump = svn:eol-style=native *.xml = svn:eol-style=native *.map = svn:eol-style=native # Images *.bmp = svn:mime-type=image/bmp *.gif = svn:mime-type=image/gif *.png = svn:mime-type=image/png *.jpg = svn:mime-type=image/jpeg *.jpeg = svn:mime-type=image/jpeg *.tga = svn:mime-type=image/x-tga *.tif = svn:mime-type=image/tiff *.tiff = svn:mime-type=image/tiff *.ico = svn:mime-type=image/x-icon *.xcf = svn:mime-type=image/x-xcf *.xcf.gz = svn:mime-type=image/x-compressed-xcf *.xcf.bz2 = svn:mime-type=image/x-compressed-xcf *.xbm = svn:mime-type=image/x-xbitmap *.xpm = svn:mime-type=image/x-xpixmap *.psd = svn:mime-type=image/psd *.svg = svn:mime-type=image/svg+xml # Multimedia *.ogg = svn:mime-type=application/ogg *.wav = svn:mime-type=audio/x-wav *.blend = svn:mime-type=application/x-blender # Misc *.exe = svn:mime-type=application/x-executable *.dll = svn:mime-type=application/x-msdownload *.zip = svn:mime-type=application/zip *.pdf = svn:mime-type=application/pdf *.doc = svn:mime-type=application/msword
The config file for Subversion is found here:
- Unix/Linux/OS X: ~/.subversion/config
- Windows (TortoiseSVN): You can edit the svn config from the TortoiseSVN context menu.
- Windows (general): %appdata%\Subversion\config You can open this file via CtrlO in i/e/ notepad
Fixing most EOL and mime-type settings afterwards
Use the file contrib/scripts/fix to change the svn properties afterwards.
Put this file into trunk/ or make it available for execution in another way.
Now call ./fix
(FIXME: file -i -b filename print the mimetype, too)
Copyright and Licenses in SVN
I general every file in svn should have the following three properties (if the info exists):
| Information | Description | SVN Property Name |
|---|---|---|
| Copyright | A list of all authors (full name if possible and nickname(s) if used) | svn:copyright |
| License | The exact license the data is placed under (See Licensing) | svn:license |
| Source | Is it a derived work? Provide source url and/or contact address/names. | svn:source |
Example
This is an example for the file David01.ogg
svn ps svn:license "Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License" David01.ogg svn ps svn:copyright "David Reeves (Destructavator)" David01.ogg
The command used here (ps) means propset or "property set".
List existing information
Use the following to show the current properties in the current directory (-R means recursive) :
svn proplist -R -v
Links
- SVNMerge Merge tracking tool for branch management
- Getting the source
- Releases/SVN
- TortoiseSVN (for Windows)
- tigris svn command line svn client binaries for most OSes.

