svn

Configure eclipse and subversive under Ubuntu

Problem:

Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386:/usr/lib/xulrunner-addons:/usr/lib/xulrunner-addons:/usr/java/packages/lib/i386:/lib:/usr/lib

Solution
#install libsvn-java
sudo  apt-get install libsvn-java

#add following linies to eclipse.ini

Switching from one svn working copy to another

To switch you working copy from trunk to branch I recommend do following

#1 copy you working copy, because switching can be painfull
cp -r trunk branch
#2 run svn switch
svn switch https://svn.jboss.org/repos/jbosstools/branch branch

If repository has changed URL you can update localcopy using following command
svn switch --relocate https://old-url http://new-url 3.2.helios/

Generating SVN statistic graphics using statSvn for particular develpers

To generate svn repository statistic information you can use statsvn

    To generate this:
  • Checkout project from repository
    svn co svn://server/repo/trunk
  • Create a log file
    svn log -v --xml > logfile.log
  • Run StatSvn, if you don't want include some developers into statistic, you can use param -no-developer [login-name]
    An example of command
     

SVN properties

To get file processed correctly after svn checkout or when we view file in repository using browser we should set svn properties to this file.
For viewing files in svn using browser mime type is very important

# possible variant image/png text/css
svn propset svn:mime-type text/html test.html

More mime types
To get executable right under unix, linux
svn propset svn:executable ON somescript

To view setted property use
svn proplist vpe-news-3.1.0.CR2.html --verbose

How to add svn ignore property to folder

    If you want add some folder to svn ignore, you should follow next steps
  • First check status of folder
    svn stat <folder_name>
    ?       test
  • Next add svn ignore to folder
    svn propset svn:ignore target <folder_name>
    svn ci <folder_name> -m"Folder has been marked for ignoring"
  • Check folder status again
    svn stat <folder_name>
    #nothing should be printed

Recursively Remove .svn Directories in Linux

Recursively Remove .svn Directories in Linux

rm -rf `find . -type d -name .svn`

Another way, is to use svn export. Copy of project will be without .svn
svn export project copyOfProject

Syndicate content