How can I see incoming changesets using hg4idea? - mercurial

When using IntelliJ with Subversion, there is a view called "Incoming" that lets me see incoming changesets from the remote repository. With the Mercurial command line, there is an equivalent command hg in. I like this command because I can see what's coming before pulling it. This view seems to be missing from the IntelliJ-Mercurial integration; my "Changes" window only has one tab called "Changes." Is there a view for this somewhere?

As of IntelliJ IDEA 11.0, it's still not possible to see "incoming" or "repository" changes with either mercurial or git repositories the way you can with subversion ones.
If you look at the online help for IDEA 11.0 http://www.jetbrains.com/idea/webhelp/local-committed-and-incoming-changes.html you'll see a specific note:
"Repository and incoming changes are not supported by Git and Mercurial integrations."
There is an open issue in the IDEA bug tracker http://youtrack.jetbrains.net/issue/IDEA-73130 reported in August 2011 but without any apparent plans for a fix.

Related

Negative revision when checking HG repository

I'm getting errors when pushing and pulling from a repo on a server. We have a repository (a folder) on a LAN-server which we push our commits to. This worked from the beginning but now it seems to not find the changesets on the server anymore, so tortoisehg ends up by trying to push all the revisions it locally has, to the server.
Also, when I view the repository on the LAN-server in HG workbench, it doesn't show any revision, the only one I can see is a revision -1?
So my question is, what have could gone wrong? And is there a way to fix this? I already replaced the repository on the server with my local one, and that went well for a few days until it happened again.
Revision -1 is what mercurial shows on an empty repository right after a hg init without any commit whatsoever.
If your LAN server exports the repository over a windows network share, indeed it might have been a serious bug fixed in Mercurial 3.3.2 (see https://bz.mercurial-scm.org/show_bug.cgi?id=4546 - maybe you can reproduce that with a new test repo. Upgrade, if that's the case for you)
What Mercurial version are you using?
It's possible that you have been impacted by the bug fixed in Mercurial 3.3.2 (released yesterday).
The solution in that case is to upgrade to Mercurial 3.3.2.

hg largefile XXX missing from store (needs to be uploaded)

A coworker got this error after pulling from the repo. I searched for an answer online on how to solve it but couldn't find anything. I figured out a way to solve it so posting it below for anyone else with the same issue.
I asked everyone else working on the repository to check their user cache folder (C:\Users\username\AppData\Local\largefiles on Windows) to see if they had a file with that id ("XXX" from the title).
One of them did, the original author of the file.
I asked him to send it to me, I remote connected to the server that has the central repo. I then copied the file both to the server's cache and into .hg\largefiles
The user could then pull again and push and everything worked.
LF extension seems not compatible with keyword extension.
With these both extensions, at the commit, the LF is NOT put in the configured folder on the PC and then raises this error at push.
If you disable the keyword extension, it's perfectly working.
Unfortunately, I've not found any additional explanations.
If someone could provide a stable solution, it will be great.
It looks like hg pull is happily sparse, but hg push is not; thus you need all largefiles for every revision not already present on the new remote, so that it can populate for history and allow clients to successfully pull at any revision. Which makes sense.
When migrating to a new hg server, I hit this issue. The "within Mercurial" solution was to download all largefiles, for all commits, to my local repo, and then push to the new server repo:
$ hg lfpull --rev 1-tip
$ hg push newbox
(Disclaimer: my Mercurial-fu is weak, I only use it for this one largefile repo)

Mercurial and online sharing - how to proceed

A noob question... i think
I use Mercurial for my project on my laptop. How do i submit the project to an online server like codeplex?
I'm using tortoisehg and i cant find the upload interface for submit the project online...
From the command line, the command is:
hg push <url>
to push changes a remote repository.
In TortoiseHg, this is accessed through the "Synchronize" function, which seems to show up if you right-click in a Windows Explorer window but not on any file. It's also available in the workbench; the icon is 2 arrows pointing in a circle.
For these things, I find the best way to go is to use the command line interface - TortoiseHG is OK if you need to perform some common operations from the file browser, and it's a nice tool to visualize some aspects of your repository, but it doesn't implement all of mercurial's features in full detail, and it renames and bundles some operations for no apparent reason.
I don't know how things work at codeplex, but I assume it is similar to bitbucket or github, in which case here's what you'd do:
Create an empty repository on the remote end (codeplex / bitbucket / ...).
Find the remote repository's URL - for bitbucket, it is https://bitbucket.org/yourname/project, or ssh://hg#bitbucket.org/yourname/project.
From your local repository, commit all pending changes, then issue the command: hg push {remote_url}, where {remote_url} is the URL of the remote repository. This will push all committed changes from your local repository to the remote repository.
Since the remote's head revision (an empty project) is the same as the first revision in your local copy (because all hg repositories start out empty), mercurial should consider the two repositories related and accept the push.
For an introductory guide to command-line mercurial, I recommend http://hginit.com/

Is it possible to use the Mercurial Fetch extension with the TortoiseHg merge dialog?

I'm trying to implement Mercurial in the company where I work. Previously we used ClearCase, but for various reasons we decided to upgrade to Mercurial. The development team is very accustomed to the ClearCase workflow, especially the visual tools. Therefore, for our implementation of Mercurial, we will be using TortoiseHg.
A Mercurial extension that caught my attention is the Fetch extension, which allows to do a "hg pull -u" followed by "hg merge" and "hg commit", if necessary. The extension basically does what we want and integrates perfectly with TortoiseHg configuring it to run automatically "Post Pull."
The only problem is that the Fetch extension does not allow to compile and test the merge before running the commit. However, using the TortoiseHg merge dialog with "hgtk merge -r tip" there is a visual way to run the merge command, but with the advantage of allowing me to compile and run the tests. If all went well I press the Commit button, but if something went wrong just press Undo and everything is back as before.
TortoiseHg Merge Dialog: http://www.freeimagehosting.net/uploads/a2f43fe5ff.png
So, my question is:
Is it possible to use the Mercurial Fetch extension with the TortoiseHg merge dialog?
If it's not possible, how would you recommend implementing this workflow? Is there a way to assign an Alias to this secuence:
hg pull -u
* if merge is needed *
hgtk merge -r tip
I am not sure if you could have an "if" in an alias, but I think not.
To answer your last question: no, there are no way to make such aliases with the command line version of Mercurial or with TortoiseHg.

Mercurial: No editor appears when merge conflicts are detected

I wonder if anyone here has any experience with mercurial running on Ubuntu? I've been playing with it all morning and love everything I've seen so far.
The one problem I though is when I do a merge and conflicts are detected, it doesn't automatically bring the file up in the command line editor to allow me to resolve the conflicts. It just tells me there's a conflict, then it's up to me to open the editor and resolve it.
But this is strange as the docs show that the editor is automatically launched when there is a merge conflict. I know it's not a problem with the editor (nano) in general as it's works when I do a commit and have to add a comment.
Any ideas?
Chris
p.s I already tried the mercurial IRC channel, but silence....
You probably need to define your merge tool in ~/.hgrc:
[ui]
merge = vimdiff
What commands are you using, and what does your ~/.hgrc look like? If you're using the fetch extension, it should be opening up a configured merge tool when a conflict is detected.
I detailed my full mercurial config a while back in a blog post where I use kdiff3 as my merge tool.
When doing an "hg fetch" or an "hg merge" (after a conflict is detected) it launches kdiff3 as you'd expect and lets me resolve the merge.