Difference between revisions of "Applications/Mercurial"
From HPC
(Created page with "==Application Details== * Description: Mercurial efficiently handles projects of any size and kind. Every clone contains the whole project history, so most actions are local,...") |
m (→Clone a project and push changes) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
===Distributed architecture=== | ===Distributed architecture=== | ||
− | Traditional version control systems such as Subversion are typical client-server architectures with a central server to store the revisions of a project. In contrast, Mercurial is truly distributed, giving each developer a local copy of the entire development history. This way it works | + | Traditional version control systems such as Subversion are typical client-server architectures with a central server to store the revisions of a project. In contrast, Mercurial is truly distributed, giving each developer a local copy of the entire development history. This way it works independently of network access or a central server. Committing, branching and merging are fast and cheap. |
− | ===Clone a project and push changes | + | ===Interactive Session=== |
+ | |||
+ | <pre style="background-color: black; color: white; border: 2px solid black; font-family: monospace, sans-serif;"> | ||
+ | |||
+ | [username@login01 ~]$ interactive -pgpu | ||
+ | salloc: Granted job allocation 3619731 | ||
+ | Job ID 3619731 connecting to gpu01, please wait... | ||
+ | c081.vc-main | ||
+ | |||
+ | [username@gpu01 ~]$ module add mercurial/3.9.1 | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | ===Batch Script=== | ||
+ | |||
+ | * This does not apply here. | ||
+ | |||
+ | ==Clone a project and push changes== | ||
<pre style="background-color: #f5f5dc; color: black; font-family: monospace, sans-serif;"> | <pre style="background-color: #f5f5dc; color: black; font-family: monospace, sans-serif;"> | ||
Line 43: | Line 60: | ||
* [https://www.mercurial-scm.org/ https://www.mercurial-scm.org/] | * [https://www.mercurial-scm.org/ https://www.mercurial-scm.org/] | ||
− | { | + | {{Modulepagenav}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 11:51, 17 November 2022
Contents
Application Details
- Description: Mercurial efficiently handles projects of any size and kind. Every clone contains the whole project history, so most actions are local, fast and convenient. Mercurial supports a multitude of workflows and you can easily enhance its functionality with extensions.
- Version: 3.9.1
- Modules: mercurial/3.9.1
- Licence: licensed under GPLv2
Usage Examples
Distributed architecture
Traditional version control systems such as Subversion are typical client-server architectures with a central server to store the revisions of a project. In contrast, Mercurial is truly distributed, giving each developer a local copy of the entire development history. This way it works independently of network access or a central server. Committing, branching and merging are fast and cheap.
Interactive Session
[username@login01 ~]$ interactive -pgpu salloc: Granted job allocation 3619731 Job ID 3619731 connecting to gpu01, please wait... c081.vc-main [username@gpu01 ~]$ module add mercurial/3.9.1
Batch Script
- This does not apply here.
Clone a project and push changes
$ hg clone https://www.mercurial-scm.org/repo/hello $ cd hello $ (edit files) $ hg add (new files) $ hg commit -m 'My changes' $ hg push
Create a project and commit
$ hg init (project-directory) $ cd (project-directory) $ (add some files) $ hg add $ hg commit -m 'Initial commit'