A non version controlled file or writable file by the same name already exists locally - tfs

Trying to get latest version of the project and tfs and always get te same warning without the way of resolving conflict:
When i click the file to resolve it gives me no options to choose
Is there any way to get this around without resorting to cloning whole solution again?
Thanks for help in advance

For this kind error usually due to the file is writable. Take a look at #Buck Hodges (Director of Engineering at Microsoft)'s reply in this case:
The file is writable. When there's a writable file, get will not
overwrite it unless the /overwrite option is used. However, you would
need to figure out how the file is becoming writable. You may want to
go back to the default option of creating a new workspace, and see what is making the file writable.
By default, the system does not retrieve an item if it is writable (that is, if its read-only attribute is cleared) on the client machine. This option overrides the default behavior and overwrites a writable item, unless the item is checked out.
Instead get files directly through Visual Studio. You could try to get files through tf get command line and with /overwrite option. This should do the trick.

Related

How to change read only file to writeable

Running SPSS 23,
When trying to save a file I get the following error message:
The specified file or directory is read-only and cannot be written to.
The file will not be saved. Save the file with another name or to a
different location or change the access permissions first
First make sure you are trying to write to a directory you have permission to write on - if you gave no path, by default SPSS will write to the SPSS install directory which might require administrator rights.
You can change the default directory for this session by running:
cd "c:\users\santosh\somedirectory"
If this is not enough and you are sure that the file you are trying to write to is not open, try the following syntax:
PERMISSIONS FILE='yourpath\yourfile.sav' /PERMISSIONS WRITEABLE.
And try again.
Please make sure, before you overwrite the existing file, that important information is backed up and safe - if a file was locked for editing, there might be a good reason.

How to make permanent url to file in svn?

Good day, colleagues,
can you advice me, how to make permanent links to files in SVN?
If I make a link, now I get something like:
http://172.29.15.15/svn/OFFICE_WORK/Trainings/123.xlsx
but if I move file to other directory, I get a error (file not found).
I know that in Sharepoint I can assign unique IDs (aditional option in admin panel) to files, and I'll get a permanent URL to file, that doesn't depend on it's location.
Is there an opportunity in SVN to make permanent link to file, that not depend on it's location?
Thank you in advance!
I'm not sure if I'm understanding the question correctly when you say "permanent link". But try adding an external property to your checked out directory. Right click on the directory you wish to add the 123.xslx file to, go to TortoiseSVN > Properties > New > Externals.
Then click New..., give the local path to the file and URL to the file which you posted above
Example:
Local Path: 123.xlsx
URL: http://172.29.15.15/svn/OFFICE_WORK/Trainings/123.xlsx
Hit OK. OK, again. Then do an SVN Update on the folder. Your 123.xlsx file should be included.
Not sure what you're referring to by not depending on location though. In subversion, in order to pull a file, you have to have the URL to gather it from. There isn't any ID feature unfortunately. It seems your repositories are based off an IP address of some sort... Is there any way you can use a common domain name for your path? That would probably solve your issue as well.

Installshield skip custom action if an application is already installed

I have created a basic MSI project which will install few applications on the machine. My first step is to copy few folders and files to the destination machine. Then I have created two custom actions to run the exe files. I would like to skip custom action if that particular application is already installed on the machine. Also while copying the folders and files, I would like to skip if the folder or file already exists on the machine. I tried using install conditions, condition builder, system search but i am unable to resolve it.
Please provide any ideas to resolve these issues. Your answers would be greatly appreciated.
All this can be resolved by using System Search.Refer (http://helpnet.flexerasoftware.com/isxhelp22/helplibrary/NewLaunchCondition.htm)
1) To check if file exists select (File path, by searching folders),enter file name, select directory and assign depth depending on the directory mentioned.
Suppose A.txt is present inside \B\C folder and you are selecting B while searching then depth should be >=2. The property mentioned in this process will get set with the file path if file exists.
2) To check if folder exists select (Folder path, by searching in a specific folder), follow the above procedure and mention folder name instead of filename.
3) To check if application is installed you can check by following one the above processes and find application specific folders/files.
Lastly use the public properties as a condition for your custom actions and components. Suppose you are checking for a file and setting a property ASONFILEFOUND, just mention this in component/custom action condition and those wont run if file exists.
If you still face issues enable windows logging and view the log to check whether properties used in System Search are getting set or not.
Execute-MSI -Action Install -Path 'AcroRead.msi' -Transform 'Settings.mst' -Parameters '/q /norestart' -SkipMSIAlreadyInstalledCheck
use this command. if you are using Powershell for installation.
This will skip the MSI file check.

How to avoid intermittent Errno::ETXTBSY exceptions?

During part of a request in a Rails application, I copy a directory from one place to another, think of it like a working area. Sometimes this copy operation results in "Errno::ETXTBSY" exceptions being thrown. I can't seem to pin down the case that causes it, any tips to detect the case or avoid it altogether?
I've made sure the destination directory is uniquely named, so it shouldn't be a case of 2 processes attempting to write to the same place. Beyond that I'm out of ideas.
ETXTBSY means that you're trying to open for writing a file which is currently being executed as a program, or that you're trying to execute a file which is currently open for writing. Since you say you're copying files, not executing them it seems likely it's the former, not the later.
You say you're targeting a unique new destination, but my guess is that's not entirely true and you're actually targeting an existing directory and one of the files you're attempting to overwrite is currently open as an executable text segment of a running process.
You haven't posted any code, so it's hard to comment specifically. I suggest you add enough logging so you know exactly what file(s) are being processed and specifically, the source and destination path that throws the exception. Then you could use lsof to see what process may have that file open.
One way to avoid the problem if you are overwriting a currently open executable, is to first unlink the target file. The running process will still have the old inode mapped and proceed merrily using the deleted file, but your open for write will then create a new file which won't conflict.

Attachment using Editable Email Extension in Jenkins

I am using Editable Email plugin in Jenkins to attach a file with the email. The problem is that the plugin is unable to find the file to attach.
My file structure is like this -
ReportDirectory
workspace
ReportDirectory contains the report which I want to attach. I believe that the base directory for the plugin is the workspace. So I am giving the attachment location as
../ReportDirectory/DemoReport.html.
I have also tried
ReportDirectory/DemoReport.html
and many more options.
Am I doing something wrong?
I figured it out.
The Editable Email plugin uses the Ant File Syntax for locating the attachment. When I took at the documentation for Ant File Syntax ( http://ant.apache.org/manual/dirtasks.html ), it says that
In general, patterns are considered relative paths, relative to a task dependent base directory (the dir attribute in the case of ). Only files found below that base directory are considered. So while a pattern like ../foo.java is possible, it will not match anything when applied since the base directory's parent is never scanned for files.
Since the base directory in this case is the "workspace" and my directory "ReportDirectory" is not located in it so the Ant is not able to access it.
Two solutions exist:
Move the "Report Directory" somewhere in "workspace". I did not prefer this because I did not want to mess up the workspace.
Once the report has been created in "ReportDirectory", use your Ant\MSBuild script to copy it temporarily in the "workspace" and then the Email plugin shall be able to access it by something like **/Report.html or something.
#Amey - thanks for your efforts though :)
Another solution is create a symbolic link from $JENKINS_HOME/jobs/workspace/$workspace_name to the path with your $workspace_name. This way worked for me.
ReportDirectory/DemoReport.html
is the correct way to do it.
Please keep in mind that the path to the file and the file name is case sensitive so I assume your entering the correct name.
One more thing is to check is that the report is actually created and is located at the path mentioned by you.
Another thing you could try
ReportDirectory/*
Jenkins will use the directory available in its workspace.
You can send multiple attachments as below.
reportFolder/html/index.html, screenShotsFolder/screenShots/*.jpg
Simple answer:
Copy your file into the workspace(into your job directory), then under Attachment, just give the file name without any quotation or anything. This will automatically tell Jenkins to pick up your file. That's it!
Pls don't confuse yourself after seeing all the configurations.

Resources