Project

General

Profile

UsingRepositories » History » Version 33

Brian Nord, 04/08/2013 05:11 PM

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