Digital Repositories.pptx

advertisement
DIGITAL REPOSITORIES
CGDD 4603
Job Description…
Senior Tools Programmer – pulled August 4th, 2011 from Gamasutra
Job Description…
Graphics Programmer
Job Description…
Audio Lead
Digital Repositories

Also called
 “Software
Configuration Management” (SCMs)
 Version control
 Source control
 Revision control



Tracks changes to projects
Allows teams (or individuals) to have a centralized
system of code (client/server)
Game development/media has special
considerations
But WHY?


Allows developers to see a snapshot of the code at any
phase
Manages the headache of:

Monster_4_01_11_v3.1.cpp_copy
Think of the redundancy!!
 “Hey man – can you send me the latest version of…”
 “Hey man – remember that version we had a few months
back?”
 Moving code from computer to computer (shared folder)
 Understanding changes through diff

But WHY?

Risk management
 Someone
leaves, and so does their code
 Computer crashes or is stolen
 Oops – it was compiling/working before…
How it generally works…
Install client (optional)
Developer/Sys Admin creates an initial repository
Everyone synchs with the repository (updating)
New files are immediately added to the repository
Files that are being edited
1.
2.
3.
4.
5.
1.
2.
3.
6.
Are checked out (i.e. locked)
Are simultaneously editable (i.e. text files) and merged
together later
Changed files are committed
Developers can usually browse the logs for changes
Conflicts

When two people submit one file that cannot be
successfully merged
 Imagine
one person deleting a line, the other keeps it.
http://betterexplained.com/articles/a-visual-guide-to-version-control/
Trunks and Branching


The trunk is the primarily path of
development
Branches – independent paths
 One
path might have no bugs
 One path might have new features
 One path might use an updated SDK
Common Repositories

Commercial
 Perforce

“Other”
 CVS
 SVN
(or “Subversion” open-source)
 GIT and GITHub (which Mac is now recommending)
Interface Example
(Perforce)
Checkout Example
(Perforce)

Trying to save without checking out first
Diff Example
(Perforce, but looks similar to MacOS X “FileMerge”)
Reverting/Rolling Back
Distributed Version Control


Many SCMs have a centralized server
Distributed Version Control
 Is
a peer-to-peer network
 Git
 “No canonical, reference copy” exists (Wikipedia)
 Better risk management?
Things to Remember




Check your code back in!
Don’t check out the entire project each time (for
larger projects)
Don’t check in broken code
Don’t check in binaries that are generated
 .exes
(in /bin and /obj in 2010)
 .ncb (Intellisense)

In Perforce, the project must exist under the
repository directory before adding it
Download