CS 120 / Lab 8 - April 2010 Allison Mankin, mankin@cs.jhu.edu Version control with Mercurial (aka Source Code Management - SCM) Mercurial resources: http://mercurial.selenic.com/ http://mercurial.selenic.com/guide/ http://mercurial.selenic.com/tutorial/ 1. Diving right in, starting out: [we make a "repository" pg5repo to manage pg5's code] % mkdir pg5rpo % hg init pg5repo [populate pg5 (via cp, tar...)] %cp pg5/* pg5repo % cd pg5repo [we initialize mercurial with the set of files] % hg add [we commit the 0th version (initial check-in)] % hg commit -m "Initial commit" [do some work on the files] [look at the differences from the 0th version] % hg diff [we like what we have and we check in version 1] % hg commit -m "Short summary of change" [we look at info the versions so far] % hg log 2. Everyone set up BitBucket (for later) www.bitbucket.org set up your account, remember your id and password when you create an initial repository, go into the Admin pane and check Private for all settings 3. Things we'll do next week Working together via repositories (public_html) % hg clone (to create shared repositories) % hg update (to go forward and back) Rolling back from a version that does not work