AccuRev is ignoring my .acignore file - accurev

I have an .acignore file that looks like this:
**\build
**\build\**
**\.gradle
**\.gradle\**
My file structure is as follows:
AccuRev Workspaces
.accurev
Workspace1
Workspace 2
I placed my .acignore file into the .accurev folder under AccuRev Workspaces and restarted AccuRev. It didn't start ignoring any of the files that I expected it to (and they are all external). I then put it directly under the AccuRev Workspaces folder and restarted; still no luck. I even put it in both of those places under an individual workspace and it didn't work. I'm at my wits' end. What is going on here????

The .acignore file must be in the workspace top directory. In other words, you would need an .acignore in the Workspace1 directory and another in Workspace2. This allows you to have different ignore rules for each workspace. Alternatively, you could add it to source control if you have standard ignore rules applicable to all workspaces.

Related

PhpStorm automatically ignore files from .gitignore

I'm new to PhpStorm, and I'm trying to get it to automatically ignore files specified in my .gitignore file when adding a file tree to git. I know you can add ignore rules to PhpStorm itself, but I want it to use the rules from my .gitignore file.
Basically I already have a .gitignore file with ignore rules, I just want PhpStorm to follow those rules when adding files (git add) so that none of the files matching the .gitignore rules will be accidentally added to a commit.
I know in the past this has happened to me as well, so it seems a bit fragile. I never do a git add for the entire directory since it has done things like add files in the /vendor directory (which is always in the gitignore file).
But having said that, I was curious, so I did a test as I think it might be related to when things happen (like when git is engaged, or when the .gitignore is added).
I did the following steps on a new project and it worked appropriately, so maybe that will help, you can give it a try and see if it works for you as well. I am working with 2016.1.2
Create the project
Select VCS...Enable Version Control Integration and select Git
Create the .gitignore in the root directory
In the project, create a new directory called ignore
In the .gitignore, add ignore/ and the ignore directory should turn light gray
Create a.txt in the root directory
create b.txt in the /ignore directory
right click on whole project and select git add and b.txt under the ignore directory is not added, but a.txt is

Jetbrains - Include ignored files when committing

I'm working on quite a large modular project in Webstorm. The js code is compiled with Babel to ./dist folder, so are the assets like html templates and other files.
I would like to EXCLUDE ./dist since when I do a global search of "Navigate to Symbol/Class/etc", I don't want results from ./dist to be shown, so I mark the ./dist folder as excluded.
BUT due to the workflow and the modularity (projects are modules loaded with jspm), I need to commit changed ./dist into VCS (Git). This is our workflow and I can't do anything about that.
The problem:
When I click "Commit changes" I don't see the newly changed files in ./dist when I exclude this folder. Clicking on "Refresh changes" doesn't help.
Can I solve this issue somehow?
UPD
The ./dist directory is NOT in .gitignore
You shouldn't exclude this directory from vcs, if you want or need to have it under version control. But for setting the directory, where IDE shouldn't search, you should set up IDE.
You have to remove your directory from git ignore or what ever, and set up ContentRoot in your IDE. I'm using PhpStorm and IntelijIdea, but the settings are common for all JetBrains Products.
Here is the part of JetBrains instruction :
To have files or folders excluded by name
1. Do one of the following: – Open the Settings dialog box, and click Deployment, then click Options below the Deployment node .
– Choose Tools | Deployment | Options on the main menu.
2. In the Options dialog box that opens, specify the patterns that define the names of these files and folders in the Exclude items by name text box. Use semicolons as delimiters. Wildcards are welcome.
The exclusion is applied recursively. This means that if a matching folder has subfolders, the contents of these subfolders are not deployed either.
So , you can read this : exclude files and restore the settings, and after that, use the next link, to set up the root directory.
Here is the instruction from JetBrains : JetBrains-Content Root

Force IntelliJ to use another Home Directory?

I have read this... it does not answer the question.
I would like to have IntelliJ use another location for all of my project files. Currently, it goes to c:\users\ as a default project location.
I want to change that to c:\git.
I tried to change the "Start in" link properties, to no avail.
I don't want to force all of the configuration (ie: the .IdeaIC15 folder) to be relocated, I just want it to go to c:\git when I click "Open project".
To change the directory where project files are located to C:\git:
Select Help->Edit Custom VM Options...
Add the following line to the end of the file that comes up in the editor (*):
-Duser.home=C:\git
Restart IntelliJ.
(*) The file that comes up in the editor will either be idea64.exe.vmoptions or idea.exe.vmoptions.
Notes:
This will update/create a .vmoptions file in your config directory. It does not modify the vmoptions file in your install directory.
The above steps do not change the default directory that is used
when cloning git repositories. This is the directory that is used in
the File->New->Project from Version Control->Git window. You
still need to set that directory to C:\git and clone one remote repo
into C:\git. Once you have done that IntelliJ remembers the directory and
uses it for subsequent clones.
https://intellij-support.jetbrains.com/hc/en-us/articles/207240985-Changing-IDE-default-directories-used-for-config-plugins-and-caches-storage
Locations can be changed by editing the following file:
IDE_HOME\bin\idea.properties
Follow the comments in idea.properties file to change the defaults, make sure to un-comment the lines defining these properties:
idea.config.path
idea.system.path
idea.plugins.path
idea.log.path

Multiple .npmignore files nested

I have a solution where I have 2 .npmignore files. One packages only the bare essentials for creating a project. The second is one directory hire and is intended to include everything beneath it.
What appears to be happening is when publishing at the higher level the lower level .npmignore settings are used. This gives me the wrong package.
Is it possible to specify which .npmignore file to use or at least tell npm to ignore any .npmignore file not in the root directory of where the publish is occurring?
Thanks,
Bob
You can't specify which .npmignore file to use. Every one in your directory tree is used, like you have discovered. However, if you need specific files allowed/ignored you can specify relative paths.

In IntelliJ, How Do I Fix "These Files Do Not Belong to the Project"?

I recently put several old, yucky git directory structures into one new, clean structure in SVN, then pulled the entire SVN repository back out into a new, clean, local git repository. One IntelliJ project was so messed up I had to import the old IntelliJ project, which created a new .iml file having a better name, and deleted the old .iml file. I reconfigured everything, committed back into SVN, and verified other people could open the project and build.
Today I tried to edit a file for the first time in this project and got the message, "These files do not belong to the project". IntelliJ offers to unlock the file or all non-project files in the current session, but both options sound wrong. What have I done to myself, and how do I fix it?
This happened for me when I ignored the .idea/ files. Just do
rm -rf .idea/
And then File -> Invalidate Caches/Restart -> Invalidate And Restart.
I figured out the problem. The file was still open from before all the shuffling, and was apparently pointing at the original file in its original location! I closed the editor and reopened the file from the project tree without a problem. I hope this helps someone else someday.
From File-> Repair IDE -> Rescan Project Indexes -> Reopen Project worked for me.
Had same problem on Ubuntu (Webstorm), got answer from Intellij.
There are no content roots in your project, so all your files are
treated as non-project files. As I wrote your .idea files are likely
broken, the .iml file and/or modules.xml are either missing or
corrupted. Deleting and re-creating .idea folder should help:
-close the project
-remove it from Recent projects list
-shut down the IDE
-delete the .idea folder
-restart, open the project root folder with File > Open
https://intellij-support.jetbrains.com/hc/en-us/requests/3779670?page=1
This also happened for me when I opened the project through a symlink (parent directory) or when the python interpreter was inside a symlink directory (because of virtualenv).
Reopening through the original directory tree (after fighting hard with the IDE to forget its beloved project settings), solved the issue.
It's probably listed in one of the XML config files in .idea/*.xml.
Just do a find of that folder for the name of the file in question, and remove the entry for it from the XML.
Mine was listed in .idea/workspace.xml within the following node: <component name="TypeScriptGeneratedFilesManager">.
I removed the option, then invalidated caches and restarted, and now the file is marked as a standard, non-generated file again. This way you can keep all your settings without exporting them and importing them.
Similar issue with WebStorm. The difference was I had to shutdown the IDE completely and then remove .idea folder
rm -rf .idea
I tried doing it with the IDE open and going to file File -> Invalidate Caches but that did not fix the problem for me.
Same problem. File was considered not part of the project even if I deleted it and created a new one with the same name.
To fix,I highlighted the project node in the left panel, selected "File/Invalidate caches and restart" from the top menu.
After the restart I had to set my file as a JS file (right click, set as JavaScript), close and reopen the project. All fixed.
For me the above did not help. I ended up going Project Structure -> Modules -> + at the top narrow middle column -> browsed through files to select the Project Folder -> apply -> ok -> all is done and working correctly.
My problem was much simpler than expected: I was trying to run a Jupyter notebook and got the error - because it was inside a folder that was marked "excluded" in the project structure.
Simply moving the notebook out of the excluded folder solved my problem.
In my case it was auto-generated .gitignore, I had entries like:
### npm ###
node
node_modules
frontend-dest
data/
And in project files I had java package called like com.company.test.data which matched last pattern. I strongly recommend to check it before removing .idea/ files and invalidating cache.
This warning is an IDE issue that Android Studio cannot recognise the current directory if it does not include any source files.
So, adding am empty source file, e.g empty_xxx.c under the directory in question and adding below line in CMakeList.txt
add_library(${TARGET_NAME_XXX} SHARED ${SOME_DIR_HAVING_THIS_WARNING}/empty_xxx.c)
will help get rid of this warning.
In my case the above methods didn't help, I just deleted .idea file in project and reset the Jetbrain IDE to default settings and it worked normally.
NB: You will loose all your settings and plugins, but if you don't mind this might help as the last resort like in my case.
I am using Jetbrain,
make sure to include all project files in the project. Use Settings -> project structure.
PyCharm > Preferences > Project > Project Structure > Add Content Root
Somehow PyCharm lost the project root directory in my case
For me it was because I had moved a project to wsl by copying the files from wsl to windows. When I switched branches the file must've been open from before and was the windows version of it and not the wsl one.
I noticed this finally by looking on top of the file tab and seeing the path as C:\User...\filename instead of \\wsl$....\filename.
Close your JetBrains IDE, then open a Terminal window and navigate to your project's root folder, and run these 2 commands:
rm -rf .idea
and then
rm -rf .git
NOTE: you'll probably have to connect your project back to your git repository, so if you have any uncommitted changes make sure to commit and push them beforehand to avoid losing them.