The Dojo team uses Subversion for source control. Those familiar with CVS will find the command line syntax for subversion to be very similar. Regardless, the following instructions are geared to those not familiar with CVS, or even source control in general.
Authoritative documentation on Subversion is available here.
Source control is one of those things that one rarely notices they need until it's far too late, usually when you accidentally delete part of your source tree instead of simply moving it to a different location, or when you make a set of complex changes that leave you worse off than were you started (but you can't go back). A source control system solves these problems by keeping copies of each revision of a set of files on a server, while giving you access to a local copy of those files to make changes on. Good source control systems allow multiple people to modify a single file at once, and will try to automatically merge changes between differing sets of modifications. A good source control system will also let you browse the history of a file or set of files (allowing you to "go back in time") and allow you to have acccess to your code from as many systems as you like. Subversion is one of those good source control systems.
Across the gamut of source control systems, there is quite a bit of confusing (and non-portable) nomenclature surrounding the common actions that you as a developer will preform with the source control system. We will use the terms here that are commonly accepted by CVS and Subversion users and administrators. So what are those terms?
Unlike some other source control systems, Subversion manages files on your disk without interjecting itself obtrusively into your workflow. You can change large sets of files
without worrying if anyone else is also modifying those files.
You may browser our subversion repository (http://svn.dojotoolkit.org/src/) directly using a web browser or browse using the Bug tracker.
The code is structured with each subproject (dojo, dijit, dojox, util) as a separate directory. Within each subproject you will find the "trunk" as well as "branches" and "tags". You may pull these subprojects separately, or use a special svn "view" which links the subprojects and checks them out with a single command.
Note that the "trunk" directory at the top-level is obsolete. This was used prior to the 0.9 release, when the code was reorganized into the various subprojects.
To do an anonymous, read-only checkout of the Dojo development trunk:
/* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter) */
.bash .imp {font-weight: bold; color: red;}
.bash .kw1 {color: #b1b100;}
.bash .kw3 {color: #000066;}
.bash .es0 {color: #000099; font-weight: bold;}
.bash .br0 {color: #66cc66;}
.bash .st0 {color: #ff0000;}
.bash .nu0 {color: #cc66cc;}
.bash .re0 {color: #0000ff;}
.bash .re1 {color: #0000ff;}
.bash .re2 {color: #0000ff;}
.bash .re3 {color: #808080; font-style: italic;}
.bash .re4 {color: #0000ff;}
svn co http://svn.dojotoolkit.org/src/view/anon/all/trunk dojotoolkit
Or, to pull a particular release, such as Dojo 1.0.2:
/* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter) */
.bash .imp {font-weight: bold; color: red;}
.bash .kw1 {color: #b1b100;}
.bash .kw3 {color: #000066;}
.bash .es0 {color: #000099; font-weight: bold;}
.bash .br0 {color: #66cc66;}
.bash .st0 {color: #ff0000;}
.bash .nu0 {color: #cc66cc;}
.bash .re0 {color: #0000ff;}
.bash .re1 {color: #0000ff;}
.bash .re2 {color: #0000ff;}
.bash .re3 {color: #808080; font-style: italic;}
.bash .re4 {color: #0000ff;}
svn co http://svn.dojotoolkit.org/src/tags/release-1.0.2 dojo102
Most Dojo development takes place on the trunk. Branches may be used for development of experimental features or for code migration before being merged back into the trunk. Branches are also used to stabilize major releases.
Anyone may access the Dojo Subversion server. Contributors are encouraged to access code directly from the repository and submit patches using the bug tracker. To submit changes, however, you must have committer status and have already received a system account from the administrator.
To access the repository as a committer, use this URL with subversion:
/* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter) */ .geshifilter {font-family: monospace;} .geshifilter .imp {font-weight: bold; color: red;} .geshifilter .kw1 {color: #b1b100;} .geshifilter .kw3 {color: #000066;} .geshifilter .es0 {color: #000099; font-weight: bold;} .geshifilter .br0 {color: #66cc66;} .geshifilter .st0 {color: #ff0000;} .geshifilter .nu0 {color: #cc66cc;} .geshifilter .re0 {color: #0000ff;} .geshifilter .re1 {color: #0000ff;} .geshifilter .re2 {color: #0000ff;} .geshifilter .re3 {color: #808080; font-style: italic;} .geshifilter .re4 {color: #0000ff;}If you use Eclipse, we recommend the Subclipse plugin. Simply provide a URL for the Dojo repository as discussed above.
To access our subversion repository on Windows, please install TortoiseSVN, available at: http://tortoisesvn.tigris.org/ Installing Tortoise requires a reboot since it installs itself as a Windows Explorer shell extension.
Welcome back! Now that you have rebooted, open up a Windows Explorer window (Win-E, or right-click on the "Start" menu and select "Explore"), navigate to whatever directory you would like your Dojo source code to be placed under. Create a new directory there titled "dojo", and then navigate to it.
Right-click in the directory and select "SVN Checkout..." from the context menu. In the resulting dialog box, you will be prompted for a URL for the repository you want to check out. In this dialog box, place the following URL:
Dojo development trunk
https://svn.dojotoolkit.org/src/view/committer/all/trunk dojotoolkit
Click "ok" in the dialog box if a dialog box comes up discussing a host key. You will then be asked for your user login password at dojotoolkit.org. Provide it. You will then see a list of files being retreived from the server, and when it's finished, you will have your very own checkout!
Next, take a minute to update your svn config settings.
You can then check in your changes by right-clicking on the file(s) you want to check in, selecting providing a checkin comment (strongly encouraged). Other operations, including diffing and merging are also available from the context menu.
For more information about TortiseSVN or how to use it, see the documentation at:
http://tortoisesvn.tigris.org/docs/TortoiseSVN_en/index.html
Since you're running Linux, it is assumed that you're comfy with your systems package management system and the command line.
Making a checkout is straightforward from the command line. Provided you already have Subversion installed, simply run:
Dojo development trunk
/* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter) */
.geshifilter {font-family: monospace;}
.geshifilter .imp {font-weight: bold; color: red;}
.geshifilter .kw1 {color: #b1b100;}
.geshifilter .kw3 {color: #000066;}
.geshifilter .es0 {color: #000099; font-weight: bold;}
.geshifilter .br0 {color: #66cc66;}
.geshifilter .st0 {color: #ff0000;}
.geshifilter .nu0 {color: #cc66cc;}
.geshifilter .re0 {color: #0000ff;}
.geshifilter .re1 {color: #0000ff;}
.geshifilter .re2 {color: #0000ff;}
.geshifilter .re3 {color: #808080; font-style: italic;}
.geshifilter .re4 {color: #0000ff;}
Next, take a minute to update your svn config settings.
This will create a local copy ("checkout") of the source tree (under a new directory called "dojotoolkit") in the current directory. Make edits to the files you want to change, then commit them back to the repository with:
/* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter) */ .bash .imp {font-weight: bold; color: red;} .bash .kw1 {color: #b1b100;} .bash .kw3 {color: #000066;} .bash .es0 {color: #000099; font-weight: bold;} .bash .br0 {color: #66cc66;} .bash .st0 {color: #ff0000;} .bash .nu0 {color: #cc66cc;} .bash .re0 {color: #0000ff;} .bash .re1 {color: #0000ff;} .bash .re2 {color: #0000ff;} .bash .re3 {color: #808080; font-style: italic;} .bash .re4 {color: #0000ff;}svn commit -m "Commit message here" names/of/files
We assume that you are on at least OS 10.3 (Panther).
You may need to install the Developer Tools package in order to get a the most up-to-date JDK (for running custom Dojo builds). It is assumed that operations will be preformed at the command line, and Project Builder/XCode configuration is not covered here. It is, however, recommended that you download the latest set of developer tools from http://connect.apple.com (free registration required).
Once you have the OS X developer tools installed, download the latest 1.x Subversion package (1.3 as of this writing) from:
http://metissian.com/projects/macosx/subversion/
The downloads are an OS X installer package. Install it, at which point the instructions from the Linux section will be sufficient to get you up and running.
Next, take a minute to update your svn config settings.
You'll need to add a couple config settings to your SVN config file. If you are on Windows, that's located at:
C:\Documents and Settings\YourUserName\Application Data\Subversion\configAnd on UNIX/Mac OS X:
~/.subversion/configOpen it up in your favorite text editor. Most configs have some default settings, so locate [miscellany] and enable-auto-props in the file. If they exist, make sure that they are uncommented (remove # from beginning of line), otherwise add them. They line should look like:
[miscellany] enable-auto-props = yes
Next, located [auto-props]. If it doesn't exist, add it, otherwise you'll probably have to uncomment it. Add the following entries below [auto-props]:
*.js = svn:eol-style=native *.htm = svn:eol-style=native *.html = svn:eol-style=native *.svg = svn:eol-style=native *.txt = svn:eol-style=native *.xml = svn:eol-style=native *.css = svn:eol-style=native *.rest = svn:eol-style=native Makefile = svn:eol-style=native README = svn:eol-style=native CHANGELOG = svn:eol-style=native LICENSE = svn:eol-style=native
Save that and you should be set! Continue on to committing directions above.