m2eclipse on windows with Mercurial does not allow hg to be used on the "Check out Maven Projects from SCM" wizard - mercurial

I followed the answer from this posting:
How to use Mercurial, Maven and Eclipse together?
But the "Check out Maven Projects from SCM" still does not allow me to use Mercurial SCM.
The only option I get is "svn" in the dropdown, and even if I ignore the drop down and enter in "scm:hg:http://myMercurialRepoURL"
I'm using:
Eclipse 3.6.1
m2eclipse 0.12 from http://m2eclipse.sonatype.org/sites/m2e
"Maven SCM handler for Subclipse" 0.12.0 from m2eclipse extra's site (sorry, I would give the URL, but my new account doesn't have enough rep)
MercurialEclipse 1.8.1 from http://cbes.javaforge.com/update
And I've uninstalled, and reinstall those plugins in that order.
I'm able to use Maven in projects, and use Mercurial separately in Eclipse - it's just this one Wizard that seems to be broken, which leads me to believe that if I try to Materialize an Artifact from a Mercurial repo that it will also fail.
Has anyone had any luck with this Wizard? Perhaps on earlier versions? Is this a new bug?
Thanks

As far my search went, I didn't get to find a suitable connector for mercurial and m2eclipse (in terms of only using IDE). However, I did an experiment wherein I cloned a copy of the source from outside the IDE. (via TortoiseHg specifically)
Afterwards, assuming you have already m2e installed in Eclipse:
Go to File > import > maven > existing maven projects, then select the folder where you've originally pulled/cloned your source code.
I believe by doing so, you'll see the m2e commands in the project's context menu (via run as), and effective use mercurial commands. (via team context menu)
At least for now, this is better not using m2e and mercurial at the same time.
If anyone has a more streamlined approach, I'm also curious. :D

Related

Mercurial support partially not working in Atom-Nuclide

I have installed the latest version of watchman, which can be found here:
/usr/local/bin/watchman
I performed the Install Recommended Packages on Startup and I watched them install after restarting.
This is a fresh new install of Atom and Nuclide with the latest version of everything.
I have a test project with files added to the Mercurial repository. The repository .hg directory sits at the root of the project. When I open a Diff View into a file, Nuclide picks up the previous Mercurial version of that file just fine as I make edits and it shows the comparison between the two. Previous version on the left is shown. So I know that Atom-Nuclide is able to interact with the Mercurial repository.
However, nothing else seems to be working for Mercurial support.
When I select "Toggle Blame" on the same file where Diff View is working, I get this message: "Failed to fetch blame to display. The file is empty or untracked or the repository cannot be reached."
The File Tree Highlighting does not work. No colors on any of the files in any of their mercurial states.
The colored Line Modification Notifications do not show inside of the Atom gutter.
The Added and Removed Lines feature is not showing in the status bar.
These features in Atom-Nuclide are the reason why I am interested in trying out Mercurial instead of Git and are big reasons for trying this IDE in general.
The same problem was reproduced on a different distro. I can't be the only one who bumps into this. No business can safely rely on a development environment where the level of community interest outside of FB cannot support an attempt to claim a Stack Overflow bounty on a question like this. The solution is to wait for better type support and type checking to come to PHP. Numerous RFCs exist to do exactly that and other IDEs will take advantage of this in future versions of PHP.

TortoiseHg 3.6.3 broke mercurial keyring?

I upgraded to Tortoise 3.6.3 yesterday and now I am prompted every time I pull or push a repo. The keyring is set properly, and my user name is in the url.
Any ideas on what may be wrong? Did 3.6.3 break keyring?
Issue 4401 "mercurial_keyring always asks for user/password" from time of 3.6.2 closed as pure extension-specific and contains solution: don't use username in URL anymore
Here is what to put into .hg/hgrc:
[auth]
default.username=myname
default.prefix=http://myrepo
A good way to debug issues like this is to run merciural from the command line with the debug flag, as in:
hg pull --debug
This will clearly indicate if there are problems getting the repo, user name, and password.
UPDATE: A new version of TortoiseHG has been released (3.8.3 at the time of writing) and fixes this issue: upgrading to latest version should be enough.
I had this exact same problem and found the following investigation article to be quite helpful to better understand what't going on (I'm not the author, BTW).
To cut it short, it seems a bug of the mercurial_keyring extension v1.0.1, introduced in TortoiseHG 3.6.2, which also appears to be fixed in v1.1.1.
If you're into Python compiling, it should be possible to upgrade it manually into TortoiseHG by getting it from its official bitbucket repo, compile it and manually place it into TortoiseHG's /lib/library.zip file (backup it beforehand might be wise): if you're not, you have 2 options:
1) clone the bitbucket repo to your HDD and then configure your Mercurial installation to use the new version of that extension module by writing the following in your C:\Users\USERNAME\mercurial.ini file (which was what I did):
[extensions]
mercurial_keyring = /path/to/mercurial_keyring/mercurial_keyring.py
(Notice: you might also have to put the path in your PATH or PYTHONPATH env variable, depending if you already have Python and/or Mercurial installed on your machine).
2) wait for the next TortoiseHG release that will contain the updated version.

Installing packages with nuget on command line on MacOS?

I'm trying F# on OS X and I'm having trouble installing packages. My problem is to use MySQL.
I have downloaded Nuget and I can launch it. However, I didn't find any useful documentation about how to use it on the command line.
I managed to install MySQL.Data by doing
mono nuget.exe install MySql.Data
which downloaded it to my current repository. Is that normal? I was expecting it to be "installed" in a more central directory.
Moreover, when I try to require it, r "MySql.Data it doesn't work. It works if I set the include path properly by doing:
fsharpi --lib:MySql.Data.6.8.3/lib/net45
But that seems super heavy. Is there a way to add all the installed nuget in the path automatically?
Short answer: No.
Long answer: Yes, but it won't be what you hoped for.
It is possible to get NuGet to put installed library some specific place. On Mac OS, add the following to the end of ~/.config/NuGet/NuGet.Config
<configuration>
<config>
<add key="repositoryPath" value="/path/to/where/you/want/it/to/go" />
</config>
</configuration>
However, (a) NuGet still puts DLLs in different directories, so there is still no single place for fsharpi to find them. (b) Anyway fsharpi doesn't honor $MONO_PATH, Mono's canonical way to add to the DLL search path.
The closest I've come to a workable solution for fsharpi is:
Whenever you nuget a package, manually add it to MONO_PATH (say, in ~/.profile). E.g., supposing you told nuget to put stuff in /opt/nuget you would add:
export MONO_PATH=$MONO_PATH:/opt/nuget/MySql.Data.6.8.3/lib/net45
Whenever you run fsharpi, explicitly feed it $MONO_PATH:
fsharpi -I:$MONO_PATH
If you feel adventurous you could then patch the fsharpi script to automatically include $MONO_PATH.
I find that this is not worth the effort. Simply constructing a script that starts fsharpi with the options you need for whatever you're currently working on is a much more practical solution.
I'm an F# programmer on a Mac. My life is like an illicit love affair with someone married: I endure all the little slights because my heart leaves me no choice.
The most common use I see is
mono nuget.exe install mysql.data -OutputDirectory packages -ExcludeVersion
Which would install in your project's directory (generally you ignore the packages directory in your repository however and just restore it with a script) and you'd then find it at packages/MySql.Data/lib/net45
Downloading nuget to your repository is also common.
You can always write your own script to do the the fsharpi hookups you want, nuget has a lot of convention, so it's possible to pick the right dll from lib/*/ for your purposes
And it's possible to do it with an fsharp script, here's an fsx script that can be executed directly, it downloads nuget, installs from nuget, and then executes another script (with fake not fsharpi, but that's totally possible.

How to use Mercurial in side Eclipse Helios (3.6)

I am using Eclipse Helios (3.6). I want to use Mercurial for version management of the program. I have take the help of the below link to find out the plugin but not got any success:
Mercurial Eclipse Plugin
Can any one please help to install Mercurial plugins inside my Eclipse and I also don't know how to use also. I have gone through the video also but not clear.
http://www.youtube.com/watch?v=9OBg6Zv0Tns
My question is that I want to use Mercurial in my project for version control. I know what Mercurial is, but don't know how to use it.
I want to know what is the initial setup that I have do if I want to use Mercurial set up in my project.
When I am trying to add new software It is giving me following error.
the 'Duplicate Location' error message in your screenshot would indicate that there is already an update site setup for that URL.
In the screen before doing the 'add repository' look at the list of current update sites and you may find one for Mercurial already. Make sure it is selected and a list of all the features for that update site will be listed for you. Then you can select the MercurialEclipse and MercurialBinaries features and install then in Eclipse
The Mercurial Eclipse homepage is here: http://javaforge.com/project/HGE.
They have installation instructions there:
[...] you can get the plugin easily using the Eclipse Update Manager, just click Help → Software Updates in Eclipse. The Eclipse Update Site for MercurialEclipse is available at this URL:
http://cbes.javaforge.com/update
If you are not familiar with getting new software and updates to Eclipse, please read this article.

What are the requirements for using Mercurial with Netbeans?

Background:
I want to check-out the source code from Cliche, which is stored in a Mercurial repository. I use NetBeans 7 with JDK 1.7 on Windows, but have no experience with Mercurial. I only want to get the source code, further usage of Mercurial is not required.
Question: What software / plug-in, etc. do I need to install, if any, to perform the above task?
You will find the installation process and first checkout in: "Mercurial User Guide".
(You need to install Mercurial itself first)
And more on Mercurial used from Netbeans on "NetBeans + Mercurial Training".