1 / 26

Mercurial & Tortoise-HG: Collaboration and Version Control

Learn how to use Mercurial and Tortoise-HG for collaborative development and version control of shared files. Track changes, resolve conflicts, and recover from mistakes.

barryh
Download Presentation

Mercurial & Tortoise-HG: Collaboration and Version Control

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mercurial & TorToise-HG

  2. What • Mercurial is a revision control system (RCS) • Revision control is the process of managing multiple versions of a piece of information • Tortoise is a set of graphical tools for Mercurial

  3. Why • Enables collaboration of multiple developers on shared files • Tracks changes in projects: who, why, when & what • Identifies and resolves potentially incompatible changes • Enables recovery from mistakes

  4. How does it work?

  5. Definitions • Repository – contains all of the files that “belong to” a project, along with a historical record of the project's files • Clone – a clone of a repository, enables synchronizing with the original repository • Changeset – a record of changes to (potentially) several files

  6. Actions • Commit – records changes in a new changeset • Push –sends changes to another repository • Pull –gets changes from another repository • Update – update the changes that were pulled

  7. Push/Pull Model

  8. How do we use it? • We don’t change the source files in Public • Instead, we have a revision control over shared libraries • Matlabtooboxes • Perl modules • Each one of them is a Repository • Each one of us has Clones of them • We make changes locally and push them only after a code review with Liran

  9. Cloning a repository • Should be done on a location in the server (Z:\) • Right click the directory in which you want to create the repository, then clickTortoiseHG and Clone

  10. Click the Browse button next to Source Path and choose the repository you would like to clone

  11. Click Clone

  12. Overlay icons • Open the folder and you will see overlay icons which reflect the status of the files • Green V – no uncommitted change • Red exclamation mark - uncommitted change • Question mark – state unknown • To update the overlay icons right-click the clone repository and from the TortoiseHG menu choose “Update Icons”

  13. Viewing changes Right click your repository/ a directory or file inside your repository click TortoiseHG and then Visual Diff Choose from the window thefile to compare A Kdiff window will open

  14. Commit • 1st time use: make sure your commit username is correct Right click your repository and choose TortioseHG and then Global Settings

  15. Click the Commit tab and enter your username. Click Close

  16. Right click your repository/ a directory or file inside your repository and click HG Commit • 2nd time and up:

  17. Commit process: The commit button Enter commit message here The files that changed Shows the changes in the selected file from the last revision Legend of file statuses

  18. Check that the commit was successful and close the log and commit windows

  19. Synchronizing with original repository Right click your repository and choose TortioseHG and then Synchronize

  20. Outgoing • Displays local changes that’d be pushed Files that changed betweenthe repositories The description is our commit comment

  21. Push • Done after commit and after code review Number of changesets(revisions) that are being pushed and to how many files

  22. Incoming • Displays changes that can be pulled from selected repository Who made the change and when Files that changed betweenthe repositories The description is thecommit comment

  23. Pull • Pulls changes from selected repository Number of changesets(revisions) that are being pulled and to how many files Update the changes in your repository View the modifications

  24. Repository Explorer Used to visualize the revision history of each file in your repository Right click your repository and choose TortioseHG and then HG RepositoryExplorer

  25. Summary of the change (the commitcomment). Bold – the revision currentlyused in the repository The user whocommitted the change How long ago the revision was committed Synchronizingtools Graphic displayof revisions The modified filesin the selectedrevision The changes made in the selected file in the selected revision

  26. For more information • Mercurial book • Tortoise book

More Related