Contributed By; Tushar Joshi
Firstly, I tried experimenting in NetBeans IDE 6.1 Beta for Mercurial support. Now as the NetBeans IDE 6.1 Release Candidate 1 which was made available some time back. So, I tried to work with this version and found some changes in the arrangements of the Mercurial menu.
If you try to run any Mercurial command on NetBeans IDE, when Mercurial is not installed or not available in the Windows executable search path, then NetBeans shows a dialog box saying no support for Mercurial.
![]() |
![]() |
Choosing Yes, will tell NetBeans to try anyway.
![]() |
You can see the Mercurial initialization output on the output window.
![]() |
Unlike Subversion, Mercurial will not create ".hg" folder in all the sub folders. This is one feature I liked very much of Mercurial.
The Mercurial repository is created but the files in the directory are not yet tracked by the Mercurial system. We must commit all the files to the repository first to tell Mercurial to keep version information, which it does in terms of change-sets.
![]() |
![]() |
The commit dialog box shows all the files that will be committed to the repository. Here we have choice to change the behavior of the commit command for different files. We can set some files not to commit. We are required to type a message for commit.
![]() |
We should commit our code often as we develop the project. This commit is made in the local Mercurial repository crested in the project folder. This is just like maintaining our repository locally with the project.
The command for cloning is available at top menu, Versioning > Mercurial > Clone (project name)
![]() |
NetBeans suggest a name for the clone and also offers to make the new cloned project as main project.
![]() |
We can see the project cloned in folder "BankExample_clone0" and opened in the NetBeans IDE side by side to the original project.
![]() |
Again, opening menu Versioning > Mercurial > Share > Push to - default option will allow me to push the changes to the original repository from where I had cloned this repository.
![]() |
Thanks for following the tutorial, hope it might help you get going with Mercurial now!
| nbmer00.png | ![]() |
7789 bytes |
| nbmer01.png | ![]() |
10262 bytes |
| nbmer02.png | ![]() |
24469 bytes |
| nbmer03.png | ![]() |
11752 bytes |
| nbmer04.png | ![]() |
7774 bytes |
| nbmer05.png | ![]() |
12527 bytes |
| nbmer06.png | ![]() |
16991 bytes |
| nbmer07.png | ![]() |
10909 bytes |
| nbmer08.png | ![]() |
9995 bytes |
| nbmer09.png | ![]() |
12036 bytes |
| nbmer10.png | ![]() |
10779 bytes |