Downloads
release
dev builds
extras
themes
Documentation
manual
wiki
device status
Support
forums
mailing lists
IRC
Development
bugs
patches
dev guide
Search
Donate
Search
| Go
Wiki
>
Main
>
DocsIndex
>
UsingSVN
---+!! Accessing source code via Subversion (SVN) <font color="red" size="6">Rockbox no longer uses SVN for version control.</font> To check out and work on the source code, see UsingGit instead. %TOC% <br /> --- ---++Browsing the repository Just go <a href="http://svn.rockbox.org/viewvc.cgi/">here</a> <br /> --- ---++Downloading (checking out) the source You, obviously, need to have Subversion (SVN) installed to do this. The examples below use the 'trunk', since that is what most people are interested in. We find it useful to call the checked out trunk "rockbox", for convenience. <br /> --- ---++How to check out the source code <verbatim> svn co svn://svn.rockbox.org/rockbox/trunk rockbox </verbatim> If you would like to use older sources use the -r parameter replacing YYYY-MM-DD with the appropriate date: <verbatim> svn checkout svn://svn.rockbox.org/rockbox/trunk -r {YYYY-MM-DD} rockbox </verbatim> To check out a specific revision, use <verbatim> svn checkout svn://svn.rockbox.org/rockbox/trunk -r 12345 rockbox </verbatim> A "rockbox" directory will be created in your current directory, and all the directories and source files go there. <br /> --- ---++Checking in modifications SVN is a "no-reserve" version control system. This means that you work on your local files without first reserving them. Any conflicts with other developers are detected when you check-in, or "commit" as it's called in SVN. <verbatim> svn commit <filename> </verbatim> If this is the first commit from the local directory you will be asked for a password for your local username, If it is asking for the password for the wrong account just hit enter and it will prompt for the correct username and password. This will start an editor and ask you to describe the changes you've made. If you want, you can use the -m command line option to specify the comment right there: <verbatim> svn commit -m "This is my change comment" <filename> </verbatim> Note: Before checking in modifications, test-build all targets (player, player-old, recorder, player-sim, recorder-sim) to make sure your changes don't break anything. If this is a fix for a bug in FlySpray use the tracker number in this format: FS#xxxx in the comment so that a link to the tracker is created on the RockBox home page. <br /> --- ---++Updating your repository Since several people commit to the repository, you will need to periodically synchronize your local files with the changes made by others. This operation is called "update": <verbatim> svn update </verbatim> <br /> --- ---++Adding a new file Adding a file is very simple: <verbatim> svn add <filename> </verbatim> When adding a new source file, remember to set the keywords property: <verbatim> svn pset svn:keywords "Author Date Id Revision" <filename> </verbatim> If you are adding a binary file, you need to set the mime-type property: <verbatim> svn propset svn:mime-type application/octet-stream <filename> </verbatim> These changes, like any other change, has to be committed before they will be visible on the server. Note: If your file was created in Windows it may have had the "executable" flag set by default, even if it's simply a text file (.c, .tex, etc). To fix this either do =chmod -x filename= before =svn add=, or =svn propdel svn:executable filename= afterwards. <br /> --- ---++Querying the status of your files Sometimes it is interesting to get a list of the status of your files versus those on the remote repository. This is called "status": <verbatim> svn status </verbatim> <br /> --- ---++Producing a diff of your changes If you want to see how your local files differ from the SVN repository, you can ask SVN to show you: <verbatim> svn diff [files(s)] </verbatim> See also WorkingWithPatches for related info on patches in the Rockbox project. <br /> --- ---++Reverting changes To revert changes in your local SVN checkout use (from the source root): <verbatim> svn revert -R . (don't forget the period!) </verbatim> To go back to a specific revision, use: <verbatim> svn update -r 12345 </verbatim> *Note* this will not remove files you have added but only restore files that are in the SVN repository. <br /> --- ---++What happens in the repository? Subscribe to the rockbox-cvs list to get mails sent to you for every commit done to the repository. [[http://cool.haxx.se/mailman/listinfo/rockbox-cvs][subscribe to rockbox-cvs]] *Note* that this may cause quite a few mails to get sent during periods of intense development. <br /> --- ---++Learning more about SVN If you want more detailed and comprehensive information about Subversion, you can read the online version of [[http://svnbook.red-bean.com/][Version Control with Subversion]], a free book about SVN. <br /> --- ---++ Tagging releases Whenever a binary is released from code in SVN, it should be tagged by issuing a command similar to the following: <verbatim> svn copy svn://svn.rockbox.org/rockbox/trunk \ svn://svn.rockbox.org/rockbox/tags/bootloader_e200_v2 \ -m 'Tag release v2 of the Sansa E200 bootloader and sansapatcher' </verbatim> More information about tagging in SVN can be found at http://svnbook.red-bean.com/en/1.4/svn.branchmerge.tags.html and the Rockbox tags can be browsed at http://svn.rockbox.org/viewvc.cgi/tags/ <br /> --- ---++ Reverting a commit In the event that the last check in needs to be reverted the following steps can be followed (assuming that you are starting at revision 19094): <verbatim> svn diff -r 19093 > patch.diff patch -p0 -R < patch.diff svn commit </verbatim> ---
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r35
<
r34
<
r33
<
r32
|
B
acklinks
|
V
iew topic
|
M
ore topic actions
r35 - 09 Jan 2012 - 21:35:42 -
TorneWuff
Parents:
DocsIndex
Copyright © by the contributing authors.