I write all (well, most) of my programs in an IDE, mostly it's netbeans.
Should I just use Mercurial through the IDE, or is it better if I used the CLI instead? and why?
I use Netbeans and Mercurial daily.
The integration of Mercurial in Netbeans is good, but I find TortoiseHg to be much clearer than what Netbeans can show. So, I use both tools :
In TortoiseHg, I pull, push, commit, merge, update, tag, rollback, backout, import/export, revert, edit
In Netbeans, I benefit from the interactive diff (green/blue/red marks at the left of the editor), I also benefit from the fact that the refactorings done in Netbeans are recorded in Mercurial. I revert files or parts of a file. I sometimes watch the diff between 2 revisions, side by side. And I sometimes show the annotations (blame).
I won't argue why I do some actions in one tool or another. I won't argue the use of the CLI versus a GUI. These are personal tastes. What I wanted to emphasis is that nothing prevents you from using multiple tools to work with Mercurial. Every actions you do in either tools (or with the CLI) will be seen by the others. Ok, sometimes I have to tell Netbeans to refresh by asking a hg
Note that this is not true for Subversion+Netbeans. When I was using Subversion, I had some conflicts between Netbeans and external tools when working on the same local copy.
Use your IDE if it has pretty good support.
Look at it this way - the CLI gives you the same access to the raw data, but the IDE/GUI can add a lot of convenient ways to organize and view, and automatically manage (moving/renaming) that data. In mine, for example (IntelliJ IDEA):
To double-check myself before I make a commit (I'm using Subversion but if you are using a DVCS, it would be the same before you push to the central repository), the commit dialog provides a convenient diff button that I can just cycle through all the changes I made one more time, to make sure I didn't make any dumb mistakes.
On the other hand, if I ever have to move a repository location, create a lot of folders, or pull some unversioned files from one working copy to another, I often use the command line, as the IDE VCS can get in the way by asking me too often if I want to "Add" the file, or performing a VCS Move/Copy when I didn't actually want it to.
I think that depends much on your personal work flow. If the IDE gives you enough functionality to your VCS why should you switch to CLI. If this is not the case, what's so bad about the CLI at all.
I personally use eclipse and mercurial. But I have no plugin in eclipse for hg. Since I always have at least one shell open it is perfectly fine with my work flow to hack some command into the shell from time to time.
For me this works very well.
Depends on your needs and proficiency with the VCS, and obviously your own preference for either a GUI or shell tool. I generally find IDE VCS tools painful, and too basic to do most of the things I want to do. And unless we come up with some more flexible GUI widgets, it looks like GUIs will forever be playing catch-up with the much more powerful shell tools available.
If you have a plugin that works well, then, why would you not use it? If you can browse changes easily without switching to a different environment, that is a big productivity boost.
If you do not have a plugin, or it does not give you all the functionality you need, then, by all means, use the CLI.
I use ankhSVN with VisualStudio, and it works great.
Using the IDE is easier because it's just a few clicks away from what you're coding. Sometimes it's better to use a command line because you have more flexibility and control.
There is no reason to have to choose. They should all work together out of the box. I use Netbeans, Tortoise and command line (in linux just Netbeans and shell).
I use my IDE to code. (Visual Studio for example)
I use another tool to manage my changesets. (TortsoieHg)
I use another tool to manage tasks/bugs/things to do. (TRAC/Redmine/EtC.)
I don't mix them because they help me switch between different mindsets.
When I code, I focus on writing solutions to problems. I design, think, write code etc. When I think I'm done, I go out of the IDE.
Then I'm in a different way of mind : I review my code, using the external tool. I first boot it to check what changes I just did finish, then I read it all, see if it looks right. Then I commit (or not).
After that, I take a look at other tasks to do, and often it's again in another tool. Once the next task is decided and I need to design and write code, I get back to the IDE.
Without this separation, I would only focus on one of those things : code, commit something, validate/check tasks. One of those would be done correctly but not the others. The interruption when switching tools help switch context of the mind and change the immediate objectives.
But I'm not sure if it works like that for others.
I often tried to have everything in my IDE, but each time I felt I was doing too much things in the same time and not doing them very well. It's like having web pages in the same screen where you have the IDE open, you can't concentrate on both.