TFS api - candidates excluded by file extension - api

I am trying to import a set of files into TFS using the API. The method Workspace.GetPendingChangesWithCandidates excludes files that match the globally ignored file extensions (.dll, etc). How can I get these files from the API so that I can PendAdd them?

I found an answer but I think it's a kludge. You can edit the LocalItemExclusions.config file found here:
C:\Users\%username%\appdata\local\microsoft\team foundation\4.0\configuration\versioncontrol.
Ultimately, I think the ignored files should be overridden from the API, but I can't find such an option.

It is an older question, but this may help others: Another way to get files recognized as candidates is to create a file called ".tfignore" within the workspace that enables globally filtered files again.
# Do not ignore .dll files in this folder nor in any of its sub-folders
!*.dll
More details can be found here
MSDN: Add files to the server - Customize which files are ignored by version control

Related

Rapidoid custom config file is ignored

I'm very new to Rapidoid and I'm experiencing problem with initial configuration of the application. I'm using Rapidoid 5.5.5 with following Rapidoid modules defined in pom:
rapidoid-commons
rapidoid-http-server
rapidoid-web
Java 11 is used to run the application.
I've prepared a custom config-develop.yml file where I've changed value for port to use from default 8080 to 18888 and added some menu items in gui: section however when I start application none of my changes were used: generated log does not have any data about accepting/use of parameters from my file and configuration files are the files that are included into rapidoid-commons Maven artefact.
Also, the log shows that classpath used is limited to /target/classes folder (I'm using Maven as build tool). So, these are my questions:
What are the rules for merging configuration information when multiple config-*.yml files are present in search path?
How I can tell Rapidoid to ignore some configuration files?
Is it possible to specify explicit name for configuration file as part of initialisation process?
I'm happy to provide additional information if this will help to find an answer to the questions above.
With best regards,
Nick

Does middleman s3_sync ignore .txt files by default?

It looks like middleman s3_sync doesn't upload my robots.txt. Is there a way to enable it to always upload a specific file?
It depends on the version of Middleman S3_Sync that you are using.
Versions 3.0.x build the list of files based on the content of the build directory. In that case, copying the file into the build directory will include it in the sync.
Versions 3.3.x moved to the Middleman sitemap in preparation of MM 4. It currently only syncs the files that Middleman is aware of. Copying a file into the build directory doesn't make S3_Sync aware of it.
In the second case, there are two options available.
The first one is to move robot.txt to the source directory. This will include it in the sitemap and it will be sync'ed.
The second is to open an issue (or even better, a pull request) that will ask for the ability to include files that originate from outside of the source directory.
It would help to get the version of Middleman and s3_sync that you are using.

Proper approach to sharing CMake module across projects?

I have written a CMake module that contains a couple of useful macros that I would like to use across a number of other CMake projects. However, I'm not sure where to put the module.
I would like to be able to do this inside each project that uses the macro:
include(MyModule)
However, I'm not sure if there is an easy and cross-platform way of achieving this. In fact, I can't even get it to work on Unix. I put the module (MyModule.cmake) in the following locations:
/usr/lib/cmake/
/usr/lib/cmake/Modules
/usr/local/lib/cmake
/usr/local/lib/cmake/Modules
...and the project with the include() was unable to load the module.
What is the correct location for this module? Is there a better approach?
I should also point out that the macros are not related to "finding" a third-party library and therefore have nothing to do with find_package().
Put the module in a directory of your choice, and then add that directory to CMAKE_MODULE_PATH using list(APPEND).
You can even host that module somewhere and then download it via file(DOWNLOAD). If you download it to the same directory as the current CMake script being processed, you just include(MyModule.cmake) and don't need to modify CMAKE_MODULE_PATH.
You could download the file to a common location on disk and then add a check using if(EXISTS "${module_location_on_disk}") to skip the download if it's already downloaded. Of course, more logic will be required if your module changes, or you want to have a common location and multiple versions of the module, but that's out of those scope of your question.

Variable that refers to the project directory in Qt Creator?

I'm working on a cross-platform Qt application and the paths are different on Mac OS X and Windows. Since the project is on an external hard-drive, the drive letter also occasionally changes on Windows.
For that reason, I would like to refer to the project directory using a variable, preferably a built-in one. In particular, is there such a variable usable in:
The .pro file?
The build settings (in the Projects tab)?
To complete, #Bill's answer, the way to refer to the source path in the Build Settings is to use %{sourceDir}.
%{buildDir} is also available.
Since I struggled a bit to find it, I'm adding it here.
In addition to %{sourceDir} and %{buildDir}, you could use %{CurrentDocument:Path}, %{CurrentDocument:FilePath} and %{CurrentProject:Path} to refer to specific files and folders in the project directory.
The built-in _PRO_FILE_PWD_ variable contains the path to the directory containing the project file in use. That variable may be useful for you.
There are problems with $$_PRO_FILE_PWD_ on windows, because it contains forward slash allways. You need to fix slash using shell_path.
$$shell_path($$_PRO_FILE_PWD_)

Nuget: Is there a transformation token available to get the location of the package tools folder?

I am trying to use Nuget to distribute a ms build .targets file. I need to modify some elements of the file to include the installed path of a few assemblies. For that I would like to use the tools folder. I am having a hard time finding the token (if it exists) to do the replacement. Has anyone encountered this problem or know of a workaround?
http://docs.nuget.org/docs/creating-packages/configuration-file-and-source-code-transformations
You'll have to go the PowerShell route to get this done, as no transform exists AFAIK. The init.ps1 file can process some parameters provided by the NuGet VSIX.
Simply add the following to the top of the init.ps1 file and use the $installPath variable in your scripts that modify the file content.
param($installPath, $toolsPath, $package, $project)
Check here for an example usage.