Mercurial: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
'''Distributed source control management tool'''
'''Mercurial, a.k.a. Hg, is a distributed source control management tool'''


URL: http://mercurial.selenic.com/
URL: http://mercurial.selenic.com/


==Main Links==
==Main Links==
* Hg Init: a Mercurial tutorial by Joel Spolsky http://hginit.com
* http://hginit.com - a Mercurial tutorial by Joel Spolsky
* Quick Start: http://mercurial.selenic.com/wiki/QuickStart
* Online book: [http://hgbook.red-bean.com/read/ Mercurial: The Definitive Guide]
* Quick start: http://mercurial.selenic.com/wiki/QuickStart
* Basic introduction to version control and Mercurial: http://www.soton.ac.uk/~fangohr/computing/Mercurial/talk.pdf
* Basic introduction to version control and Mercurial: http://www.soton.ac.uk/~fangohr/computing/Mercurial/talk.pdf
* Hg Book: [http://hgbook.red-bean.com/read/ Mercurial: The Definitive Guide]


==Basic Concepts==
==Basic Concepts==
* '''Working copy''': É o diretorio onde ficam os arquivos de seu projeto;
* '''Working copy''': Root folder where your project files are located;
* Repositório: Armazena todo o histórico de mudanças feitas nos arquivos do projeto. Fica dentro do diretório .hg (que fica dentro do working copy). Tipicamente, um projeto tem ao menos um repositório para cada desenvolvedor que está trabalhando com ele.
* '''Repository''': Inside every '''working copy''' folder, there's an '''.hg''' folder, which is an Hg repository. It stores all change history of your files. Every project developer has one. You can also choose to have a ''main'' repository in a specific computer.
* '''.hgignore''': Se quiser indicar quais arquivos ou pastas devem ser ignorados pelo Mercurial, crie um arquivo com esse nome na raíz do projeto e edite-o conforme for necessário.
* '''.hgignore''': Similar to ''.cvsignore''. Located at the root of the '''working copy'''. Specifies which files to ignore.
* '''commit''': Grava as alterações do working copy dentro do repositório local, na forma de um novo changeset;
* '''commit''': Stores inside the '''.hg''' folder (i.e. the ''local'' '''repository''') the changes made to the '''working copy'''. A '''commit''' is stored as a new '''changeset''';
* '''changeset''': Conjunto de mudanças. É criado quando é feito um commit. Cada changeset possui um identificador único, de vários dígitos. Cada changeset está associado a exatamente 1 branch;
* '''changeset''': Conveys the changes made to a previous state of the '''repository'''. Each changeset has a changeset '''id''', which is a globally unique identifier. Each changeset has a comment;
* '''branch''': mesmo conceito do SVN;
* '''pull''': Brings changesets from a different '''repository''' to your local one (only changesets that you don't already have);
* '''pull''': Traz changesets de um outro repositório para o seu repositório (apenas os changesets que não existem no seu repositório);
* '''push''': Sends changesets from you local '''repository''' to a different one (only changesets that don't already exist on the other repository);
* '''push''': Envia changesets do seu repositório para um outro repositório (apenas os changesets que não existem no outro repositório);


==More Information==
==More Information==

Revision as of 00:48, 16 October 2010

Mercurial, a.k.a. Hg, is a distributed source control management tool

URL: http://mercurial.selenic.com/

Main Links

Basic Concepts

  • Working copy: Root folder where your project files are located;
  • Repository: Inside every working copy folder, there's an .hg folder, which is an Hg repository. It stores all change history of your files. Every project developer has one. You can also choose to have a main repository in a specific computer.
  • .hgignore: Similar to .cvsignore. Located at the root of the working copy. Specifies which files to ignore.
  • commit: Stores inside the .hg folder (i.e. the local repository) the changes made to the working copy. A commit is stored as a new changeset;
  • changeset: Conveys the changes made to a previous state of the repository. Each changeset has a changeset id, which is a globally unique identifier. Each changeset has a comment;
  • pull: Brings changesets from a different repository to your local one (only changesets that you don't already have);
  • push: Sends changesets from you local repository to a different one (only changesets that don't already exist on the other repository);

More Information

See Also

  • Pacha - Uses Mercurial to backup and manage software configuration files from single or multiple server instances across the network.