TeamCity commits changes on every save when "Versioned settings" is no - teamcity-9.1

Is there a way to tell TeamCity 9.1 to commit settings only if I explicitly ask it to?
When I turned on "Versioned settings" feature and kept fiddling with other settings TeamCity created a commit every time I clicked Save button.

The description is pretty clear on what this feature does:
On this page you can enable synchronization of the current project settings with the version control: if the project settings are changed, the affected configuration files will be checked in to the version control;
if the configuration files are changed in the version control, the changes will be applied to the project.
The problem with the "Versioned Settings" feature that is that it creates too darn many commits. There should be an option to add a "quiet period", like when you add a VCS checkout trigger.

I tried just turning off Versioned Settings for now, then re-enabling it when I wanted to commit anything. It sort of worked, but at some point it couldn't resolve differences between the (newer) config on the server and the (older) config in VCS. So I just deleted the config from the VCS and started sync from scratch.

Related

How to prevent Intellij from creating a temporary run configuration and automatically switching to it

Intellij will create a greyed-out run configuration every time I execute an unsaved run operation from some menu, be that run a unit test, run a maven build, or some other execution from a menu item (there are a lot of ways to get a temporary run configuration).
These unsaved configurations are automatically switched to. Running anything changes the run configuration dropdown box at the top of the IDE, but I never asked for this behavior.
Is there a way to disable the automatic switching? I want to maintain my selection of the run configuration always and forever, amen. Stop Intellij from switching it for me.
Is there a way to disable the automatic creation of temporary run configurations, altogether? I never want to be bothered with temporary items in the run configuration inventory that I later feel like I need to clean up. Removes the clutter by never creating them in the first place.
2021.1 version no longer has this setting, issue reported.
As a workaround you can close the project and edit .idea/workspace.xml file manually.
Under <component name="PropertiesComponent"> node add/edit the following:
<property name="recentsLimit" value="0" />
For 2020.3.x and earlier versions:
Run/Debug Configurations | Templates | Temporary configurations limit: 0.
Now, you can find it in Settings | Advanced Settings | IDE

LPCXpresso started rebuilding my entire project every time I do a regular build

LPCXpresso has been working fine, up until some point where it just starts to rebuild the entire project every time a build or debug is initiated.
Is there a simple way to fix this broken behaviour and make it start building correctly again?
Was having the same problem. Did basically the same correction as listed...
project -> properties -> C/C++ Build. Then Refresh Policy tab and "Add Resource" button. Select the top level project. Clean and rebuild. This fixed the issue for me.
Here is what has worked for me - I am not sure if all steps are really necessary:
clean all projects (Project->Clean...->Clean all projects, don't start a build)
Close LPCXpresso
delete .metadata folder (maybe make a backup)
delete the Debug and Release folders from every project in the workspace
Open LPCXpresso - there will not be any projects in your workspace
import the projects: right click in the project explorer->import->general->existing projects into workspace
click browse next to "select root directory" and click ok (this selects the workspace directory)
Select the projects you need and click finish
build each project individually by right clicking on them in the project explorer and selecting "Build Project" (build the projects in the correct order of dependencies)
You will need to recreate the debug target, make sure that "build configuration" is set to Debug, and select "enable auto build"
This worked for me, but I am not sure what the magic step is/was. Good luck!
Additional Info
Sure enough, the problem came back, as it always seems to do. I did a lot more digging and stumbled upon this blog:
https://mcuoneclipse.com/2015/06/06/eclipse-project-refresh-policy-broken-incremental-build-with-external-make/
The crux of this is: if the setting for "Refresh Policy" under Project->Properties->C/C++ Build/Refresh Policy is set wrong, then incremental build may be broken and you may get full rebuilds.
In my case, I had started a long time ago with a demo project and renamed it at some point in time. The refresh policy tab had one resource listed, which was the original project folder name.
I deleted that resource, then clicked Add Resource... and placed a check mark next to the top level project folder.
After cleaning things and rebuilding, now the issue seems to be fixed!

IntelliJ and sharing the project files in VCS

I am using IntelliJ and after very long time I was not able to figure out, what IntelliJ specific files should not or should not be in VCS. I have a project which has different running configurations among various commits, so everytime when I checkout the project from different branch, I have to adjust the Running/Debug configurations. Jetbrains does not recommend to put workspace.xml in VCS because it could contain user-specific settings, however this information about Run/Debug configurations IS stored here! It would be 10x smarter to store in IML file (IntelliJ project file). How do you solve this?
In the run configuration dialog (top right corner), there is the "Share" checkbox. If you mark a run configuration as shared, it will be stored in a separate file under .idea and not in workspace.xml, and you'll be able to add it to the version control system normally.

Can I commit and share VM options in IntelliJ?

To execute my application, or run or debug unit tests, I need to enable various VM options, include -javaagent:<aspectjweaver-path> or -Djava.library.path=<some native lib path>
I can see how to change these configurations manually in IntelliJ IDEA under "Edit Configurations..."
What, if anything, do I need to check in to my VCS to share these settings with other members of my team, and ensure they pick them up automatically whenever someone changes them in the VCS?
Alternatively is there a way to set these automatically in IntelliJ without even touching the edit configurations? Especially the aspectjweaver. When I build/test my project from the command line using maven this is all handled for me by specifying argLine arguments to the surefire plugin, but IntelliJ doesn't respect these settings. Perhaps there are alternative plugins that can help me out?
First, you need to share your run configuration. It's simply done by checking the Share box right to the configuration name in the run configuration dialog:
Your run configuration will then be saved to .idea/runConfiguration (or whatever your settings folder name is).
From Jetbrains Web Help:
If this check box is selected, the run/debug configurations become available to the other team members.
The shared run/debug configurations are kept in separate xml files under .idea\runConfigurations folder, while the local run/debug configurations are kept in the .idea\workspace.xml.
This field does not appear for the default run/debug configurations.

ClearCase not working via Intellij Idea

Intellij Idea 12.1.4, Windows 7 Professional.
It seems bundled ClearCase Intellij Idea plugin not working at all. When I try to checkout(or type sth. in a file which is not checked out or hijacked) Idea says:
Cannot edit file(s): cleartool: Error: Not an object in a vob: {File path}
Actually this is an error that I am expecting because I couldn't find any ClearCase configuration that I can type my user name and password in Intellij Idea:
That's why it doesn't know where to connect and retrieve data. So question is, where are the correct configurations? Should I prepare a script for SCR text file or is Intellij Idea plugin useless?
Try first to fall back to cleartool (the ClearCase CLI -- command Line Interface), and check if your view is correctly configured.
cd /path/to/your/file
cleartool ls
That will allow you to see the config spec selection rule for that file.
And that will give you a clue for that "Not an object in a vob" error message: maybe the issue isn't in the plugin, but in your current view.
I know this is a contrite answer but the best advice really is: Don't use ClearCase.
Save your organization the headache and make the effort to switch over.
Anything will do, even svn.
Go to Settings, click on "Version Control". In the right-hand pane you need to add a Directory/VCS configuration tuple. Do this by pressing the green PLUS (+) icon.
Select "Project" and select "Clearcase" as Source Control tool. You should now have a context menu item "Clearcase" in your IDE and can check out files by right-clicking on the file. One small disadvantage in my Intellij 12.1.6 is that he only sees the change sets (Activities) that were created using Clearcase Explorer... (only loaded at startup time of Intellij). So you cannot add new change sets that will be propagated to Clearcase.