Difference between revisions of "Subversion"

From GnuCash
Jump to: navigation, search
m (Reverted edit of Bganu, changed back to last version by Cstim)
Line 1: Line 1:
wow
+
=Repository URLs=
 +
The various base URLs look like:
  
will it take to fix this [[shit]]
+
  anonymous:  <nowiki>http://svn.gnucash.org/repo/gnucash/trunk</nowiki>
 +
  developer:  svn+ssh://username@svn.gnucash.org/repo/gnucash/trunk
 +
      trac:  http://svn.gnucash.org/trac
 +
 
 +
Note: if you are having problems with the http:// anonymous access, make sure your subversion is compiled with [http://www.webdav.org/neon/ neon] support.
 +
 
 +
=Common Commands=
 +
 
 +
To get what used to be CVS HEAD, you will need to get the svn TRUNK:
 +
 
 +
    svn checkout <nowiki>http://svn.gnucash.org/repo/gnucash/trunk</nowiki> gnucash
 +
 
 +
The argument "gnucash" above can be whatever you want your local directory to be called, and is optional. If you leave it out, you'll have a directory called "trunk" created containing all the source code.
 +
 
 +
If you want the latest 2.0.x code, you'd need to pull from the 2.0 branch, as follows:
 +
 
 +
    svn checkout <nowiki>http://svn.gnucash.org/repo/gnucash/branches/2.0</nowiki> gnucash-2.0
 +
 
 +
And if you want the released code for a specific release (or tag), you'd use:
 +
 
 +
    svn checkout <nowiki>http://svn.gnucash.org/repo/gnucash/tags/1.8.12</nowiki> gnucash-1.8.12
 +
 
 +
And to update, just cd into the directory containing the sources you want updated and execute a simple
 +
 
 +
    svn update
 +
 
 +
To switch a TRUNK working copy to the 2.0 branch, cd into the directory containing the sources you want updated and do this:
 +
 
 +
    svn switch <nowiki>http://svn.gnucash.org/repo/gnucash/branches/2.0</nowiki>
 +
 
 +
You probably want to continue reading at the [[Building]] page. Otherwise, continue on below for information on how to use subversion.
 +
 
 +
= SVN tutorial =
 +
 
 +
Now that the gnucash repository is using svn for version control (since 2005-11-04), the need for a quick tutorial on how to get the sources might be in order. There was some introduction about SVN in an [http://lists.gnucash.org/pipermail/gnucash-devel/2005-October/014333.html e-mail] on gnucash-devel:
 +
 
 +
The excellent "[http://svnbook.red-bean.com/ Version Control with Subversion] is a very good resource for information about subversion. 
 +
 
 +
Specifically, [http://svnbook.red-bean.com/en/1.1/ch03.html Chapter 3. Guided Tour]
 +
and [http://svnbook.red-bean.com/en/1.1/apa.html Appendix A. Subversion for CVS Users] are relevant.
 +
 
 +
The command-line client `<tt>svn</tt>` has a nice integrated help system; `<tt>svn help</tt>`
 +
will provide the top-level command list, and `<tt>svn help <command></tt>` detailed
 +
help for the specific command.
 +
 
 +
The bottom line is that getting the source via svn isn't altogether different from getting it using cvs.
 +
 
 +
=CVS to SVN cross reference=
 +
{| cellpadding="2" cellspacing="0" border="1"
 +
| *CVS command*
 +
| *SVN command*
 +
| *notes*
 +
|-
 +
| cvs checkout
 +
| svn checkout
 +
|
 +
|-
 +
| cvs commit
 +
| svn commit
 +
|
 +
|-
 +
| cvs status
 +
| svn status
 +
| ...but the svn one is actually useful :)
 +
|-
 +
| cvs log
 +
| svn log
 +
|
 +
|-
 +
| cvs annotate
 +
| svn blame
 +
|
 +
|-
 +
| cvs diff
 +
| svn diff
 +
|
 +
|-
 +
| cvs diff -D 2006-01-01
 +
| svn diff -r {2006-01-01}:HEAD
 +
|
 +
|-
 +
| cvs update
 +
| svn update, svn switch
 +
|
 +
|-
 +
| cvs update -C
 +
| svn revert
 +
|
 +
|-
 +
| cvs update -j [...]
 +
| svn merge
 +
|
 +
|-
 +
| <nowiki> ---- </nowiki>
 +
| svn resolved [conflicting merges must be explicitly resolved]
 +
|
 +
|-
 +
| cvs add
 +
| svn add, svn mkdir
 +
|
 +
|-
 +
| cvs remove
 +
| svn delete
 +
|
 +
|-
 +
|<nowiki>  ----  </nowiki>
 +
| svn move
 +
|
 +
|-
 +
| cvs [r]tag [-b]
 +
| svn copy
 +
|
 +
|}
 +
 
 +
 
 +
Enjoy!
 +
 
 +
=SVN write access=
 +
 
 +
FAQ: Is it possible to get SVN write access?
 +
 
 +
A: In principle yes, but we are quite conservative with giving out new SVN write accounts. For occasional changes people are encouraged to submit patches. We do add people as developers if they stick around, supply lots of patches, become highly involved in the project, hang out on IRC, and generally show some level of clue and prove some level of trust. But in the meantime, patches in email are the suggested route, as has been stated at other places. --[[User:Cstim|Cstim]] 08:00, 8 January 2006 (EST)

Revision as of 09:42, 16 February 2007

Repository URLs

The various base URLs look like:

 anonymous:  http://svn.gnucash.org/repo/gnucash/trunk
 developer:  svn+ssh://username@svn.gnucash.org/repo/gnucash/trunk
      trac:  http://svn.gnucash.org/trac

Note: if you are having problems with the http:// anonymous access, make sure your subversion is compiled with neon support.

Common Commands

To get what used to be CVS HEAD, you will need to get the svn TRUNK:

   svn checkout http://svn.gnucash.org/repo/gnucash/trunk gnucash

The argument "gnucash" above can be whatever you want your local directory to be called, and is optional. If you leave it out, you'll have a directory called "trunk" created containing all the source code.

If you want the latest 2.0.x code, you'd need to pull from the 2.0 branch, as follows:

   svn checkout http://svn.gnucash.org/repo/gnucash/branches/2.0 gnucash-2.0

And if you want the released code for a specific release (or tag), you'd use:

   svn checkout http://svn.gnucash.org/repo/gnucash/tags/1.8.12 gnucash-1.8.12

And to update, just cd into the directory containing the sources you want updated and execute a simple

   svn update

To switch a TRUNK working copy to the 2.0 branch, cd into the directory containing the sources you want updated and do this:

   svn switch http://svn.gnucash.org/repo/gnucash/branches/2.0

You probably want to continue reading at the Building page. Otherwise, continue on below for information on how to use subversion.

SVN tutorial

Now that the gnucash repository is using svn for version control (since 2005-11-04), the need for a quick tutorial on how to get the sources might be in order. There was some introduction about SVN in an e-mail on gnucash-devel:

The excellent "Version Control with Subversion is a very good resource for information about subversion.

Specifically, Chapter 3. Guided Tour and Appendix A. Subversion for CVS Users are relevant.

The command-line client `svn` has a nice integrated help system; `svn help` will provide the top-level command list, and `svn help <command>` detailed help for the specific command.

The bottom line is that getting the source via svn isn't altogether different from getting it using cvs.

CVS to SVN cross reference

*CVS command* *SVN command* *notes*
cvs checkout svn checkout
cvs commit svn commit
cvs status svn status ...but the svn one is actually useful :)
cvs log svn log
cvs annotate svn blame
cvs diff svn diff
cvs diff -D 2006-01-01 svn diff -r {2006-01-01}:HEAD
cvs update svn update, svn switch
cvs update -C svn revert
cvs update -j [...] svn merge
---- svn resolved [conflicting merges must be explicitly resolved]
cvs add svn add, svn mkdir
cvs remove svn delete
---- svn move
cvs [r]tag [-b] svn copy


Enjoy!

SVN write access

FAQ: Is it possible to get SVN write access?

A: In principle yes, but we are quite conservative with giving out new SVN write accounts. For occasional changes people are encouraged to submit patches. We do add people as developers if they stick around, supply lots of patches, become highly involved in the project, hang out on IRC, and generally show some level of clue and prove some level of trust. But in the meantime, patches in email are the suggested route, as has been stated at other places. --Cstim 08:00, 8 January 2006 (EST)