Getting file contents from TEE's Tf.Cmd command line - visual-studio

I am trying to get the file contents from a specific revision in TEE. According to https://msdn.microsoft.com/en-us/library/gg413270(v=vs.100).aspx the command should be something to the affect of : tf print -version:C1999 Class1.java. This is the error I am receiving:
An argument error occurred: The specified file does not exist at the specified version.
I know I am logged in and my credentials are cached as I am able to query for information like the History command. I also know that the file does exist in this revision as I am getting the information from the history query. Also using Tf.Exe (provided by visual studios) I am able to successfully run :
tf view -version:C1999 Class1.java
and get the contents perfectly fine. Unfortunately for this purpose I am unable to use tf.exe, and it has to the the TEE command line using Tf.Cmd, and they do not support the "view" command.
Any help on getting the file contents would be greatly appreciated.
edit- note I am using the full file path, and, as I said, it works perfectly fine in Tf.exe. Also I have tried using "$/" as the project root and still do not have any success.

Make sure you have installed the latest version of Team Explorer Everywhere.
To use this command, the Read permission on the file that you are
trying to print must be set to Allow.
Even though you could get tf view command to work. Also double check if you have related permission on that specific file.

Related

Stata can't open file saved in local cloud storage folder on Mac

I am using Stata on a Mac. I updated the OS to Monterey today. If I try to open a .dta file---that is saved on my local computer in a folder that syncs to OneDrive---from code in the Do File Editor/Command prompt (where I refer to the file using its full file path), it doesn't open. The error is r(601) - File ... cannot be found.
But if I click on it in Finder, it opens in Stata just fine. After I have done this, I can then open this file in Stata by running the exact same Stata code that didn't work before. Somehow it seems like Stata can't see the file/folder initially, but then it can. I am not sure if this has to do with the OneDrive file/folder permissions or something else.
If, in Stata, I change the directory to the correct directory using cd and then load the file (without referring to the path), it works. However, I would like to be able to refer to the file using the entire file path and not have to change the directory each time.
Interestingly, if I change the directory to the correct directory using Change working directory in the File drop down and then try to load the file using the file path, it also works. But if I do not do the drop down and write out the cd using code, and try accessing the file using the path it doesn't work!
Somehow Stata has to initially "see"/"access" the correct folder (in a very particular way) before being able to access it with the file path. Very strange. (Just to be clear, if I do not change the directory to the correct directory and then try to load the file using its file path, it doesn't work.)
I also tried creating a file using texdoc init... (in a folder that already exists, but that has not been used by Stata before) and get this error:
could not create directory .....
mkdir(): 693 could not create directory
texdoc_mkdir(): - function returned error
texdoc_init(): - function returned error
<istmt>: - function returned error
I do not get this error if I instead use another folder in the same directory that I have previously used.
I think that the error I am encountering is the same or similar to this one (with no acceptable answer): https://answers.microsoft.com/en-us/msoffice/forum/all/onedrive-folder-doesnt-exist/e6b97d47-3f6a-4863-bf68-d3a02832f2bb

Cd command is not working in shell script

I am trying to do cd command and i can see there is not change in path after that,not knowing what is the reason
I checked workarounds available in internet telling to give whole path,use alias etc but nothing worked out ,when i try manually doing cd its working and i tried giving this command in other dummy script there its working
But in my shell script even if i create one director and try to change also its not happening,code is actually getting stuck there and not going to other lines
Please suggest me what else i can so with this

Windows Command Line errors that can't find file

I don't know much about the command line but have been using it a lot lately. I was experiencing errors in a C application when trying to copy a file which didn't make sense; so, I tried using the the command line to make sure the code should work and get an error I don't understand.
copy "AH/Copy testing/media.enc" "AH/Copy testing/new_name.enc" returns the system cannot find the specified file. So, I tried type "AH/Copy testing/media.enc" and get the same error.
However, if change the directory to "AH/Copy testing", then type media.enc it works.
I tried the same statements on different files of the same and different extensions and they all work. For example, type "AH/Copy testing/fileName.enc" works.
Why would media.enc not be found unless the directory is set to its own first? If I copy media.enc to other locations, I get the same error unless the directory is first changed.
Thank you.

install4j: Executing bash file

I am trying to run a bash file from install4j6. install4j does indeed try to run the bash file but it just returns an error at the end of the installation. The error is very generic and has no code reference or anything that will help me determine a solution - just a message that says "Error while executing file."
The only thing I can provide is how I have it setup in install4j6 since I am pretty sure that's my issue.
The bash file is defined in the root of my installation directory distribution tree and is named set_permissions.sh. For the sake of eliminating permissions being a cause, the file permission mode is set to 777 (both in install4j and on the file system).
I believe the issue is related to what I have set as my "working directory". I currently have it set to just ".". Is there a way to debug this further? Maybe get an actual error as to why it's not executing?
Ok, first a few things to check:
make sure that you're running the batch file after the install files step (you mention it being at the root of your install)
best to have the wait for termination checked and a variable for the return code.
redirect stderr to the log file (just in case)
As for working directory, . should work, but you can change it to ${installer:sys.installationDir} to make sure that it references the installation directory chosen by the user. You can also set the executable in the form of ${installer:sys.installationDir}\set_permissions.sh
Also, try and run just your shell script to make sure that it works :)

Running xcodebuild on command line, where to view logs?

I want to view the log when building an xcode (4.5) project from the command-line, since the output in the command-line window itself is too long and messy. Is there a standard place the logs would go, I can't seem to find them?
There are logs in ~/Library/Developer/Xcode/DerivedData -- you'll have to figure out which sub folder is for your build, but in there is Logs/Build/UUID.xcactivitylog
If you rename that file to a .zip and unzip, there's a text file log in there of the build.
Like all command line tools, output goes to standard output and error goes to standard error. By default this is your command line terminal. Use piping and/or redirection if you want them somewhere else. Check your command line interpreter documentation for more info (probably you are using bash, so check man bash).

Resources