# hg-ibranch /

Filename Size Date modified Message
doc
hgext
80 B
1.7 KB
2.8 KB
472 B
Title: hg-ibranch Mercurial Extension Draft André Felipe Dias

Collaboration

Both technical suggestions and grammar corrections are welcome!

## Abstract

The hg-ibranch is an extension that provides an ideal branching model to Mercurial. Basically, it combines named branches and bookmarks behaviors into a single one. The ibranch can be used to long and short-term branches, providing speed, flexibility and audit trail.

There is no schema change. So, backward compatibility is granted.

## Motivation

Currently, Mercurial has two different branching models: named branches and bookmarks. Bookmarks are used for short-term feature or topic branches whereas named branches are used for long-term branches.

Bookmarks are fast and flexible. They are scalable and can be easily renamed and deleted. But they don't record an audit trail and this is the main reason why they aren't used in long-term branches.

On the other hand, Named Branches creates an audit trail, but they cannot be renamed or deleted (only closed). There is also a performance penalty as the number of named branches increases. Thus, Named Branches are recommended for long-term branches only.

Although bookmarks and named branches can coexist, they aren't really integrated. There are different sets of commands, options and synchronization policies that turns their use awkward and unnecessarily complex. A developer need to know too much detail to choose and operate both models simultaneously.

## Specification

The original hg branch command is replaced by a new one with the following options:

use "hg -v help branch" to show more info

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.