Subversion access

From PLplotWiki
Jump to: navigation, search

Contents

Subversion Access

The PLplot Subversion repository can be checked out through SVN with the following instruction set:

svn co https://plplot.svn.sourceforge.net/svnroot/plplot/trunk plplot

You can browse the PLplot Subversion repository online at http://plplot.svn.sourceforge.net/viewvc/plplot/.

Subversion Clients

Remarks

Setting file and directory svn properties

(Copied from a post from Alan Irwin).

The only general SVN maintainence left to do, that I am aware of, is to correct and maintain directory and file properties. In general, cvs2svn set directory and file properties correctly for the existing files, but we should be aware of these property issues for newly created directories and files.

One directory property you should be aware of is the svn:ignore property which has the same function as .cvsignore did for CVS. (In fact, cvs2svn took the contents of .cvsignore and put it into this directory property. For example, if you look at the svn:ignore property for the src directory you will find the following list of file patterns which should seem familiar:

svn:ignore : *.flc
Makefile
Makefile.in
.deps
.libs
*.la
*.lo

In addition to the above directory property, there are several file properties you should be aware of. Files that are executable have the property

svn:executable : *

set which assures that the correct execute permission bit is set up for Unix systems on checkout. Apparently this property is set automatically for newly added files if their execute permission is set first.

Files that are text have the property

svn:eol-style : native

set so that everybody will get the right end-of-lines inserted into their text files on their platform of choice. The svn:eol-style property is the most important. See the discussion of that at http://svnbook.red-bean.com/en/1.0/ch07s02.html.

Files that are binary have the property

svn:mime-type : application/octet-stream

set and svn:eol-style is not set.

If you notice anything wrong in any of these respects (wrong files being ignored by subversion, incorrect execute permissions on checkout, wrong line endings, or corrupted binary files), please fix the problem by adjusting the properties as above. (See "svn help proplist" to see how to list properties for a file, and "svn help propedit" or "svn help propset" to find out how to change properties to what you want.) And also, _please_ remember to specify these file properties for newly created files.

Note, that can be a bit of a burden for ordinary text files if you always have to remember to set "svn:eol-style : native" by hand. I just discovered a way to do this automatically (and also do the right thing for some common binary files) if you edit the auto-props section of $HOME/.subversion/config. That section sets properties of newly added files based on file-globbing patterns.

Here is my new file-globbing setup in that file. (You also have to enable auto-props in that same file.)

* = svn:eol-style=native
*.png = svn:mime-type=application/octet-stream
*.jpg = svn:mime-type=application/octet-stream
*.jpeg = svn:mime-type=application/octet-stream
*.gif = svn:mime-type=application/octet-stream

After implementing the above change, I then did the following to test it:

touch test.png
touch test
svn add test*
svn proplist --verbose test*
Properties on 'test':
   svn:eol-style : native
Properties on 'test.png':
   svn:mime-type : application/octet-stream

which is exactly the file properties we want so I suggest you use the same setup to make svn life really easy for you.

The above chapter in http://svnbook.red-bean.com/en/1.0/ch07s02.html has additional information about properties that should be useful as well. For example, one should be able to configure your svn client so one don't have to worry about setting properties by hand.

See "Automatic Property Setting" in that same chapter. That works well for me in a Linux environment, but one will have to read further to see whether it will work in windows.

Automatic property setting in TortoiseSVN

In order to set the properties automatically in TortoiseSVN (Windows), right click in the Windows explorer and choose 'TortoiseSVN->Settings'. In the 'General' tab choose 'Edit' Subversion configuration style. The NotePad pops up with the config file and change the following settings:

  • uncomment enable-auto-props = yes

in the [miscellany]. In the [auto-props] section add the properties from above

* = svn:eol-style=native;svn:keywords=Author Date Id Revision 
*.png = svn:mime-type=application/octet-stream
*.jpg = svn:mime-type=application/octet-stream
*.jpeg = svn:mime-type=application/octet-stream
*.gif = svn:mime-type=application/octet-stream
Personal tools