Start trying out risky new features without losing that precious working version.Start keeping a structured history of development to simplify future debugging tasks.Stop sharing passwords or committing file permissions faux pas in the name of collaboration.Stop partners from interfering while simultaneously editing on Dropbox or Drive.Stop the scourge of unstructured, unintelligible code-copy litter: It has a funny habit of multiplying, shifting around, breaking, and disappearing, especially in office hours. Stop losing hours of work because making backups was just too much work to bother with… until you realize the past 7 hours of untested coding entirely breaks everything.Being forced to learn to use principled version control helps you: This model supports a wealth of development tasks such as: quick, reliable, easily recoverable backups structured collaborative development and sharing of code structured documentation of project evolution finding the revision where bug was introduced into the project. The version control software is responsible for principled maintenance of revision history (principles being a great strength of computers) while users are responsible for deciding what versions of a project are appropriate and meaningful to record in the revision history or share revisions with other users. Clone a repository, record independent revisions in separate clones, and share revisions to bring clones up-to-date with each others’ revisions.īy allowing interaction with the repository only through its interface, a system like Mercurial abstracts tedious representation and maintenance details away from the error-prone user.Compute the difference of two revisions.Reconstruct an arbitrary past revision.Record a new revision, along with timestamp, creator, and description.Mercurial supports several useful repository tasks, including: The user can make direct changes to the working copy, but interacts with the repository ( e.g., to record a new revision) only through the interface provided by the Mercurial tool, hg. hg inside the working copy’s base directory). 2 The repository itself is hidden away (in a hidden directory. Every Mercurial repository is paired with a distinct working copy, a directory containing a snapshot of the project, where the user can prepare new revisions. 1 Mercurial also calls revisions changesets. This section introduces basics of the Mercurial version control system, the hg tool, and the Bitbucket hosting service.Ī Mercurial repository is a structured record of the evolution of a project through multiple revisions in the form of a detailed revision history of its files. Commit before trying to update or merge.check submission in all local repositories: hg status empty, hg outgoing finds no changes.hg pull and either hg update or hg merge hg commit others’ changes. Bitbucket: grant Admin permission on wendyw / assignment to bpw and your partner.Single Bitbucket repository, multiple local repositories. Add early, commit often, and push often enough.check submission in local repository: hg status empty, hg outgoing finds no changes.hg push changes to Bitbucket often enough.local: hg clone multiple times per assignment as needed:.Bitbucket: grant Admin permission on wendyw / assignment to bpw.Bitbucket: fork wellesleycs251 / assignment to create wendyw / assignment.Single Bitbucket repository, single local repository. To start the tutorial, skip to Mercurial (hg) and Bitbucket. Contentsįor reference once you know the basics. If you want to install it elsewhere start at (or in your favorite package manager). CS Linux machines and the wx appliance have Mercurial installed. The tutorial assumes Mercurial is installed. As you outgrow this document and seek more general information, consult documentation elsewhere. Windows will require minor translation of non-hg commands. The document assumes a Unix, Linux, or Max OS X environment with Mercurial installed and very basic familiarity with the shell. Quick reference material and an introduction to Mercurial and Bitbucket are followed by a tutorial that covers setup for this course and basic skills for solo and team use. This document introduces these tools as used in CS 251. CS 251 uses Mercurial and Bitbucket to manage all programming projects.
0 Comments
Leave a Reply. |