Difference between revisions of "Subversion Setup"

From PCGen
Jump to: navigation, search
(Added GNU/Linux details, reorganised the page a bit)
 
(15 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
   |}
 
   |}
  
==Introduction==
+
=Introduction=
  
 
Subversion is used as the version control system for the sources of the project — it holds all of the program source code and data that make up PCGen. It allows us to track changes in the various files, share our work with each other and to coordinate our activity in a single location.
 
Subversion is used as the version control system for the sources of the project — it holds all of the program source code and data that make up PCGen. It allows us to track changes in the various files, share our work with each other and to coordinate our activity in a single location.
Line 9: Line 9:
 
Developers use a subversion client to download the sources (called checkout) and update the sources with changes (called commit). The [http://subversion.apache.org/ official site] propose binaries or links to them for many operating systems. Most GNU/Linux distributions propose it as a package; in Debian it is the <a href="apt:subversion>subversion package</a>. One commonly used Windows subversion client, [[#TortoiseSVN|TortoiseSVN]], is described below. Most integrated development environments (IDEs) include Subversion support. In the case of [[Eclipse]], it is by using the the [http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA subclipse] plugin.
 
Developers use a subversion client to download the sources (called checkout) and update the sources with changes (called commit). The [http://subversion.apache.org/ official site] propose binaries or links to them for many operating systems. Most GNU/Linux distributions propose it as a package; in Debian it is the <a href="apt:subversion>subversion package</a>. One commonly used Windows subversion client, [[#TortoiseSVN|TortoiseSVN]], is described below. Most integrated development environments (IDEs) include Subversion support. In the case of [[Eclipse]], it is by using the the [http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA subclipse] plugin.
  
=NEW Update with SF Upgrade=
+
'''Updated Late 2012'''
  
On Beta projects (versus Classic projects), Sourceforge seems to be encouraging the use of svn+ssh rather than https. It seems that using http is still possible with Beta projects, maybe limited to read only access.
+
We've upgrade our SF Project to the SF Beta. In order to continue using the same tools and functionality we need everyone to switch to the SVN+SSH method. To facilitate that, we have updated the information on this page to provide the appropriate instructions.
 
+
The command to get the trunk and put it in the pcgen-trunk directory is:
+
svn checkout https://svn.code.sf.net/p/pcgen/code/Trunk pcgen-trunk
+
  
 
==SVN+SSH Access==
 
==SVN+SSH Access==
  
 
It is possible to use SSH to get the repository simply with read only access. The command to get the trunk is:
 
It is possible to use SSH to get the repository simply with read only access. The command to get the trunk is:
  svn checkout svn://svn.code.sf.net/p/pcgen/code/Trunk pcgen-trunk
+
  <nowiki>svn checkout svn://svn.code.sf.net/p/pcgen/code/Trunk pcgen-trunk</nowiki>
 +
 
 +
Or for people that use a GUI interface the URL for that is:
 +
<nowiki>svn://svn.code.sf.net/p/pcgen/code/Trunk</nowiki>
  
 
To get a read/write access, the command, where USERNAME has to be changed to your Sourceforge account id is:
 
To get a read/write access, the command, where USERNAME has to be changed to your Sourceforge account id is:
  svn checkout --username=USERNAME svn+ssh://USERNAME@svn.code.sf.net/p/pcgen/code/Trunk pcgen-trunk
+
  <nowiki>svn checkout --username=USERNAME svn+ssh://USERNAME@svn.code.sf.net/p/pcgen/code/Trunk pcgen-trunk</nowiki>
 +
 
 +
or for the people thatuse a GUI client, the URL for checkout is:
 +
<nowiki>svn+ssh://USERNAME@svn.code.sf.net/p/pcgen/code/Trunk</nowiki>
  
 
It will be asking your Sourceforge password.
 
It will be asking your Sourceforge password.
Line 31: Line 34:
 
===On Windows===
 
===On Windows===
  
'''Install PuttyGen'''
+
====Install PuttyGen====
  
 
puttygen.exe - http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe
 
puttygen.exe - http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe
  
 +
====Generate a SSH Key (file ends with .ppk)====
  
'''Generate a SSH Key (file ends with .ppk)'''
+
* Run puttygen
 
+
* run puttygen
+
 
* Generate a New Key - SSH2
 
* Generate a New Key - SSH2
 
* IN the comment section add 'sourceforgeUserId@shell.sourceforge.net'
 
* IN the comment section add 'sourceforgeUserId@shell.sourceforge.net'
 
* OPTIONAL - You may set a passphrase, SF recommends it.
 
* OPTIONAL - You may set a passphrase, SF recommends it.
* click the Save private key button
+
* Click the Save private key button
* enter a filename for your new .ppk file when prompted
+
* Enter a filename for your new .ppk file when prompted
* press Save
+
* Press Save
 
* Copy the Public Key Information
 
* Copy the Public Key Information
 
* Go to your SF Developer Account Services
 
* Go to your SF Developer Account Services
Line 50: Line 52:
 
* Paste your Public Key here
 
* Paste your Public Key here
  
 +
I prefer tortoisePlink as it doesn't pop up a command window and is so much easier to deal with. This ALSO works with any IDE you have set up, such as Eclipse.
  
'''Install Pageant'''
+
====Standalone TortoiseSVN Setup====
  
pageant.exe - http://the.earth.li/~sgtatham/putty/latest/x86/pageant.exe
+
''This method does not require PLINK.exe or PAGEANT and works without the fancy set up:''
  
 +
* Step 1: Install TortoiseSVN
 +
* Step 2: Open the TortoiseSVN Settings
 +
* Step 3: Under General Tab in the window is a 'Subversion Configuration File' with an 'Edit' button next to it. CLICK the EDIT Button
 +
* Step 4: Scroll down to 'TUNNELS'
 +
* Step 5: Enter This:
  
'''Run the ageant'''
+
  ssh = $SVN_SSH "drive/path/to/TortoisePlink.exe" -i "drive/path/to/yourprivatekey.ppk"
  
* double-click on pageant.exe
+
On mine it looks like:
* you should now see a computer with a black hat in the tray
+
* Add your .ppk to the ageant
+
  
* right-click on the computer with the black hat in your taskbar
+
  ssh = $SVN_SSH "d:/Program Files/TortoiseSVN/bin/TortoisePlink.exe" -i "D:/My Documents/prvtKey.ppk"
* select Add Key from the context menu
+
* browse to your recently-created .ppk file and select it
+
* click Open
+
* enter your password when prompted (If you set the Passphrase earlier in this set up for your key, this is what it is asking for)
+
* verify that your key has been added by double-clicking on the computer with the black hat
+
  
If you don't want to repeat this procedure after every reboot of your client, you should place Pageant in the auto-start group of your Windows installation. You can append the keys with complete paths as command line arguments to Pageant.exe.
+
'''Do NOT place any entry in your TortoiseSVN for SSH Client under NETWORK or it will bypass the configuration file.'''
  
'''Install Plink'''
+
If you have already created the key and placed a copy on Sourceforge you should be able to connect without entering any passwords.
  
plink.exe - http://the.earth.li/~sgtatham/putty/latest/x86/plink.exe
+
====TortoiseSVN Setup for Plink (or Pagent)====
  
 +
====Install Plink=====
  
'''Install TortoiseSVN'''
+
plink.exe - http://the.earth.li/~sgtatham/putty/latest/x86/plink.exe
 +
 
 +
=====Install TortoiseSVN=====
  
 
TortoiseSVN download page
 
TortoiseSVN download page
  
 
+
=====Configure TortoiseSVN=====
'''Configure TortoiseSVN'''
+
  
 
You need to tell TortoiseSVN to use TortoisePlink to handle SSH traffic. To do this see the following steps:
 
You need to tell TortoiseSVN to use TortoisePlink to handle SSH traffic. To do this see the following steps:
  
* right-click on an explorer window somewhere
+
* Right-click on an explorer window somewhere
* hover over TortoiseSVN in the context menu
+
* Hover over TortoiseSVN in the context menu
* select Settings from the sub-menu
+
* Select Settings from the sub-menu
* select Network from the list on the left
+
* Select Network from the list on the left
* under the SSH box in the right side, click the Browse... button
+
* Under the SSH box in the right side, click the Browse... button
* browse to and select TortoisePlink.exe (mine is in c:\Program Files\TortoiseSVN\bin\TortoisePlink.exe)
+
* Browse to and select TortoisePlink.exe (mine is in c:\Program Files\TortoiseSVN\bin\TortoisePlink.exe)
* click Open
+
* Click '''Open'''
* click Apply
+
* Click '''Apply'''
 +
 
 +
=====Install Pageant=====
 +
 
 +
pageant.exe - http://the.earth.li/~sgtatham/putty/latest/x86/pageant.exe ''Optional''
 +
 
 +
* Run the ageant
 +
* Double-click on pageant.exe
 +
* You should now see a computer with a black hat in the tray
 +
* Add your .ppk to the ageant
 +
* Right-click on the computer with the black hat in your taskbar
 +
* Select Add Key from the context menu
 +
* Browse to your recently-created .ppk file and select it
 +
* Click Open
 +
* Enter your password when prompted (If you set the Passphrase earlier in this set up for your key, this is what it is asking for)
 +
* Verify that your key has been added by double-clicking on the computer with the black hat
 +
 
 +
If you don't want to repeat this procedure after every reboot of your client, you should place Pageant in the auto-start group of your Windows installation. You can append the keys with complete paths as command line arguments to Pageant.exe.
  
 
===On GNU/Linux===
 
===On GNU/Linux===
Line 114: Line 134:
 
===On Mac OS X===
 
===On Mac OS X===
  
[http://developer.apple.com/library/mac/#documentation/MacOSXServer/Conceptual/XServer_ProgrammingGuide/Articles/SSH.html Apple Developer SSH Page]
+
[http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/10.6/man1/ssh-keygen.1.html Mac OSX SSH Manual Page]
  
 
+
==Related Articles==
=Related Articles=
+
  
 
* Macintosh instructions can be found at [[SVN on the Mac]]
 
* Macintosh instructions can be found at [[SVN on the Mac]]
Line 124: Line 143:
 
* [[Basic Developer Setup#Setting up with Eclipse|Setting up with Eclipse]]
 
* [[Basic Developer Setup#Setting up with Eclipse|Setting up with Eclipse]]
  
= Using SVN =
+
== Using SVN ==
  
 
The Subversion command line client is not terribly hard to use either, especially if you are familiar with CVS. You can download [http://subversion.tigris.org/project_packages.html binaries] for various platforms, including Windows.
 
The Subversion command line client is not terribly hard to use either, especially if you are familiar with CVS. You can download [http://subversion.tigris.org/project_packages.html binaries] for various platforms, including Windows.
Line 130: Line 149:
 
Note the section on that page that says that the Subversion development team does *not* directly support these binaries. They mean it. However, questions about these posted to the [http://subversion.tigris.org/servlets/ProjectMailingListList Subversion users mailing list] are usually answered pretty quickly.
 
Note the section on that page that says that the Subversion development team does *not* directly support these binaries. They mean it. However, questions about these posted to the [http://subversion.tigris.org/servlets/ProjectMailingListList Subversion users mailing list] are usually answered pretty quickly.
  
 
+
===TortoiseSVN===
==TortoiseSVN==
+
  
 
TSVN is a GUI client for Subversion repositories. Before installing TSVN, please note that it is a Windows Explorer Shell extension, and as such, will not work on any other operating system.
 
TSVN is a GUI client for Subversion repositories. Before installing TSVN, please note that it is a Windows Explorer Shell extension, and as such, will not work on any other operating system.
Line 149: Line 167:
 
See the TSVN user's [http://tortoisesvn.tigris.org/list_etiquette.html mailing list information page] to subscribe to the mailing list. There are bunches of knowledgeable people there to help with virtually any problem you might have. Please make sure you follow proper nettiquette on this list, and research any questions you might have before posting something as a bug.
 
See the TSVN user's [http://tortoisesvn.tigris.org/list_etiquette.html mailing list information page] to subscribe to the mailing list. There are bunches of knowledgeable people there to help with virtually any problem you might have. Please make sure you follow proper nettiquette on this list, and research any questions you might have before posting something as a bug.
  
==RapidSVN==
+
===RapidSVN===
  
 
If you are using an operating system other than Windows, and you want a GUI client, there is a cross platform GUI client called [http://rapidsvn.tigris.org/ RapidSVN], but I have no experience, good or bad, with that program.
 
If you are using an operating system other than Windows, and you want a GUI client, there is a cross platform GUI client called [http://rapidsvn.tigris.org/ RapidSVN], but I have no experience, good or bad, with that program.
  
== Subclipse ==
+
=== Subclipse ===
  
 
There is also an [http://subclipse.tigris.org/ Eclipse plug-in] that is highly thought of, see [[Basic Developer Setup]] for details.
 
There is also an [http://subclipse.tigris.org/ Eclipse plug-in] that is highly thought of, see [[Basic Developer Setup]] for details.
 +
 +
 +
==GIT==
 +
Future home of GIT set
 +
 +
* NOTE: We host our REPO for GIT access on www.github.com

Latest revision as of 21:24, 1 June 2013

Introduction

Subversion is used as the version control system for the sources of the project — it holds all of the program source code and data that make up PCGen. It allows us to track changes in the various files, share our work with each other and to coordinate our activity in a single location.

Developers use a subversion client to download the sources (called checkout) and update the sources with changes (called commit). The official site propose binaries or links to them for many operating systems. Most GNU/Linux distributions propose it as a package; in Debian it is the <a href="apt:subversion>subversion package</a>. One commonly used Windows subversion client, TortoiseSVN, is described below. Most integrated development environments (IDEs) include Subversion support. In the case of Eclipse, it is by using the the subclipse plugin.

Updated Late 2012

We've upgrade our SF Project to the SF Beta. In order to continue using the same tools and functionality we need everyone to switch to the SVN+SSH method. To facilitate that, we have updated the information on this page to provide the appropriate instructions.

SVN+SSH Access

It is possible to use SSH to get the repository simply with read only access. The command to get the trunk is:

svn checkout svn://svn.code.sf.net/p/pcgen/code/Trunk pcgen-trunk

Or for people that use a GUI interface the URL for that is:

svn://svn.code.sf.net/p/pcgen/code/Trunk

To get a read/write access, the command, where USERNAME has to be changed to your Sourceforge account id is:

svn checkout --username=USERNAME svn+ssh://USERNAME@svn.code.sf.net/p/pcgen/code/Trunk pcgen-trunk

or for the people thatuse a GUI client, the URL for checkout is:

svn+ssh://USERNAME@svn.code.sf.net/p/pcgen/code/Trunk

It will be asking your Sourceforge password.

It is also possible to use a SSH key to avoid sending your encrypted password over the network. It is more secure, because to access PCGen repository, they need a file on your computer, not just your password. If the SSH key file is protected by a password, the protection is more improved. The following paragraphs describe the procedure needed in order to use the key file.

On Windows

Install PuttyGen

puttygen.exe - http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe

Generate a SSH Key (file ends with .ppk)

  • Run puttygen
  • Generate a New Key - SSH2
  • IN the comment section add 'sourceforgeUserId@shell.sourceforge.net'
  • OPTIONAL - You may set a passphrase, SF recommends it.
  • Click the Save private key button
  • Enter a filename for your new .ppk file when prompted
  • Press Save
  • Copy the Public Key Information
  • Go to your SF Developer Account Services
  • Edit Keys
  • Paste your Public Key here

I prefer tortoisePlink as it doesn't pop up a command window and is so much easier to deal with. This ALSO works with any IDE you have set up, such as Eclipse.

Standalone TortoiseSVN Setup

This method does not require PLINK.exe or PAGEANT and works without the fancy set up:

  • Step 1: Install TortoiseSVN
  • Step 2: Open the TortoiseSVN Settings
  • Step 3: Under General Tab in the window is a 'Subversion Configuration File' with an 'Edit' button next to it. CLICK the EDIT Button
  • Step 4: Scroll down to 'TUNNELS'
  • Step 5: Enter This:
  ssh = $SVN_SSH "drive/path/to/TortoisePlink.exe" -i "drive/path/to/yourprivatekey.ppk"

On mine it looks like:

  ssh = $SVN_SSH "d:/Program Files/TortoiseSVN/bin/TortoisePlink.exe" -i "D:/My Documents/prvtKey.ppk"

Do NOT place any entry in your TortoiseSVN for SSH Client under NETWORK or it will bypass the configuration file.

If you have already created the key and placed a copy on Sourceforge you should be able to connect without entering any passwords.

TortoiseSVN Setup for Plink (or Pagent)

Install Plink=

plink.exe - http://the.earth.li/~sgtatham/putty/latest/x86/plink.exe

Install TortoiseSVN

TortoiseSVN download page

Configure TortoiseSVN

You need to tell TortoiseSVN to use TortoisePlink to handle SSH traffic. To do this see the following steps:

  • Right-click on an explorer window somewhere
  • Hover over TortoiseSVN in the context menu
  • Select Settings from the sub-menu
  • Select Network from the list on the left
  • Under the SSH box in the right side, click the Browse... button
  • Browse to and select TortoisePlink.exe (mine is in c:\Program Files\TortoiseSVN\bin\TortoisePlink.exe)
  • Click Open
  • Click Apply
Install Pageant

pageant.exe - http://the.earth.li/~sgtatham/putty/latest/x86/pageant.exe Optional

  • Run the ageant
  • Double-click on pageant.exe
  • You should now see a computer with a black hat in the tray
  • Add your .ppk to the ageant
  • Right-click on the computer with the black hat in your taskbar
  • Select Add Key from the context menu
  • Browse to your recently-created .ppk file and select it
  • Click Open
  • Enter your password when prompted (If you set the Passphrase earlier in this set up for your key, this is what it is asking for)
  • Verify that your key has been added by double-clicking on the computer with the black hat

If you don't want to repeat this procedure after every reboot of your client, you should place Pageant in the auto-start group of your Windows installation. You can append the keys with complete paths as command line arguments to Pageant.exe.

On GNU/Linux

On top of subversion client, an ssh client is needed. OpenSSH is included in most distributions, on Debian, the package is openssh-client.

If you don’t have a key yet, create one with:

ssh-keygen

It will ask you where to store it (default is fine), and an eventual password. The public and private key will then be generated.

This command is used to copy the public key to an SSH server (in the case of the default location to store the key):

ssh-copy-id USERNAME@svn.code.sf.net

Then you can use this command to grab the project:

svn checkout --username=USERNAME svn+ssh://USERNAME@svn.code.sf.net/p/pcgen/code/Trunk pcgen-trunk

In my case, my password to the id key was asked then my Sourceforge account key was asked.

To be Done: testing commits with this configuration.

On Mac OS X

Mac OSX SSH Manual Page

Related Articles

Using SVN

The Subversion command line client is not terribly hard to use either, especially if you are familiar with CVS. You can download binaries for various platforms, including Windows.

Note the section on that page that says that the Subversion development team does *not* directly support these binaries. They mean it. However, questions about these posted to the Subversion users mailing list are usually answered pretty quickly.

TortoiseSVN

TSVN is a GUI client for Subversion repositories. Before installing TSVN, please note that it is a Windows Explorer Shell extension, and as such, will not work on any other operating system.

Make sure you have version 3.0 or later of the Windows Installer. This should be included in Windows Update for both Windows XP and Windows 2000. If for some reason you are still stuck on Windows 2000 (or earlier!), and can't update to the latest Service Pack, you are out of luck. I don't know if TSVN will work on Windows NT or Windows 98.

  1. Close down all applications that might be running.
  2. Download the TortoiseSVN Program and the manual.
  3. Run the MSI.
  4. Restart your computer.
  5. Make sure you actually restarted your machine, not just logged off. TSVN is a shell extension, which means that you *must* restart your machine after installing.

After you've installed TSVN, your Windows Explorer right-click context menus will all have a new entry called "Tortoise SVN". Click this new entry to see the options available. Exactly how you will connect to a repository depends on how SourceForge has Subversion set up. I'll update this entry with more information when it becomes available.

TSVN uses it's own SSH client, based on PuTTY, so you don't have to have it installed separately. The first time you attempt to browse a repository or do a check out, it will ask you for your credentials. You have the option of saving those credentials for future sessions as well.

See the TSVN user's mailing list information page to subscribe to the mailing list. There are bunches of knowledgeable people there to help with virtually any problem you might have. Please make sure you follow proper nettiquette on this list, and research any questions you might have before posting something as a bug.

RapidSVN

If you are using an operating system other than Windows, and you want a GUI client, there is a cross platform GUI client called RapidSVN, but I have no experience, good or bad, with that program.

Subclipse

There is also an Eclipse plug-in that is highly thought of, see Basic Developer Setup for details.


GIT

Future home of GIT set

  • NOTE: We host our REPO for GIT access on www.github.com