Mercurial: Can I rename a branch?

Update to the stiging branch and create a new branch off of it. Then close the old branch. In summary: hg update stiging hg branch staging hg commit -m”Changing stiging branch to staging.” hg update stiging hg commit –close-branch -m”This was a typo; use staging instead.” hg push –new-branch

Mercurial stuck “waiting for lock”

When “waiting for lock on repository”, delete the repository file: .hg/wlock (or it may be in .hg/store/lock) When deleting the lock file, you must make sure nothing else is accessing the repository. (If the lock is a string of zeros or blank, this is almost certainly true).

Managing release branches in Mercurial

Here’s what I’d do: Make default your “mainline” branch. The tip of this branch is the “currently released to the public” version of your code. Critical bugfixes can be committed directly to this branch and merged into development branches. To start working on version 2.0, make a 2.0-dev branch. Commit changes for 2.0 to that … Read more

Mercurial Remove History

There is no simple / recommended way of doing this directly to an existing repository. You can however “convert” your mercurial repo to a new mercurial repo and choose a revision from where to include the history onwards via the convert.hg.startrev option hg convert –config convert.hg.startrev=1234 <source-repository> <new-repository-name> The new repo will contain everything from … Read more