📄 get the code from subversion the dojo toolkit.mht
字号:
someone else's code. Changes can then be "merged" back back to the =
main line=20
when the developer thinks they are stable.=20
<LI><B>Merge</B>: merging is the process of taking several versions of =
a=20
single file and turning them into one authoritative version. Merging =
in is=20
often an automated process with Subversion, but you may at times be =
called=20
upon to merge a set of files manually (when the server cannot =
automatically=20
take care of it). </LI></UL>
<P>Unlike some other source control systems, Subversion manages files on =
your=20
disk without interjecting itself obtrusively into your workflow. You can =
change=20
large sets of files <BR>without worrying if anyone else is also =
modifying those=20
files. </P>
<H3>Getting Access </H3>
<P>In order to access the Dojo Subversion server, you must have already =
received=20
a system account from the administrator. If you have not done this yet, =
please=20
contact Alex Russell <alex@dojotoolkit.org>. Once your system =
account is=20
created, please test your account by logging in over SSH. The Dojo team =
uses SSH=20
(the Secure Shell) to encrypt access to our source control system =
because=20
Unsecure Network Logins Suck (TM). </P>
<H3>Anonymous Access </H3>
<P>To anonymously access our subversion repository you can use a web =
browser (<A=20
href=3D"http://svn.dojotoolkit.org/dojo/trunk/">http://svn.dojotoolkit.or=
g/dojo/trunk/</A>).=20
<BR>Or check out anonymously: </P>
<P><B>Dojo 0.4 branch</B><BR>svn co <A=20
title=3Dhttp://svn.dojotoolkit.org/dojo/branches/0.4=20
href=3D"http://svn.dojotoolkit.org/dojo/branches/0.4">http://svn.dojotool=
kit.org/dojo/branches/0.4</A>=20
dojo04 </P>
<P><B>Dojo 0.9+</B><BR>svn co <A=20
title=3Dhttp://svn.dojotoolkit.org/dojo/view/anon/all/trunk=20
href=3D"http://svn.dojotoolkit.org/dojo/view/anon/all/trunk">http://svn.d=
ojotoolkit.org/dojo/view/anon/all/trunk</A>=20
dojo09 </P>
<H3>Setup for Windows </H3>
<P>If you use Eclipse, then perhaps use the subclipse plugin (I have =
heard it is=20
better than <A href=3D"wiki:TortoiseSVN">TortoiseSVN</A>). </P>
<P>To access our subversion repository on Windows, please install =
TortoiseSVN,=20
available at: <A=20
href=3D"http://tortoisesvn.tigris.org/">http://tortoisesvn.tigris.org/</A=
> </P>
<P>Installing Tortoise requires a reboot since it installs itself as a =
Windows=20
Explorer shell extension. </P>
<P>Welcome back! </P>
<P>Now that you have rebooted, open up a Windows Explorer window (Win-E, =
or=20
right-click on the "Start" menu and select "Explore"), navigate to =
whatever=20
directory you would like your Dojo source code to be placed under. =
Create a new=20
directory there titled "dojo", and then navigate to it. Once inside the=20
directory, right click on the emply file list and select=20
TortoiseSVN->Settings. In the resulting dialogue box, got to the =
"Network"=20
tab. </P>
<P>Using <A href=3D"wiki:TortoiseSVN">TortoiseSVN</A> with ssh is a =
right pain=20
because it repeatedly asks for the password again and again. If you can =
use an=20
anonymous checkout that may be better. </P>
<P>NOTE: in the latest version (1.3.3) leaving the ssh client field =
blank=20
worked, and setting it to <A =
href=3D"wiki:TortoisePlink">TortoisePlink</A>.exe=20
didn't (Even in double quotes). Previously: As of version 1.1.x, you =
must=20
manually configure Tortoise to be aware of it's SSH client program, =
which is=20
usually located in: </P><JOT:VERBATIM>C:\Program=20
Files\TortoiseSVN\bin\TortoisePlink.exe </JOT:VERBATIM>
<P>Use the "Browse..." button at the bottom of the "Network" tab in =
order to=20
locate and select "TortoisePlink.exe". With that done, you can hit "OK" =
in the=20
configuration tab and return to the "dojo" directory we created earlier. =
</P>
<P>Right-click in the directory and select "SVN Checkout..." from the =
context=20
menu. In the resulting dialog box, you will be prompted for a URL for =
the=20
repository you want to check out. Subversion supports multiple access =
methods,=20
but we will use Subversion over SSH to get to our repo. In this dialog =
box,=20
place the following URL (replacing your unix system login for =
"username"):=20
<P><B>Dojo 0.4=20
branch</B><BR>svn+ssh://username@svn.dojotoolkit.org/var/src/dojo/branche=
s/0.4=20
</P>
<P><B>Dojo=20
0.9+</B><BR>svn+ssh://svn.dojotoolkit.org/var/src/dojo/view/committer/all=
/trunk=20
</P>
<P>For Dojo 0.9+, this works in Eclipse, and also in TortoiseSVN (see=20
below).</P>
<H3><I>TortoiseSVN and Dojo 0.9+</I></H3>
<P>Using TortoiseSVN under Windows, here's how to do it: </P>
<OL>
<LI>If you aren't using PuTTY, <A=20
=
href=3D"http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">=
go grab=20
it</A>.=20
<LI>Create a new session in PuTTY:=20
<OL style=3D"LIST-STYLE-TYPE: lower-alpha">
<LI>in the Host Name, type "username@dojotoolkit.org", where =
username is=20
your username.
<LI>check the SSH radio button; the port number should be 22.
<LI>In the saved sessions box, type "<A=20
href=3D"http://svn.dojotoolkit.org/">svn.dojotoolkit.org</A>" and =
save the=20
session.</LI></OL>
<LI>Create your checkout using that view url above. </LI></OL>
<P>The saved session in PuTTY will be picked up by Plink, and you'll be =
asked=20
for your password just like with a regular checkout. </P>
<P>Click "ok" in the dialog box if a dialog box comes up discussing a =
host key.=20
You will then be asked (two or three times) for your unix user login =
password at=20
dojotoolkit.org. Provide it. You will then see a list of files being =
retreived=20
from the server, and when it's finished, you will have your very own =
checkout!=20
</P>
<P>Next, take a minute to update your <A=20
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-4-meta-dojo/using-=
subversion#config">svn=20
config settings</A>. </P>
<P>You can then check in your changes by right-clicking on the file(s) =
you want=20
to check in, selecting providing a checkin comment (strongly =
encouraged). Other=20
operations, including diffing and merging are also available from the =
context=20
menu. </P>
<P>For more information about TortiseSVN or how to use it, see the =
documentation=20
at: </P>
<P><A=20
href=3D"http://tortoisesvn.tigris.org/docs/TortoiseSVN_en/index.html">htt=
p://tortoisesvn.tigris.org/docs/TortoiseSVN_en/index.html</A>=20
</P>
<H3>Setup for Linux </H3>
<P>Since you're running Linux, it is assumed that you're comfy with your =
systems=20
package management system and the command line. </P>
<P>Firstly, you will need to install an SSH client (preferably OpenSSH) =
and a=20
Subversion client library (through apt, yast, or whatever package =
management=20
system your system supports). </P>
<P>Making a checkout is straightforward from the command line. Provided =
you=20
already have Subversion installed, simply run:=20
<P><B>Dojo 0.4 branch</B><BR>svn co=20
svn+ssh://username@svn.dojotoolkit.org/var/src/dojo/branches/0.4 dojo04 =
</P>
<P><B>Dojo 0.9+</B><BR>svn co=20
svn+ssh://svn.dojotoolkit.org/var/src/dojo/view/committer/all/trunk =
dojo09 </P>
<P>Next, take a minute to update your <A=20
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-4-meta-dojo/using-=
subversion#config">svn=20
config settings</A>. </P>
<P>This will create a local copy ("checkout") of the source tree (under =
a new=20
directory called "dojo") in the current directory. Make edits to the =
files you=20
want to change, then commit them back to the repository with:=20
</P><JOT:VERBATIM>svn commit -m "Commit message here" names/of/files=20
</JOT:VERBATIM>
<H3>Setup for OS X </H3>
<P>We assume that you are on at least OS 10.3 (Panther). </P>
<P>Developers on OS X may already have an SSH client installed, but may =
need to=20
install the Developer Tools package in order to get the most up-to-date =
JDK and=20
Ant packages. It is assumed that operations will be preformed at the =
command=20
line, and Project Builder/XCode configuration is not covered here. It =
is,=20
however, recommended that you download the latest set of developer tools =
from <A=20
href=3D"http://connect.apple.com/">http://connect.apple.com/</A> (free=20
registration required). </P>
<P>Once you have the OS X developer tools installed, download the latest =
1.x=20
Subversion package (1.1.3 as of this writing) from: <BR><A=20
href=3D"http://metissian.com/projects/macosx/subversion/">http://metissia=
n.com/projects/macosx/subversion/</A>=20
</P>
<P>The downloads are an OS X installer package. Install it, at which =
point the=20
instructions from the Linux section will be sufficient to get you up and =
running. </P>
<P>Next, take a minute to update your <A=20
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-4-meta-dojo/using-=
subversion#config">svn=20
config settings</A>. </P>
<H3><A name=3Dconfig>SVN Config Settings</A>: </H3>
<P>You'll need to add a couple config settings to your SVN config file. =
If you=20
are on Windows, that's located at: </P><JOT:VERBATIM>C:\Documents and=20
Settings\YourUserName\Application Data\Subversion\config </JOT:VERBATIM>
<P>And on UNIX/Mac OS X: </P><JOT:VERBATIM>~/.subversion/config =
</JOT:VERBATIM>
<P>Open it up in your favorite text editor. Most configs have some =
default=20
settings, so locate <B>[miscellany]</B> and <B>enable-auto-props</B> in =
the=20
file. If they exist, make sure that they are uncommented (remove =
<B>#</B> from=20
beginning of line), otherwise add them. They line should look like:=20
</P><JOT:VERBATIM>[miscellany] enable-auto-props =3D yes </JOT:VERBATIM>
<P>Next, located <B>[auto-props]</B>. If it doesn't exist, add it, =
otherwise=20
you'll probably have to uncomment it. Add the following entries below=20
<B>[auto-props]</B>: </P>
<P>
<DIV class=3Dgeshifilter style=3D"FONT-FAMILY: monospace">*.<SPAN=20
class=3Dme1>js</SPAN> =3D svn:eol-style=3Dnative<BR>*.<SPAN =
class=3Dme1>htm</SPAN> =3D=20
svn:eol-style=3Dnative<BR>*.<SPAN class=3Dme1>html</SPAN> =3D=20
svn:eol-style=3Dnative<BR>*.<SPAN class=3Dme1>svg</SPAN> =3D=20
svn:eol-style=3Dnative<BR>*.<SPAN class=3Dme1>txt</SPAN> =3D=20
svn:eol-style=3Dnative<BR>*.<SPAN class=3Dme1>xml</SPAN> =3D=20
svn:eol-style=3Dnative<BR>*.<SPAN class=3Dme1>css</SPAN> =3D=20
svn:eol-style=3Dnative<BR>*.<SPAN class=3Dme1>rest</SPAN> =3D=20
svn:eol-style=3Dnative<BR>Makefile =3D svn:eol-style=3Dnative<BR>README =
=3D=20
svn:eol-style=3Dnative<BR>CHANGELOG =3D =
svn:eol-style=3Dnative<BR>LICENSE =3D=20
svn:eol-style=3Dnative</DIV>
<P></P>
<P>Save that and you should be set! Continue on to committing directions =
above.=20
</P>
<DIV class=3Dbook-navigation>
<DIV class=3D"page-links clear-block"><A class=3Dpage-previous=20
title=3D"Go to previous page"=20
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-4-meta-dojo-0">=E2=
=80=B9 Part 4:=20
Testing, Tuning and Debugging</A><A class=3Dpage-up title=3D"Go to =
parent page"=20
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-4-meta-dojo-0">up<=
/A><A=20
class=3Dpage-next title=3D"Go to next page"=20
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-4-meta-dojo/develo=
pment-tools">Development=20
Tools =E2=80=BA</A></DIV></DIV></DIV>
<DIV class=3Dlinks>
<UL class=3D"links inline">
<LI class=3D"first book_printer"><A class=3Dbook_printer=20
title=3D"Show a printer-friendly version of this book page and its =
sub-pages."=20
href=3D"http://dojotoolkit.org/book/export/html/2818">Printer-friendly =
version</A>=20
<LI class=3Dcomment_forbidden><SPAN class=3Dcomment_forbidden><A=20
=
href=3D"http://dojotoolkit.org/user/login?destination=3Dnode/2818%2523com=
ment-form">Login</A>=20
or <A=20
=
href=3D"http://dojotoolkit.org/user/register?destination=3Dnode/2818%2523=
comment-form">register</A>=20
to post comments</SPAN>=20
<LI class=3D"last subscriptions_del_node"><A =
class=3Dsubscriptions_del_node=20
title=3D"Stop receiving an e-mail whenever a new comment is posted to =
this Book page."=20
=
href=3D"http://dojotoolkit.org/subscriptions/del/node/2818">Unsubscribe =
post</A>=20
</LI></UL></DIV></DIV>
<DIV id=3Dcomments><A id=3Dcomment-9091></A>
<DIV class=3Dcomment>
<H3 class=3Dtitle><A class=3Dactive=20
href=3D"http://dojotoolkit.org/book/dojo-book-0-9/part-4-meta-dojo/using-=
subversion#comment-9091">but=20
beware the other documentation telling you how to do this.</A></H3>
<DIV class=3Dsubmitted>Submitted by dan90 on Tue, 11/20/2007 - =
01:10.</DIV>
<DIV class=3Dcontent>
<P>This isn't <EM>quite</EM> the right place to put this=20
double-documentation-error feedback comment, but a lowly new user like =
me can't=20
comment on every node type. I beg your tolerance.</P>
<P>This page and http://www.dojotoolkit.org/community/svn both lack =
something in the area of correct information about how to do anonymous =
checkouts=20
of the latest version of dojo.<BR><EM>This </EM>page simply doesn't =
mention dojo=20
1.0, which is obvious. so for the line about dojo 0.9+ above<BR>svn co =
<A=20
title=3Dhttp://svn.dojotoolkit.org/dojo/view/anon/all/trunk=20
href=3D"http://svn.dojotoolkit.org/dojo/view/anon/all/trunk">http://svn.d=
ojotoolkit.org/dojo/view/anon/all/trunk</A>=20
dojo09<BR>you might want to substitute<BR>svn co <A=20
title=3Dhttp://svn.dojotoolkit.org/dojo/branches/1.0/view/anon/all/trunk =
href=3D"http://svn.dojotoolkit.org/dojo/branches/1.0/view/anon/all/trunk"=
>http://svn.dojotoolkit.org/dojo/branches/1.0/view/anon/all/trunk</A>=20
dojo10<BR><EM>That</EM> page also has errors, where it is claimed that =
the=20
anonymous checkout URL is <A=20
title=3Dhttp://svn.dojotoolkit.org/dojo/branches/1.0/view/committer/all/t=
runk=20
href=3D"http://svn.dojotoolkit.org/dojo/branches/1.0/view/committer/all/t=
runk">http://svn.dojotoolkit.org/dojo/branches/1.0/view/committer/all/tru=
nk</A>=20
. Once again, you probably want to substitute <A=20
title=3Dhttp://svn.dojotoolkit.org/dojo/branches/1.0/view/anon/all/trunk =
href=3D"http://svn.dojotoolkit.org/dojo/branches/1.0/view/anon/all/trunk"=
>http://svn.dojotoolkit.org/dojo/branches/1.0/view/anon/all/trunk</A>=20
which seems to be the correct URL and it works very nicely thanks. and =
doesn't=20
throw confusing errors when you included dojo as an external, or ask you =
for=20
your SSH password.</P>
<P>And a final aside - I wanted to put those checkout lines in code =
formatting=20
blocks - but that's not working right now - the URL->link filter is =
before=20
the code formatting filter in the input format filters chain and it =
expands the=20
URL and looks very ugly. May i humbly submit that whomever is the admin =
of this=20
drupal install might have a quick look at the input filters =
ordering?</P>
<P>Good luck, my comrades in version control.</P></DIV>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -