Branch from previous revision

Dec 7, 2010 at 6:39 PM
Edited Dec 7, 2010 at 8:42 PM

I'm not sure if this is a limitation of Mercurial, Visual Hg, or my ability to use both of them.


Here's my scenario:

I'm working on a framework (more like a program template) that I use for multiple projects. When I develop the framework, I want to put those developments into the main branch.

When I start a new project, I want to branch from a recent stable revision, which is not necessarily the revision at the top of main.


Is it possible to branch from an older revision?

I've tried reverting to a previous version, but the status window's graph summary didn't show me as being in the older revision. (Maybe there should be a better active revision indicator?)

I made a change and committed to a new branch (assuming that it "knew" which revision I was really on). However, that commit show as being a new branch from the latest revision instead of the older revision.


What I'm trying to do:


X = revision
* = you are here

1. X--X--X--*     initial history

2. X--X--*--X     revert

3. X--X--X--X     branch from old revision

4. X--X--X--X     commit as needed

I hope the explanation makes sense.

Thanks in advance for any help.


Dec 17, 2010 at 4:46 PM

Use the update command to get back to a previus revision. (right click into the history of the repo browser)

Make your changes an commit (optional with new branch name). Now you have a new branch, based on a well defined start revision.

You also will use the update command to toggle between branches.