Search code examples
linuxubuntutfsazure-pipelinestfvc

TFVC "Undo Unchanged" Error in Ubuntu pipeline


I'm trying to run an "undo unchanged" command in a Linux TFVC pipeline.

The commands are run from a bash script:

tf workspaces -login:${credentials} -collection:${collectionURL}
tf checkout * -recursive -login:${credentials}
tf uu * -recursive -login:${credentials} -collection:${collectionURL}
tf checkin * -recursive -comment:${comment} -login:${credentials} -noprompt

The problem is that the third command fails:

tf uu * -recursive -login:${credentials} -collection:${collectionURL}

With the error:

An error occured: There is no working folder mapping for '/home/user/tfsAgent/_work/1/s/folder_name'

I understand that the problem is that I don't have a direct mapping to the directory 'folder_name': Instead, I have mappings to several of its subdirectories.

There is no specific path in the source-control which I can map directly to the directory 'folder_name'.
Is there no workaround for this?

Any help would be greatly appreciated.


Solution

  • Seems you were trying to use tf uu command to undo checkout of unmodified files in a batch file.

    This command need to be called in a workspace, the folder should have a mapping relationship.

    An error occured: There is no working folder mapping for '/home/user/tfsAgent/_work/1/s/folder_name'

    According to the error, you need to use tf workspace command to the target folder , cd inside it and run tf uu command.