Search the Community
Showing results for tags 'mercurial'.
Found 2 results
There is some major (IMO) VCS news today. Netbeans 7.1 beta was released today it offers integrated support for Git. It also added support for Mercurial branches and tags. Also, BitBucket added support for Git. Now Git fanatics can take advantage of BitBucket's free private repositories.
I just set up a simple little version control system with my favorite IDE, netbeans. Why I Chose BitBucket/Mercurial I chose BitBucket for my current development project because it offered free private repositories, unlike Github. Github does have some cool features that BitBucket lacks, like the Network Graph, so I'll probably use it if I ever start a public open-source project. Preliminary Setup These were the main things I did to before I set up the main VCS: Installed Netbeans IDE Signed up on BitBucket Installed Tortoisehg (Tortoisehg is a Mercurial package for Windows that includes integration into the system's context menus e.g. you can right-click and select TortoiseHG > Create Repo Here; That easy!) Main Setup After the installation you have to look for mercurial.ini at the following location: UNIX-based systems: ~/.hgrc Windows XP: C:\Documents and Settings\MY_NAME\mercurial.ini Windows 7: C:\Users\MY_NAME\mercurial.ini On Windows, I had to create the file with this info: [ui]; editor used to enter commit logs, etc. Most text editors will work.editor = notepadusername = MY_FIRST_NAME MY_LAST_NAME <MY_NAME@example.com> The email address should stay enclosed in the less-than/greater-than symbols. Next, I created a new project in Netbeans. When I create the project to be used with a VCS, I like to keep the Netbeans Metadata in a separate directory as it is irrelevant to potential collaborators. My structure may look like this: - /project_dir | - /nbproject (netbeans metedata files) | - /source_files (project source files) When I sync a folder to my remote BB repo, I just sync the source files folder. Before I initialize the project, I create the repo on BB. After that is done, I initialize the project in netbeans. Initializing the Project After you create the repository on BB, you will see a command to clone your repo. Instead of copying the entire command ($ hg clone https://email@example.com/my/repo), just grab the HTTPS url. Back to Netbeans. I locate the sources folder in the project I just created. I right-click on that and go to Mercurial > Properties.... Then I paste the url into the "default-push" and "default-pull" fields. The Mercurial username should already have been pulled from the mercurial.ini file. If it isn't there, enter MY_FIRST_NAME MY_LAST_NAME <MY_NAME@example.com> as the value for username. Now I can do the commits and pushes right through Netbeans, never touching the command line. I still want to familiarize myself with hg (the chemical symbol for mercury) commands. I believe the syntax is similar to git, so it would essentially be killing two birds with one stone if I learned the Mercurial commands. You probably noticed this uses HTTPS instead of SSH. Although I haven't tried setting up SSH yet, I think it would be pretty easy. I'd be happy to hear your input on my configuration.