#hg++ - power tools for mercurial
Do you keep multiple clones of your repository on your system and find keeping them merged and fresh a chore?
Then this is the tool for you.
Example gif of hgpp merge in action
Usage
hgpp --help
Show help.
hgpp
Default command - lists the current branch name for each configured repo.
hgpp pull
Does an hg pull
on each repo.
hgpp merge
First does an hg pull, and then attempts to merge. The project will be skipped if:
- there are uncommitted changes
- the branch is default (or a differently configured parent branch)
- the branch already has default merged in
Setup
####Install the tool (globally):
npm install hgpp -g
####Make a .hgpp
config file in your home directory:
~/.hgpp
for unix
c:/users/foobar/.hgpp
for Windows
This config file is standard JSON:
{
"projects": [
{ "path": "C:\\code\\myproj" },
{ "path": "C:\\code\\myproj_clone1" },
{ "defaultBranch": "temporary-other-default", "path": "C:\\code\\myproj_clone2" }
],
"maxConcurrent": 3
}
Specify paths to your projects.
Optionally specify a different default
branch - this is useful when you're branching off of a parent branch and want to keep in sync with that parent rather than default
. If no value is provided, this defaults to default
.
maxConcurrent is optional, and specifies how many simultaneous mercurial actions it will try perform. Defaults to 3.