Environment: Ubuntu 14.04, TFS command line (TEE-CLC 12.0.1).
I made changes in a file from my local workspace. However, to discard my changes, I simply deleted the file with the hope that "tf get" will get me the latest copy. However, I am getting an error instead:
$ tf get
Conflict settings.cpp - Unable to perform the get operation because
you have a conflicting edit.
The merge can't complete because the existing file isn't available:
I figured I could force-update:
$ tf get settings.cpp /force
An argument error occurred: Unable to determine the workspace.
You may be able to correct this by running
'tf workspaces -collection:TeamProjectCollectionUrl'.
I would appreciate your help in understanding how to get back my file. Regards.
You are trying to specify the force option, but you are using Windows-style arguments. On Unix, files are separated with a / character, so you cannot use it as an argument, or it would be ambiguous whether you were specifying /force the option, or /force the file named force in your / directory.
Try:
tf get -force settings.cpp
Of course, if you are using a Local Workspace, or if you have pended the change, then you should just undo the change:
tf undo settings.cpp
Related
Symptom: Unable to start PlasticSCM.
Error: Root element is missing.
Full text of error: "the client configuration file "client.conf""
Actions:
I tried reinstalling. I have also tried running the configure command.
What to do?
You can try to delete client.conf with all GUIs closed so it rebuilds next start, its located in the hidden folder Users/youruser/.plastic4 (Mac) or Users/youruser/appdata/local/plastic4 (windows).
If the problem persists you can contact PlasticSCM support at support#codicesoftware.com
Solution:
Delete "client.conf" under "C:\Users\youruser\AppData\Local\plastic4"
Rerun the "cm configure" command and/or reinstall.
Those files are not deleted under reinstallation to not break the configuration between upgrades. Thus they have to be deleted manually.
There's a problem with TFS everywhere plugin for Eclipse if I try to revert or restore a file under a source control and if the folder/file is mapped to a different volume than the actual project.
When I try to restore or revert it, I get an error:
java.io.IOException: Failed to rename /Users/*/*/*/*/.tf1/8/d54f18aa-bdce-4ab7-958a-01eaaf0c36c1.tmp to /Volumes/macOSData/*/*/*/*/*/some_file.cs. Check the file and directory permissions.
Log has additional line:
2018-07-31 12:44:39,814 WARN [ModalContext] (com.microsoft.tfs.util.FileHelpers) Main rename failed (source permissions problem?), trying to rename temp file back
There's no problem while I get specific version of the project, even with overriding existing files, so there permissions are fine, at least for getting files. Also, this does not happen when the file is on the same volume as the local TFS mapping.
Setting all permissions to 777 does fix the problem, but this marks all files with +x making them all "changed", making this solution unacceptable.
I tried mapping the base folder to a second drive (i.e. force creating a .tf folder on a second drive), but this doesn't help. The error will appear when I try to revert stuff on the main volume.
I tried using symlinks so the mapping stays within the same volume, but still no luck.
Is there any way to solve this? Or everything should be on the same volume?
After a whole day of digging around and poking with jshell, this appears to be a bug with File.renameTo() in Java on macOS. renameTo function silently fails without any exception even though there's no permission issue to write to the destination. This happens only when writing to a different volume.
I have submitted a pull request into TFS Everywhere repo on github with a workaround for this issue.
Anyone interested can compile plugin with this changes to get things working:
https://github.com/Microsoft/team-explorer-everywhere/pull/276
In my vNext-build-definition I added a new build step: "cURL Upload Files". After a little while playing around with the syntax of the URL and optional arguments I finally accomplished it to reach my sftp-server in the right target folder - the connection works so far.
But when cURL tries to start the upload the log simply says:
curl: Can't open 'my-Subfolder/Another Subfolder/myfile.txt'!
curl: try 'curl --help' or 'curl --manual' for more information
Unexpected exitcode 26 returned by tool curl.exe
With "buggy" I mean the way of selecting files in the definition of the build step without any assistance for the user: Try 1:I can easily select files over the "..."-button - I can browse the folder-structure of my repository and select a file. Feels very normal. The folder is then written into the textbox "Files" - but without double-quotes although it contains spaces... This runs into an error because cURL does expectedly not understand the folder Name.Try 2:
Then I added the double-quotes by myself, but still I get the error above.Try 3:
Then I tried the syntax **/myfile.txt
Ahaa, this actually works!!... but this uploads all files in all folders that are named myfile.txt (the log tells me something interesting: curl is called by using another syntax with curly brackets: {"complete-path/to/my/filename"})
just in case somebody of the tfs-dev-team reads this: Another senseless link is "More Information" at the bottom of the step definition. It leads to a topic "Deploy: Azure PowerShell" - that has nothing to do with FTP-Uploads and it´s content is just "This topic hasn't been written yet.." :-(
So, I ended up now with the following possibilities:
1. Use the syntax **/filename (if you can live with the drawback that all files in all subfolders of the repo with the same filename will be uploaded, so better keep your filenames unique!)
2. Use another build step before and copy or move the file into the root folder of the repo, in order to use the file name only in the "Files"-TextBox without path information.
3. Forget cURL-build-steps: Use WinSCP with a temporary script and run it with a batch-script-step(http://winscp.net/eng/docs/guide_automation) :-)
(The above mentioned syntax with curly brackets is useless for me because it forces me to have the whole path on the build agent included, I cannot use a relative path within my repo.)
Any better ideas?
I could reproduce your scenario on my side with TFS 2015 update1 + curl 7.47.0:
If the folder contains spaces, like Another Subfolder in your scenario, curl can't recognize it, we'll get error: curl: Can't open 'C:/agent/_work/xx/s/Another'!
If we use syntax **/myfile.txt, we'll get all files in workspace that are named myfile.txt.
But if we put the files under the folder whose name doesn't contain spaces, we won't get the error curl: Can't open 'C:/agent/_work/xx/s/Another'!, so you may consider create a new folder like AnotherSubfolder and put the files need to be copied under this folder, then you can use the whole path.
Up until now I've been using Xcode with Subversion for my code repositories with no problem. Now I'm working on a project that uses a Git repository stored at GitHub, so I figured I'd go clone that repository to my local machine and get started.
In Xcode, I add the repository then tell it to Clone -- The machine chews on this for a while, and if I use the Finder I can see the files being placed in the target directory (which is a newly-created, empty directory on my system). After a while though, I get an error message:
fatal: destination path '/Users/myname/Documents/ProjectName' already exists and is not an empty directory.
I have tried this three times now, each time starting with an empty target directory, and it gives the same error message each time, so I know it has to be something I am doing wrong, or have not set up properly.
Thinking that perhaps something was going wrong and the system was trying to do a second clone operation (to a now non-empty directory) I tried canceling and trying a build, but some files are missing from the project -- so not all of it made it down to my system.
My searches on this issue turn up several hits for people doing the clone via command line and showing this error message, but not through the Xcode interface.
Does anyone have any suggestions about what might be going wrong?
I'm using the TFS command line utility, "tf.exe" This command:
tf.exe dir /folders /server:[my server] /login:[my login] $/WebSite
Always returns this:
No items match $/WebSite
I know for a fact that my project exists and is called "WebSite". I can browse it fine from Visual Studio, so I know I have permissions to it.
Why would the command line utility not find it?
(It is part of a project collection. Would this change the naming of the project?)
I figured it out. Project collections are added to the end of the server name, which I wasn't doing.