comparison slides.rst @ 2:802024c24c4e

More work on the slides. The intro to DVCS part is done (first pass).
author Brian Neal <bgneal@gmail.com>
date Wed, 09 Nov 2011 21:06:05 -0600
parents 0c3b42165692
children 0130da731f83
comparison
equal deleted inserted replaced
1:0c3b42165692 2:802024c24c4e
93 93
94 .. image:: images/cvcs.png 94 .. image:: images/cvcs.png
95 95
96 ---- 96 ----
97 97
98 So what's a DVCS look like?
99 ===========================
100
101 .. image:: images/dvcs.png
102
103 All repositories are peers. By convention only, one repository is designated the master.
104 It is possible for all peers to exchange changes.
105
106 ----
107
108 What does a DVCS buy you?
109 =========================
110
111 - Private workspaces
112 - Offline mode
113 - Speed
114 - Scalability
115 - Split Geography
116 - Flexible workflows
117 - Distributed backups
118 - **Easier merging**
119 - **Commit before merge**
120
121 ----
122
123 Private Workspaces
124 ==================
125
126 - You can safely experiment in your local repository
127 - Commit as often as you like without affecting the team
128 - Encourages experimentation
129
130 - Make cheap repository clones to try things out
131 - Not visible to coworkers
132
133 ----
134
135 Offline Mode
136 ============
137
138 - Work when you have spotty or no network access
139 - Full access to the repo when offline
140 - Can work on multiple tasks offline
141
142 - Work on bug report #1
143 - Commit
144 - Work on bug report #2
145 - With a CVCS, you'd have both fixes in the same pending commit
146
147 ----
148
149 Speed
150 =====
151
152 - Local operations are **fast**
153 - No, really, **you will** notice a big difference
154 - Initial pull down of an entire repository *might* be slower than a CVCS
155
156 - Then again, you might be surprised
157 - Mercurial, for example, stores an entire repository in less space than
158 a SVN working copy in many cases
159
160 ----
161
162 Scalability
163 ===========
164
165 - Some CVCS systems require heavy weight hardware to support the server
166
167 - E.g. ClearCase with a thousand users
168 - With a DVCS, only pushes & pulls contact a central server
169 - Most of the work is done locally
170
171 ----
172
173 Split Geography
174 ===============
175
176 - Imagine a team split between Cedar Rapids & Richardson
177 - With a CVS, you have to pick where to put the server
178 - The remote location is stuck with network latency & associated problems
179 - With a DVCS, each site can have a central repository
180
181 - The two central repos can be synched when convenient or even scripted
182
183 ----
184
185 Flexible Workflows
186 ==================
187
188 - There is no internal concept of a central repository
189 - A central repository exits only by convention
190 - More elaborate topologies and workflows can be created:
191
192 - A SW team may push to a central SW repo
193 - Periodically changes from the SW repo are pushed to a QA repo
194 - Changes from the QA repo can be pushed into a release repo
195
196 ----
197
198 Distributed Backups
199 ===================
200
201 - With a DVCS, multiple copies of the repository exist on multiple machines
202 - **Of course, this is no substitute for a real backup strategy!**
203 - But usually, and with short notice, you can easily designate a repository as
204 the central repository in an emergency
205
206 ----
207
208 Easier Merging
209 ==============
210
211 - Subversion has a bad reputation for merging
212
213 - Some of this is not warranted...
214
215 - Merge tracking was added in SVN v1.5
216
217 - SVN does not handle file renames and tree conflicts very well
218 - A lot of teams simply avoid merging out of fear
219
220 ----
221
222 Easier Merging (cont.)
223 ======================
224
225 - Why is merging better in a DVCS?
226
227 - Merging simply has to work correctly and be easy in a DVCS
228
229 - More attention was paid to this aspect by DVCS's
230
231 - DVCS's use directed acyclic graphs internally to represent change sets
232
233 - More information is available to make merge decisions
234 - Easier to find common ancestors of code
235
236 - Developer changes and merge changes are separate
237
238 - "Commit before merge"
239
240 ----
241
242 Commit Before Merge
243 ===================
244
245 - With a CVCS:
246
247 - You make changes in your working copy
248 - Before you can commit, you often must peform an update
249
250 - This may trigger a merge
251 - Your changes are now mixed up with your friendly coworkers' changes
252 - Sometimes this can be a problem...
253
254 - With a DVCS:
255
256 - You make changes in your working copy
257 - You commit!
258 - You can then choose to pull changes from others and merge
259
260 - **Your changes are already safely tucked away and can be retrieved later if things go wrong**
261
262 ----
263
264 Okay, what's the catch?
265 =======================
266
267 Potential drawbacks to a DVCS
268 -----------------------------
269
270 - Practically no support for locks
271
272 - This makes working with binary files difficult in a team environment
273
274 - Huge repositories are not practical
275
276 - Hetrogenous repositories are not practical
277
278 - Not a good idea to mix, say, software, systems, and firmware in the same repo
279 - Not a good idea to mix multiple products in the same repo
280 - Arguably, this applies to a CVCS as well
281
282 ----
283
284 Introduction to Mercurial
285 =========================
286
287 - Command overview
288 - Repositories & working copies
289 - Changesets
290 - Revisions, changesets, & heads
291 - Example workflow
292
293 ----
294
98 What is a CVCS Again? 295 What is a CVCS Again?
99 ===================== 296 =====================
100 297
101 Basic SVN commands: 298 Basic SVN commands:
102 299
109 ---- 306 ----
110 307
111 So what's a DVCS look like? 308 So what's a DVCS look like?
112 =========================== 309 ===========================
113 310
114 .. image:: images/dvcs.png
115
116 All repositories are peers. By convention only, one repository is designated the master.
117 It is possible for all peers to exchange changes.
118
119 ----
120
121 So what's a DVCS look like?
122 ===========================
123
124 Mercurial (hg) vs SVN commands: 311 Mercurial (hg) vs SVN commands:
125 312
126 - add, remove, copy, move, :strike:`mkdir` 313 - add, remove, copy, move, :strike:`mkdir`
127 - :strike:`checkout`, commit, update, revert 314 - :strike:`checkout`, commit, update, revert
128 - merge, resolve, diff 315 - merge, resolve, diff