Branching vs Cloning
Michael Fromin
mfromin at yahoo.com
Thu Jan 7 23:34:53 CST 2010
Excuse the "newbie" nature of this question but I am struggling to see when one should Branch and when one should Clone.
I am a sole developer working on a project. I use Mercurial for my repo so I have a nice history of the work I do. For linear work, the process of making changes and then committing the changes is easy and straight forward.
Where I am struggling is how to properly do two things:
1 - At a certain point in time the code is "ready for deployment". At that point I would like a nice way to mark that changeset so (if needed) I can easily roll back to that if needed.
2 - Once I have the code in production I will likely need to move forward with work on "the next version" but I may also have to make small updates to the current production code if issues are found.
For item #1...
I believe that I would use the TAG capability of the system to mark specific changesets. As I already have 11 changesets in the repository I cannot seem to find a way to tag any existing changesets. Am I missing something or is this not doable in Mercurial? Is there another way to do this? For example, should I branch off the main path for each "version" that I want to identify?
For item #2...
If I have multiple "work streams" that I need to do in parallel do I make multiple branches or multiple clones? It appears that (in theory) I could do either as both seem to provide me a way to isolate a set of code changes that I can later merge back into a single parent changeset. Is there a particular "best practice" for how this should be done? Are branches better for this? Are clones better for this?
If I do branch then would I perform "fixes/patches" to the branch and then merge them in later? If I don't make a branch do I just clone the repo to the appropriate changeset, make the change, and then merge back in somewhere? If so where?
I appreciate any input this list can provide. I am new to version control and Mercurial and want to make sure I have my processes in order before I get too far into this development process.
--Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20100107/291800d5/attachment.htm>
More information about the Mercurial
mailing list