Mercurial - ArchWiki
Mercurial (commonly referred to as hg) is a distributed version control system written in Python and is similar in many ways to Git, Bazaar and Darcs.
Installation
Install the mercurial package.
Graphical front-ends
See also Mercurial graphical user interfaces.
- hgk — Tcl/Tk based tool to browse the history of a repository in a graphical way.
- TortoiseHg — Set of graphical tools and a Nautilus extension for the Mercurial distributed revision control system.
Configuration
At the minimum you should configure your username or mercurial will most likely give you an error when trying to commit. Do this by editing ~/.config/hg/hgrc or ~/.hgrc and adding the following:
~/.hgrc [ui] username = John Smith <[email protected]>To use the graphical browser hgk aka. hg view, add the following to ~/.hgrc (see forum thread):
~/.hgrc [extensions] hgk=You will need to install tk before running hg view to avoid the rather cryptic error message:
/usr/bin/env: wish: No such file or directoryUsage
All mercurial commands are initiated with the hg prefix. To see a list of some of the common commands, run
$ hg helpEach command has a help page that can be read using
$ hg help subcommandYou can either work with a pre-existing repository (collection of code or files), or create your own to share.
To work with a pre-existing repository, you must clone it to a directory of your choice:
$ mkdir mercurial $ cd mercurial $ hg clone https://repo.mercurial-scm.org/helloTo create you own, change to the directory you wish to share and initiate a mercurial project
$ cd myfiles $ hg init myfilesDotfiles Repository
This article or section is a candidate for merging with Dotfiles.
If you intend on creating a repository of all your ~/. files, you simply initiate the project in your home folder:
$ hg initIt is then just a case of adding the specific files you wish to track:
$ hg add |file1 file2 file3You can then create a ~/.hgignore to ensure that only the files you wish to include in the repository are tracked by mercurial.
Tip If you include: syntax: glob at the top of the .hgignore file, you can easily exclude groups of files from your repository.Tips and tricks
Progress bar
If you are going to be working with large repositories, you may want to enable the progress extension by adding it to your ~/.hgrc file:
~/.hgrc [extensions] progress =This will show progress bars on operations longer than 3 seconds. If you would like the progress bar to show sooner, you can append the following to your configuration file:
~/.hgrc [progress] delay = 1.5See also
- Mercurial: The Definitive Guide
- Mercurial Kick-Start one more tutorial by Aragost.
- Mercurial Hosting - List of services that offer Mercurial hosting, from the official Mercurial wiki
Từ khóa » Hg Hgk
-
Hg Hgk - Facebook
-
Hgk Hg | Facebook
-
Hg Hgk - India | Professional Profile - LinkedIn
-
HgkExtension - Mercurial SCM
-
Hg Hgk - YouTube
-
Alibaba Group Holding Limited (9988.HK) Stock Price, News, Quote ...
-
HG Khouri & Associates – Accountants And Business Advisors
-
Hgk/hg View Works With Established Repo But Not With New Repo
-
Copper Overview - CME Group
-
The 1997 Season At Ba'ja, Southern Jordan - Ex Oriente EV
-
55mm Crossflow Radiator (Holden HG-HK Chev V8 68-72)