Cheap cloning/local branching in Mercurial
Posted
by Zack
on Stack Overflow
See other posts from Stack Overflow
or by Zack
Published on 2010-04-08T10:32:42Z
Indexed on
2010/04/08
10:53 UTC
Read the original article
Hit count: 257
Hi,
Just started working with Mercurial a few days ago and there's something I don't understand.
I have an experimental thing I want to do, so the normal thing to do would be to clone my repository, work on the clone and if eventually I want to keep those changes, I'll push them to my main repository.
Problem is cloning my repository takes alot of time (we have alot of code) and just compiling the cloned copy would take up to an hour.
So I need to somehow work on a different repository but still in my original working copy.
Enter local branches.
Problem is just creating a local branch takes forever, and working with them isn't all that fun either. Because when moving between local branches doesn't "revert" to the target branch state, I have to issue a hg purge
(to remove files that were added in the moved from branch) and then hg update -c
(to revert modified files in the moved from branch). (note: I did try PK11 fork of local branch extension, it a simple local branch creation crashes with an exception)
At the end of the day, this is just too complex. What are my options?
© Stack Overflow or respective owner