dotnet/msbuild

UseHardlinksIfPossible, readonly attributes and TFS issue

Open

#473 建立於 2016年2月9日

在 GitHub 查看
 (1 留言) (1 反應) (0 負責人)C# (1,364 fork)batch import
help wantedtriaged

倉庫指標

Star
 (5,062 star)
PR 合併指標
 (平均合併 11天 7小時) (30 天內合併 125 個 PR)

描述

Microsoft.Build.Tasks.Copy supports UseHardlinksIfPossible property. Unfortunately, using this property causes the issue with coping the files originally located at TFS (workspace location should be set to Server). This task clears all attributes of a destination files, but in case of hard link original and destination files are the same, so original files also changes their attributes (especially readonly one).

And next time on updating TFS can cause conflicting issue, because in Server mode workspace lack of readonly attribute means that the file has been changed and needed for merging.

I'd advise to perform small change at 351 line of Cope.cs file, something like this:

if (sourceFileState.IsReadOnly && !hardLinkCreated)

Or better implement additional property which will indicate what we should do with hard links attributes.

貢獻者指南