Hgcheatsheet Usage

  • Uploaded by: Symbian
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Hgcheatsheet Usage as PDF for free.

More details

  • Words: 550
  • Pages: 1
Sheet 1

Symbian and Mercurial: Usage Concepts

Clone

MCL/RCL Repository

REPOSITORY – where mercurial stores the revisions MCL/RCL REPO–managed codelines (restricted access) FCL REPO – feature codelines (general access) CHANGESET – a set of file changes in the repo REV – local number that identifies a changeset, and therefore a version of the package BRANCH – follow a child from a revision NAMED BRANCH – branch created for a specific reason HEAD – latest revision of a branch TIP – latest head (newest revision in repository) TAG – label for a specific revision PATCH – set of mercurial commits that can be applied to another repository

RCL_1

Undo



Revert to parent rev of working directory hg revert Revert to a previous revision of a file hg revert –r REV FILE Revert working dir contents to a previous rev hg revert –r REV (this doesn’t change the current rev, just the contents) Rollback your last commit / pull / import /unbundle hg rollback NOTE: You cannot undo a rollback!!

Mercurial: www.selenic.com/mercurial/wiki Symbian Foundation: developer.symbian.org

Pull Check to see if there is anything new in the main repo hg in MAIN _REPO Synchronise with the main repository hg pull MAIN_REPO (will not update your working directory) Update working directory hg update REV

RCL_2

RCL_1







RC

MCL

.hg Mercurial repository

UPDATE

Files changed in the working directory hg status Changes to tracked files hg diff Add new files (so that they are controlled) hg add <path> Commit all your changes to you local repo hg commit –A –m (-A option adds all untracked files)

FCL







Merge

FCL

The MCL.RCL version of the repo contains the managed code lines. Only the package owner can push to this repository. The FCL version of the repo contains feature code lines (as named branches). Everyone can push to this repository.

CLONE

Edit

RC

FCL Repository

PULL

Browse

MCL



Get a local copy of an existing package repository hg clone www.selenic.com/repo/hello my-hello History of changes hg log (-v) History of changes for a file/directory hg log FILE…..SUBDIR/ …. Who changed what when in a file? hg annotate myfile What changed between R2 and R5? hg diff –R2 –R5 | diffstat A specific file from a specific rev hg cat –r REV myfile Show current repository heads or show branch heads hg heads Shows parent changeset(s) for a specific rev, or current working dir hg parents Show the latest change to the package hg tip Change to a specific rev hg update –C REV (REV will be new parent Note: -C option will overwrite)

RCL_2

Symbian Repository The Symbian package repositories hold the “master” versions of the projects. This is where the developers pull the package data from.

Working directory

Local Repository The working directory is where you do your own changes: implement features, fix bugs, refactor, experiment. You store your own changes locally by committing them to your local hg repository. When you are ready you can publish your changes back to the foundation repository (see sheet 2).

Merge with a given revision hg merge REV (you should have a clean working dir) REV will be added as the second parent View which revisions you are merging hg parents Undo messed up merge hg update –C tip Only works if you merged from the tip

Related Documents

Hgcheatsheet Usage
April 2020 12
Hgcheatsheet Pub
May 2020 13
Undo Usage
May 2020 7
Internet Usage
December 2019 26
Article Usage
December 2019 16
Voltmeter Usage
May 2020 5

More Documents from ""