Difference between revisions of "Subversion"

From HCL
Jump to: navigation, search
 
(8 intermediate revisions by the same user not shown)
Line 5: Line 5:
  
 
== Repositories  ==
 
== Repositories  ==
 
+
*http://gforge.ucd.ie/softwaremap/tag_cloud.php?tag=heterogeneous+computing
*http://hcl.ucd.ie/repos/project_name - read only
 
*https://hcl.ucd.ie/repos/project_name - authenticated user access
 
  
 
== To submit  ==
 
== To submit  ==
Line 25: Line 23:
 
= Subversion for Users  =
 
= Subversion for Users  =
  
A good linux client: [http://www.rapidsvn.org/index.php/Documentation RapidSVN].
+
A good cross platform client: [http://www.rapidsvn.org/index.php/Documentation RapidSVN], combined with [http://meldmerge.org/ Meld] a visual diff and merge tool.
  
 
== RapidSVN, Gforge & passwords  ==
 
== RapidSVN, Gforge & passwords  ==
  
'''Problem:''' RapidSVN doesn't directly support svn over ssh and so doesn't remember ssh passwords. And gforge.ucd.ie appares not to support passwordless authentication with publickey.   
+
'''Problem:''' RapidSVN doesn't directly support svn over ssh and so doesn't remember ssh passwords. And &nbsp;<strike>gforge.ucd.ie appares not to support passwordless authentication with publickey</strike>. There was a bug in the cron job that updated the keys.<strike></strike>
 +
 
 +
'''Solution:''' &nbsp; ssh gforge.ucd.ie
 +
 
 +
&nbsp; chmod 700 .ssh
 +
 
 +
And add your key (.ssh/id_rsa.pub) to http://gforge.ucd.ie/
 +
 
 +
(and wait for cron job to add it, or do it manually)
 +
 
 +
<strike>'''Solution:''' Use sshpass to remember password.</strike>
  
'''Solution:''' Use sshpass to remember password.  
+
<strike>Note: this method involves having your gforge password in plain text, and so is a potential security risk - it should be different to other passwords etc.</strike>
  
Note: this method involves having your gforge password in plain text, and so is a potential security risk - it should be different to other passwords etc.  
+
<strike>Install sshpass &gt;=1.05 (note ubuntu 11.10 usese version 1.04 which just hangs - so install from sources or Ubuntu 12.4)</strike>
  
Install sshpass &gt;=1.05 (note current ubuntu usese version 1.04 which just hangs - so install from sources or Ubuntu 12.4)
+
<strike>edit ~/.subversion/config, in&nbsp;[tunnels] section add the line:</strike>
  
edit ~/.subversion/config, in&nbsp;[tunnels] section add the line:<br>  
+
<strike>gforge = sshpass -f{path to file holding password} ssh -o PubkeyAuthentication=no -o ControlMaster=no
 +
</strike>
  
&nbsp;gforge = sshpass -f{path to file holding password} ssh -o PubkeyAuthentication=no -o ControlMaster=no
+
<strike>Then check out with:</strike>
  
<br>  
+
<strike>svn checkout svn+gforge://&lt;user&gt;@gforge.ucd.ie/var/lib/gforge/chroot/scmrepos/svn/fupermod/trunk fupermod
 +
</strike>
  
Then check out with:  
+
<strike>(where previously it was:&nbsp;svn checkout svn+ssh)</strike>
  
&nbsp;svn checkout svn+gforge://&lt;user&gt;@gforge.ucd.ie/var/lib/gforge/chroot/scmrepos/svn/fupermod/trunk fupermod
+
<strike>To change an existing working copy</strike>
  
(where previously it was:&nbsp;svn checkout svn+ssh)
+
<strike>svn switch --relocate svn+ssh://&lt;user&gt;@gforge.ucd.ie/&lt;old url&gt; svn+gforge://&lt;user&gt;@gforge.ucd.ie/&lt;new url&gt;</strike>

Latest revision as of 16:27, 1 November 2012

http://svnbook.red-bean.com/

  • Subversion clients work with .svn directories - don't remove them.
  • Mind the version of the client (currently, 1.5, 1.6).

Repositories

To submit

  • Software sources: models, code, resource files
  • Documentation sources: texts, diagrams, data
  • Configuration files
  • Test sourses: code, input data

Not to submit

  • Binaries: object files, libraries, executables
  • Built documentation: html, pdf
  • Personal settings: Eclipse projects, ...
  • Test output

Subversion for Users

A good cross platform client: RapidSVN, combined with Meld a visual diff and merge tool.

RapidSVN, Gforge & passwords

Problem: RapidSVN doesn't directly support svn over ssh and so doesn't remember ssh passwords. And  gforge.ucd.ie appares not to support passwordless authentication with publickey. There was a bug in the cron job that updated the keys.

Solution:   ssh gforge.ucd.ie

  chmod 700 .ssh

And add your key (.ssh/id_rsa.pub) to http://gforge.ucd.ie/

(and wait for cron job to add it, or do it manually)

Solution: Use sshpass to remember password.

Note: this method involves having your gforge password in plain text, and so is a potential security risk - it should be different to other passwords etc.

Install sshpass >=1.05 (note ubuntu 11.10 usese version 1.04 which just hangs - so install from sources or Ubuntu 12.4)

edit ~/.subversion/config, in [tunnels] section add the line:

gforge = sshpass -f{path to file holding password} ssh -o PubkeyAuthentication=no -o ControlMaster=no 

Then check out with:

svn checkout svn+gforge://<user>@gforge.ucd.ie/var/lib/gforge/chroot/scmrepos/svn/fupermod/trunk fupermod 

(where previously it was: svn checkout svn+ssh)

To change an existing working copy

svn switch --relocate svn+ssh://<user>@gforge.ucd.ie/<old url> svn+gforge://<user>@gforge.ucd.ie/<new url>