microsoft / vso-agent

Visual Studio Team Services and TFS agent for Mac OSX and Linux
MIT License
131 stars 57 forks source link

Resolve TFVC build server path to local path #200

Closed yacaovsnc closed 8 years ago

yacaovsnc commented 8 years ago

I moved the block that resolves input path after getCode() call, otherwise we haven't create any workspace so TFVC can't resolve the path.

If user selected a server path from the path picker, we will attempt to use tf's resolvePath command to resolve the server path to a local path. If resolution isn't possible (tf doesn't have the cmd, the input path is not a server path, or the server path hasn't been mapped yet), we will return the input. This way we could still honor any relative path the customer has entered themselves.

ericsciple commented 8 years ago

This way we could still honor any relative path the customer has entered themselves

Is that the behavior in Windows agent? Just pointing out as plan is for the two agents to converge on one implementation. If it's different from Windows implementation, and can't match it due to a tee limitation, then it might just be something that we need to live it.

yacaovsnc commented 8 years ago

@ericsciple I am keeping the relative path from user due to there are users who have worked around the path issue by entering a relative path instead of a server path. I want to transparently upgrade them so I don't fail or do anything fancy if they specifically entered a value.

bryanmacfarlane commented 8 years ago

makes sense

bryanmacfarlane commented 8 years ago

Yang - can you resolve the conflicts and then I'll merge this? Note I checked in the change where tfsvcwrapper uses the internal tf download which is probably the conflict

yacaovsnc commented 8 years ago

@bryanmacfarlane I reverted my commit on the internal tf. Thanks!