Project

General

Profile

UsingRepositories » History » Version 30

Laurenz Gamper, 02/12/2013 01:42 AM

1 7 Brian Nord
h1. SVN
2 7 Brian Nord
3 22 Laurenz Gamper
* [[UsingRepositories#svn_access|SVN Access]]
4 29 Laurenz Gamper
* [[UsingRepositories#kerberos_password|Kerberos Password]]
5 23 Laurenz Gamper
* [[UsingRepositories#svn_intro|SVN Introduction]]
6 23 Laurenz Gamper
* [[UsingRepositories#svn_checkout|SVN Checkout]]
7 23 Laurenz Gamper
* [[UsingRepositories#run_pipeline|Running the pipeline]]
8 20 Laurenz Gamper
9 20 Laurenz Gamper
10 23 Laurenz Gamper
11 20 Laurenz Gamper
h1(#svn_access). SVN Access
12 20 Laurenz Gamper
13 7 Brian Nord
To Access the DESpec SVN, you need:
14 7 Brian Nord
* a services account
15 7 Brian Nord
* to be a member of the subprojects of DESpec
16 7 Brian Nord
* a kerberos ticket
17 7 Brian Nord
* a svn client
18 29 Laurenz Gamper
19 29 Laurenz Gamper
h1(#kerberos_password). Kerberos Password
20 29 Laurenz Gamper
21 29 Laurenz Gamper
There are two different passwords for redmine and kerberos. At the beginning (when you register your account), they are the same. But when the redmine password gets changed, the kerberos password stays the same and vice versa.
22 29 Laurenz Gamper
If you haven't got the initial password any more and need to reset the kerberos password, you have to call the fermilab service desk so they reset the kerberos password. Link: https://fermi.service-now.com/fsc/
23 29 Laurenz Gamper
24 29 Laurenz Gamper
<pre>
25 30 Laurenz Gamper
$ kpasswd your-fnal-username
26 29 Laurenz Gamper
</pre>
27 7 Brian Nord
28 7 Brian Nord
h2. Recommended SVN Clients
29 7 Brian Nord
30 7 Brian Nord
* Windows: TortoiseSVN http://tortoisesvn.tigris.org/
31 7 Brian Nord
* Mac: Versions http://versionsapp.com/
32 7 Brian Nord
* command line
33 7 Brian Nord
34 7 Brian Nord
35 7 Brian Nord
h2. Services Account at Fermilab
36 7 Brian Nord
37 7 Brian Nord
How to get a services account:
38 7 Brian Nord
https://cdcvs.fnal.gov/redmine/projects/despec/wiki/DESpecwikiAccess
39 7 Brian Nord
40 7 Brian Nord
h2. Member of the Subprojects
41 7 Brian Nord
42 10 Laurenz Gamper
If you would like to have write access, email Brian or Laurenz, so we can add you to the DESpec project. If you don't need write access, look at the section Anonymous SVN.
43 7 Brian Nord
44 7 Brian Nord
h2. Kerberos
45 7 Brian Nord
46 14 Laurenz Gamper
h3. How to set up kerberos
47 14 Laurenz Gamper
48 14 Laurenz Gamper
<pre>
49 14 Laurenz Gamper
$ mv /etc/krb5.conf /etc/krb5.conf.bak
50 14 Laurenz Gamper
$ cd /etc
51 14 Laurenz Gamper
$ wget http://security.fnal.gov/krb5.conf
52 14 Laurenz Gamper
$ echo "host cdcvs.fnal.gov
53 14 Laurenz Gamper
   ForwardX11 = no
54 14 Laurenz Gamper
   GSSAPIAuthentication yes
55 14 Laurenz Gamper
   GSSAPIDelegateCredentials yes" >> ~/.ssh/config
56 14 Laurenz Gamper
$ kinit -f your-fnal-username
57 14 Laurenz Gamper
$ klist
58 14 Laurenz Gamper
</pre>
59 14 Laurenz Gamper
60 14 Laurenz Gamper
The final klist should show your kerberos ticket and the svn can be checked out now using the svn checkout command below.
61 14 Laurenz Gamper
62 15 Laurenz Gamper
63 15 Laurenz Gamper
h3. Links with further documentation
64 13 Laurenz Gamper
65 1 Brian Nord
http://www.fnal.gov/docs/strongauth/macadmin.html#55292
66 7 Brian Nord
http://kb.mit.edu/confluence/display/istcontrib/Acquiring+Kerberos+Tickets+in+Mac+OS+X+10.7+(Lion)+or+OS+X+10.8+(Mountain+Lion)
67 16 Laurenz Gamper
http://fermilinux.fnal.gov/documentation/security/kerberos-newer-linux/
68 1 Brian Nord
69 25 Laurenz Gamper
h1(#svn_intro). SVN Introduction
70 16 Laurenz Gamper
71 1 Brian Nord
http://svnbook.red-bean.com/en/1.7/svn.tour.cycle.html
72 16 Laurenz Gamper
73 25 Laurenz Gamper
h2. Adding a File
74 1 Brian Nord
75 25 Laurenz Gamper
Adding a file does not commit the file, use commit to upload the file.
76 25 Laurenz Gamper
<pre>
77 25 Laurenz Gamper
svn add your-file
78 25 Laurenz Gamper
</pre>
79 25 Laurenz Gamper
80 25 Laurenz Gamper
h2. Commit
81 25 Laurenz Gamper
82 20 Laurenz Gamper
One need not supply a URL for commit.  SVN automatically contacts external server
83 1 Brian Nord
<pre>
84 1 Brian Nord
svn commit -m "your message"  
85 1 Brian Nord
</pre>
86 25 Laurenz Gamper
87 25 Laurenz Gamper
h2. SVN Checking your changes
88 25 Laurenz Gamper
89 25 Laurenz Gamper
This presents a summary of the changes.
90 25 Laurenz Gamper
<pre>
91 25 Laurenz Gamper
svn status
92 25 Laurenz Gamper
</pre>
93 25 Laurenz Gamper
94 25 Laurenz Gamper
Which outputs something like
95 25 Laurenz Gamper
<pre>
96 27 Laurenz Gamper
$:~/src/despec/trunk/Wrapper$ svn status
97 25 Laurenz Gamper
M       run_pipeline.py
98 25 Laurenz Gamper
A       lsprofcalltree.py
99 25 Laurenz Gamper
C       glue.ini
100 25 Laurenz Gamper
?       glue.mine.ini
101 25 Laurenz Gamper
</pre>
102 25 Laurenz Gamper
103 25 Laurenz Gamper
You see the filenames and the flags at the beginning of the line. The flags mean:
104 25 Laurenz Gamper
<pre>
105 25 Laurenz Gamper
? item
106 25 Laurenz Gamper
The file, directory, or symbolic link item is not under version control.
107 25 Laurenz Gamper
108 25 Laurenz Gamper
A item
109 25 Laurenz Gamper
The file, directory, or symbolic link item has been scheduled for addition into the repository.
110 25 Laurenz Gamper
111 25 Laurenz Gamper
C item
112 25 Laurenz Gamper
The file item is in a state of conflict. That is, changes received from the server during an update overlap with local changes that you have in your working copy (and weren't resolved during the update). You must resolve this conflict before committing your changes to the repository.
113 25 Laurenz Gamper
114 25 Laurenz Gamper
D item
115 25 Laurenz Gamper
The file, directory, or symbolic link item has been scheduled for deletion from the repository.
116 25 Laurenz Gamper
117 25 Laurenz Gamper
M item
118 25 Laurenz Gamper
The contents of the file item have been modified.
119 20 Laurenz Gamper
</pre>
120 20 Laurenz Gamper
121 23 Laurenz Gamper
h1(#svn_checkout). SVN Checkout
122 20 Laurenz Gamper
123 17 Laurenz Gamper
h3. Source Code
124 18 Laurenz Gamper
125 17 Laurenz Gamper
<pre>
126 17 Laurenz Gamper
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/trunk despec
127 17 Laurenz Gamper
</pre>
128 17 Laurenz Gamper
129 19 Laurenz Gamper
h3. Data
130 17 Laurenz Gamper
131 17 Laurenz Gamper
<pre>
132 17 Laurenz Gamper
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/data data
133 17 Laurenz Gamper
</pre>
134 1 Brian Nord
135 10 Laurenz Gamper
h3. Paper
136 1 Brian Nord
137 1 Brian Nord
<pre>
138 1 Brian Nord
svn checkout svn+ssh://p-simulation_pipeline@cdcvs.fnal.gov/cvs/projects/simulation_pipeline-main/paper paper
139 9 Brian Nord
</pre>
140 1 Brian Nord
141 1 Brian Nord
142 1 Brian Nord
This will create a directory called despec containing a checkout the complete pipeline.
143 1 Brian Nord
144 1 Brian Nord
145 23 Laurenz Gamper
h1{#run_code}. Run the Code
146 1 Brian Nord
147 24 Laurenz Gamper
[[Glue|Description of the glue code]]
148 24 Laurenz Gamper
149 1 Brian Nord
Instructions on how to run the pipeline: [[Run_Pipeline]]
150 8 Brian Nord
151 8 Brian Nord
152 8 Brian Nord
h2. Creating a sub-project repository
153 8 Brian Nord
154 8 Brian Nord
* Creating a Repository in a Sub-Project: see https://cdcvs.fnal.gov/redmine/projects/fermi-redmine/wiki/CreatingRepositories
155 8 Brian Nord
* setting up a repository on your local machine (which will then be pushed/pulled to/from the FRedmine (FNAL Redmine) repository you created:
156 8 Brian Nord
157 8 Brian Nord
h3. Example-ish
158 8 Brian Nord
159 8 Brian Nord
* If you have a project "fred" and a "main" repository with no identifier
160 8 Brian Nord
you get put in
161 8 Brian Nord
** /cvs/projects/fred
162 8 Brian Nord
* if you have a project fred and a repository identifier of "joe" you get
163 8 Brian Nord
** /cvs/projects/fred-joe
164 8 Brian Nord
165 8 Brian Nord
* So you can do give them all identifiers, or have one (main) one without;
166 8 Brian Nord
or you can give the Main one an identifier...
167 8 Brian Nord
168 8 Brian Nord
* If there is no "Main" repository, the Repository tab doesn't show up,
169 8 Brian Nord
apparently.
170 8 Brian Nord
171 8 Brian Nord
&nbsp; &nbsp; &nbsp;
172 8 Brian Nord
Also see https://cdcvs.fnal.gov/redmine/projects/fermi-redmine/wiki/Subversion for Subversion