Intellij 11.0.1 seems to be ignoring my .hgignore file - mercurial

I have the following .hgignore file that should keep Intellij's constantly changing internal config files from polluting our source control.
syntax: glob
.idea/*
target/*
logs/*
out/*
myapp.iml
myapp-web.iml
Tortoise and the command line seem to respect the fact that files like ".idea/dataSources.xml" are not meant to be added to source control but intellij's hg4idea are constantly asking if I would like to add files like ".idea/dataSources.xml" to source control.
Is my .hgignore file just wrong or is there a bug in Intellij?

It's a known bug, please vote. As a workaround you can ignore files in Settings | Version Control | Ignored Files.

To add files to the IntelliJ ignore list go to:
Settings
Version Control
Ignored Files

Related

Setting up Prettier on PhpStorm 2019.1.3

I have Prettier enabled in the plugins. The question is simply, where are these settings? Folder permissions or what? The picture where they are showing is from the intellij-support website. The picture with the question mark is with the settings on my PhpStorm
A possibility to run Prettier on Save has been introduced in PhpStorm 2020.1; if upgrading the IDE is not an option for you, I can only suggest setting it up as a file watcher in in Preferences | Tools | File Watchers and make sure that Auto-save edited files to trigger the watcher (https://www.jetbrains.com/help/webstorm/2019.1/using-file-watchers.html?section=Windows%20or%20Linux#ws_filewatcher_advanced_options) is disabled
So, basically, if you want to use Prettier with PhpStorm 2019.1.3 you need to install it with npm like this jetbrains.com/help/webstorm/2019.1/prettier.html and setup the configuration of it in the package.json under "prettier" key. Then you have to right-click on the file and select "Reformat with prettier". Maybe you can set hotkey for Prettier somewhere, the default ones do not work for me for some reason. If you want your code to be automatically formatted on save you need to install this plugin: https://plugins.jetbrains.com/plugin/7642-save-actions/versions "Save Actions". I installed 2.2.0 because it has support for 2018+.Then - because I couldn't find the place where you can change default formatting tool to "Prettier" you can setup the configuration under Settings->Editor->Code Style->choose the language you desire and then configure it. Could not find a way to setup prettier without json config or after setting it up to make it work on "Save" action. Answering this just because it might help somebody somewhere.

How to delete past working directories in Octave GUI?

Does anyone know how to delete those past working directories in Octave GUI? They are very annoying and useless.
I see from your image that you are on windows.
I don't know the equivalent directory on windows, but on linux, this information seems to be stored under ~/.config/octave/octave-gui.ini, in a section called current_directory_list which you can edit and clear of all unwanted entries.
See if you can find the equivalent folder where this octave-gui.ini file is stored on windows; it may be in an AppData/Local directory, or in the octave installation folder itself...
PS: In the same directory I also had a qt_settings file which seems to mirror some of this information, but I think this may have been from an older octave installation.
In addition to deleting the file path from octave-gui.ini, try removing the path from .octaverc file as well. This will remove the warning you see at launch if the path no longer exists.

How to disable version control in phpstorm?

I am playing around with phpstorm and somehow I activated version control. I don't need it. Now all my tabs are different: orange text on gray background. All files in the file view are orange. How do I disable version control?
Go to Settings -> Version Control and remove the folder from which you would like to remove version control tracking (coloring tabs etc.) It will naturally not remove version control from your project (as in deleting the .git/ folder for instance).
The ultimate way is to disable all version control plugins (under Settings -> Plugins): CVS Integration, Git Integration, GitHub, hg4idea, Perforce Integration, Subversion Integration. After restarting PhpStorm Settings -> Version Control tab will be gone.
Note that this will disable version control for all of your projects.
You can just remove vcs.xml from .idea folder and then restart PhpStorm
In phpStorm 2022.1.3+, go to
Preferences > Version Control > Directory Mappings
Then remove the directories you don't want to watch, as Greg suggested.
Go to Settings -> Version Control and remove the folder from which you would liek to remove version control.
I have not enough reputation to +1 Greg's answer or comment, but... for those who are interrested : the same goes for Webstorm.
I had this problem and I used from 2 of notes in these answers in these page together.
As Greg has mentioned in one of replies, your git repository is in .git sub directory inside directory that you want to manage it with version control system. When you define a git repository, PhpStorm automatically generate it and with creating this sub directory, it adds a file for handling mapping between itself and version control system. It calls vcs.xml and it's located in .idea sub directory.
It's not enough to remove only .git directory. When you remove .git, you will get an error in PhpStorm every time that you open your project due to not matching vcs.xml for mapping between PhpStorm and git repository of your project. So after removing .git directory, you must also remove vcs.xml files from .idea and now you won't have any error or warning in your PhpStorm.
It doesn't need to restart PhpStorm at all and after this, colors of all of files that was mentioned in questions return to normal colors in PhpStorm.

Mercurial (TortoiseHG) won't commit after manually deleting some files

I removed some database files from my project using the search function in Explorer. After that Mercurial complains that it cannot find the files an refuses to commit. I tried using the shelve tool, but I run then in a bugreport for version 2.5 of TortoiseHG stating that the node holding the database file could not be found.
'
How do I solve this?
It it possible you deleted not only the files in your working directory but also down in the data store itself (.hg/....)? It's possible to do that if you search indelicately in explorer. Here's the command line equivalent:
ry4an#four:~/projects/unblog$ find . -name '*.xml*'
./static/attachments/2005-09-22-isle-royale.gpx.xml
./.hg/store/data/static/attachments/2005-09-22-isle-royale.gpx.xml.i
It is entirely safe and okay for me to delete that .gpx.xml file, but if I deleted every file with .gpx.xml in the name then I'd be deleting the file from the store and corrupting my repository.
Try running hg verify in the repository and see what output you get.

How to ignore the .classpath for Eclipse projects using Mercurial?

I'm trying to share a repository between my Mac (laptop) and PC (desktop). There are some external dependencies for the project that are stored on different places on each machine, and noted in the .classpath file in the Eclipse project. When the project changes are shared, the dependencies break. I'm trying to figure out how to keep this from happening.
I've tried using .hgignore with the following settings, among others, without success:
syntax: glob
*.classpath
Based on this question, it appears that the .hgignore file will not allow Mercurial to ignore files that are also committed to the repository. Is there another way around this? Other ways to configure the project to make it work?
The file must not be already commited to be ignored (as you noted in your question), other wise a 'hg remove -Af .classpath' is required to remove it from the repo without removing it from your local working tree.
And:
syntax: glob
.classpath
should be enough (no '*' needed)