...Creating a repository
...Automatic start of the SVN server on Open Solaris
...SVN Client Commands




Open Solaris 2008.11UbuntuWindows
Package SUNWsvnYesYes. TortoiseSVN is a particularly handy extension for the Windows Explorer

Creating a repository

  • create the repository: svnadmin create <dir>
  • start the svn URL server: svnserve -d -r <dir>
  • create the initial directories: svn mkdir svn://<hostname>/<project> -m "blah"

Automatic start of the SVN server on Open Solaris

This consists in writing a manifest for the new service: /var/svc/manifest/application/svnserve.xml
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
 <service name='application/svnserve' type='service' version='1'>
   <create_default_instance enabled='true'/>
   <dependency name='loopback' grouping='require_all' restart_on='error' type='service'>
     <service_fmri value='svc:/network/loopback:default'/>
   <dependency name='physical' grouping='optional_all' restart_on='error' type='service'>
     <service_fmri value='svc:/network/physical:default'/>
   <exec_method name='start' type='method' exec='/usr/bin/svnserve -d -r /export/home/svn' timeout_seconds='60'>
   <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'>
   <stability value='Unstable'/>
      <loctext xml:lang='C'>Subversion Standalone Server</loctext>
      <doc_link name='Version Control with Subversion' uri='http://svnbook.red-bean.com/'/>
I actually copied my manifest from some slides I found on the Internet, but sorry, I can't remember where... ;-( Then, the new service must me added to the system:
  • validate the manifest: svccfg validate svnserve.xml
  • add the new service: svccfg import svnserve.xml
  • start the new service:
    # svnadm enable svnserve
    # svcs svnserve
    STATE          STIME    FMRI
    online         20:20:06 svc:/application/svnserve:default

SVN Client Commands

  • commit modifications: svn commit -m "my modif"
  • checkout: svn co svn://<hostname>/<project>/etc
  • checkout as a given user: svn co --username <username>
  • import an initial directory in the repository: svn import <dir> svn://<hostname>/<project>/etc -m "Message"



Open Solaris 2008.11UbuntuWindows
See Julien Simon to install from sources (simple)YesYes. TortoiseSVN is a particularly handy extension for the Windows Explorer
Create a new repository:
git init
Clone a repository:
git clone therepository
To clone a repository locally,
$ git clone /home/git/repositories/prog.git
To list untracked files, or changes not committed:
git status
To commit files:
git commit
To commit all files (listed in git status): git commit -a See differences for a given commit:
git log -p file
To modify the comment in the last commit:
git commit --amend
Cancel last commit:
git reset HEAD^
NB. This won't work if the commit has been pushed. If you have pushed it, you must:
git revert commit-id
and then re-push
  • HEAD is last commit
  • HEAD^ is the commit before that
  • or you can specify the commit number
Cancel and revert files on your disk:
git reset --hard HEAD^
Cancel before commit or just get a fresh copy:
git checkout file
Tag a version:
git tag tagname commit-id
git push --tags
To delete a tag, git tag -d tagname


To configure CPAN urls to get packages from:
root# perl -MCPAN -e shell
cpan> o conf urllist pop
cpan> o conf urllist push ftp://mir1.ovh.net/ftp.cpan.org/
cpan> o conf urllist push http://www.enstimac.fr/Perl/CPAN/
cpan> o conf urllist push ftp://ftp.pasteur.fr/pub/computing/CPAN/
cpan> o conf commit
cpan> reload cpan
cpan> o conf urllist
Type 'o conf' to view configuration edit options
cpan> quit
Lockfile removed.