Cloning a Mercurial repository

Cloning a repository means that the developer will take the version of the files from a certain point in time, the time of the cloning, and will make a copy of those files. This new cloned repository is a totally complete and independent local copy of the one contained in the server.

Note that cloning is not the same thing as branching in other version control systems. This feature is very useful when experimentations are needed with the code but the risk of wrecking an already working copy of the files in the local machine comes up. This way we can make as many mistakes without the risk of ruining our own work space.

Getting ready

For more information on how to get the Mercurial sources and repositories up and running for this recipe, please, refer to the Getting Ready section of the Creating a Mercurial Project recipe in this chapter.

How to do it...

On the toolbar click on Team, Mercurial, and Clone <Project Name> (in our case NBCookbookHG.

On the Clone Repository window change the Parent Directory to some different folder and click on Clone.

How to do it...

How it works...

NetBeans will then copy the contents from the NBCookbookHG into the newly created folder NBCookbookHG_clone0.

This name can be modified in the Clone Repository window to reflect the reason of the repository cloning. Let's say, a version 1 of the product.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.125.169