Mercurial Eclipse Error - eclipse

I am trying to use mercurial in eclipse. I downloaded mercurial eclipse plugin for this.
But, despite I had reinstalled it many times, it gives the same error, I put the screenshot below.
Checking encoding (cp1254)...
Checking extensions...
Checking templates...
Checking patch...
Checking commit editor...
Can't find editor 'notepad' in PATH
(specify a commit editor in your configuration file)
Checking username...
1 problems detected, please check your install!. Command line: hg -y debuginstall
I do not know how to handle this. Any help will be appreciated very much, thank you.

I encountered the same problem when I tried to run Eclipse x64 on Win 7 x64. The MercurialEclipse seems not able to access C:\windows\system32\ folder, although it has been specified in system PATH.
You need to specify the location of editor in the Mercurial.ini file. This file is located at c:\Users\<your_username>\mercurial.ini.
Under the username = ... line, add a line to specify the editor (see following). Remember not to put quotes around the path.
[ui]
username = <username>
editor = c:\Windows\System32\notepad.exe

(Note: similar to bug 13505 in Mercurial Eclipse project)
The Eclipse inherits the path from your current session.
Open a DOS session, and check if said session does have notepad in its path (which it should considering notepad is in C:\Windows\system32\notepad.exe). Make sure C:\Windows\system32 (or %SystemRoot%\system32) is in first position in your PATH (in case of side effect with other paths with spaces or special characters in it).
If the path is correct, then launch the eclipse from that command-line DOS windows, and see if the problem persists.
The OP emre reports its %PATH% being:
C:\Program Files\NVIDIA Corporation\PhysX\Common;
C:\Program Files\Java\jdk1.6.0_20\bin;
D:\eclipse-java-helios-sr1-win32\eclipse\android-2.2_r0-windows\android-2.2_r0-windows\tools;
C:\Program Files\Java\jdk1.6.0_20\bin
In other word, no %SystemRoot%\system32.
You need to edit the System variables in the Environment variable settings of Windows, and add in the first place in the PATH variable:
%SystemRoot%\system32
Then you can open a new DOS session, launch eclipse from there and ot should work fine.

i had the same problem and searched for hours till i tried to escape the backslash in the path for the editor.
so i edited the mercurial.ini (on my win7) like this:
[ui]
username = <username>
editor = c:\\Windows\\System32\\notepad.exe
and it worked.

Three additions:
It seems that Tortoise HG 3.3 configuration utility added my editor
setting to [tortoisehg] section rather than the [ui] section of
mercurial.ini For Eclipse Mercurial to work, the editor path must also be in
the [ui] section. Otherwise, eclipse will have this error.
using forward slash suitably substitutes for the escaped backslash
On Windows 8.1, notepad easily starts from the command prompt (on
system path) and yet the error above still occurs. In my hands the
general system path advice given above seems off target

One other thing to look at is the HGEDITOR environment variable, which overrides the editor setting in mercurial.ini. I had HGEDITOR set to C:\Windows\System32\notepad.exe, which didn't work (due to the unescaped backslashes), and all my changes to mercurial.ini were ignored. Changing HGEDITOR to C:\\Windows\\System32\\notepad.exe finally got rid of the Mercurial Eclipse errors.

Related

vscode can't find buildifier on remote instance

I'm bumping into a weird vscode issue. I use vscode to ssh into my EC2 instance. I primarily use bazel as the dependency management and build system for development. I installed buildifier, and included in my path variable however vscode still doesn't detect it. If I type buildifier <some bazel build file> in the terminal in vscode, it works perfectly, but if I try to use the formatting shortcut on the file using vscode, it doesn't. I went to the extension settings, and in the remote settings I explicitly put buildifier as the executable command. Still not working. Any help would be appreciated.
Thanks!
It's likely that the path you've set is set somewhere that the vscode remote server isn't looking. So it might be in your shell path but not the vscode remote servers path when it starts up.
As a workaround find the full path of buildifier e.g.
whereis buildifier
Then simply copy past the full path of buildifier into your settings under the Bazel: Buildifier Executable section.

Git Bash wit Visual Studio Code: how to set permanent PATH

I'm using VSCode with git bash and minGW. Every time I restart VSCode the PATH is reset to default. I add my path to mingw with export PATH=$PATH:/c/mingw/bin
How can be permanent changed? I created .bashrc in my code folder but it doesn't works
Thanks
Search for "path" in the windows control panel. you can then "edit the system environment variables". You can edit it in to the system path.
You will need to restart VSCode after you change it, then it will be there every time..
Note that in the future this may cause problems if you have a separate version of something using mingw dlls.

Editing netbeans.config to set jdk path results in an error

Hi I recently upgraded to windows 8.
For some reason after I installed netbeans it did not point to my instalation of jdk.
I had this problem before under windows 7 and I modified the path by editing the netbeans.config file.
I tryed to do the same thing but for some reason when I try to save the file in notepad++ I get an error stating that the file is opened in another program.
I tryed doing the same with wordpad an there I got the error that access is denied.
I restarted my computer two times same problem still persists.
Is there any other way of setting the path for the jdk?Maybe from any of netbeans option?
i was trying to this but that didn't work for me cause i need privileges..
My solution:
Just open notepadd++ as Admin and then you can do whatever you want..
If that doesn't work, delete the file and then create a new one with the same content(don't forget to run notepad++ as admin)
copy the content of netbeans.confg
delete it
create new file with the same name
past and perform your edit
Make shure netbeans isn't open when you edit the config file.
If setting of netbeans_jdkhome in the netbeans.conf doesn't work, you can outcomment it (insert a # before). Now netbeans will use the default JDK installed. However, you a proper path for java is required (and JAVA_HOME).
Its also possible to set the JDK by commandline argument: --jdkhome <dir>
See:
Setting JDK by command line
Netbeans.conf - see JDK part

eclipse --launcher.ini switch

We're using a shared installation of eclipse (RAD 7.0, under Citrix). We need to allow each developer to provide a local copy of eclipse.ini. The "--launcher.ini" command line switch should allow us to do this, but I haven't been able to get eclipse to recognize the local copy of eclipse.ini. The behavior I'm seeing is consistent for both RAD 7.0 and Indigo (which is faster to test).
To test this, I used a non-shared Indigo installation and created a local copy of eclipse.ini in C:\Temp and added the "-showlocation" switch as the first argument; testing this in the default ini file correctly displays the workspace path in the title bar when eclipse opens, so you know immediately if the local eclipse.ini has been processed.
The eclipse documentation shows the format of the switch as "--launcher.ini {location}". I've tried modifying the desktop shortcut with every combination I can think of: quoted vs. unquoted, full path vs. folder name only, " ", "=" and ":" to separate the argument value, and in no case did eclipse find the local copy and display the workspace name in the title bar.
Can anyone suggest why this switch apparently isn't being recognized, or provide a working example? And if you have experience passing this switch via the Citrix "/param:" argument in a Citrix desktop icon I'd REALLY appreciate seeing a working example.
I tested it by adding the following to my eclipse.ini:
-name
OriginalINI
and then my copied eclipse.ini had:
-name
CopiedINI
-name effects the "window" name of the splash screen, so it's shown on startup. Starting up normally the splash screen window showed the original name. Starting up with the below command and it showed the copied eclipse.ini name:
eclipse/eclipse --launcher.ini $(pwd)/eclipse.ini
I found out that the "--launcher.ini" works on Vista only, if there are no other arguments to the launcher. E.g.
eclipse --launcher.ini myOther.ini (works)
eclipse -console --launcher.ini myOther.ini (doesn't work on Vista)
eclipse --launcher.ini myOther.ini -console (doesn't work on Vista)

How to change the line ending used in Netbeans

Netbeans has this wiki entry on line endings: http://wiki.netbeans.org/FaqEditorEOLs
But it isn't very useful. It just says that you shouldn't develop on different OS and that's that...
In my situation however, I have no power over it. I'm on a windows machine and the PHP app I'm working on needs to end with the UNIX EOL.
There does not seem to be an option to set this for new files. Can anyone tell me where to set this?
Just saw that you can set this as a command-line startup flag: -J-Dline.separator=LF
I haven't tested this myself but I'm looking for ways to bake this into the configs somehow.
Since, a specific plug-in came out: http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=36810
I also like #JimLewis suggestion but I work on Windows with a linux virtual machine thus in some cases the versioning system line ending cannot help.
[update 201709]
I no longer use netbeans (sorry, but I need python support and it's too buggy) and almost no longer develop on windows, but #marinos-an in a comment suggests https://github.com/welovecoding/editorconfig-netbeans which uses a common setting file that can be picked up by multiple editors through plugins. Definitely interesting to try since the settings file is committable!
Have you considered managing the line endings at the version control level? Subversion,
for example, lets you set an "eol-style" attribute with values "LF", "CR", "CRLF",
and "native" (which translates the line endings stored in the repository to whatever
is appropriate for the platform where the files are being checked out, and converts
the other way when you check in.)
Please use following Netbeans Plugin
http://plugins.netbeans.org/plugin/36810/show-and-change-line-endings
fentie's answer solved my problem with line endings, as pasting multi-line MySQL from NetBeans into the MySQL command prompt caused errors.
To pass this argument to NetBeans every time it opens, add it to the netbeans.conf file:
/Applications/NetBeans/NetBeans\ 7.1.2.app/Contents/Resources/NetBeans/etc/netbeans.conf on OS X.
From the NetBeans Mac page under Tips & Tricks.
When I pasted multi-line SQL statements from NetBeans to the MySQL command line client on OS X or a remote Linux server, MySQL would list all possible command choices, give me some strange '> type of prompt and I was forced to hit Ctrl+C and log back into MySQL again.
For my Netbeans 12.6
I found a pluging called "Change Line Endings on Save"
https://plugins.netbeans.apache.org/catalogue/?id=31
more details are there
https://github.com/junichi11/netbeans-change-lf
once pluging installed you can configure EOL in there:
Tools > Options > Editor > Line Endings