Eclipse TFS check out error can't show file

2019-03-06 08:15发布

I'm using Eclipse Neon with TFS plugin,

When I edit a file and try to checkout file and the file is already checkout by another user, I get the file as empty with an error :

The item .. is locked for checkout by .. in workspace ..

I can't continue to work on file, I must close window and open the file again.

Is there a way to keep working on file without getting error screen?

When I trying to lock I don't have option for Unchanged - keep any existing lock .

1条回答
甜甜的少女心
2楼-- · 2019-03-06 08:44

The file is locked by others, you need to unlock the file then check-out to edit, otherwise it will always get the error.

You can try below ways to unlock the file:

To use the lock command, you must have the Lock permission set to Allow. Having the Unlock other user's changes permission set to Allow is required to remove a lock held by another user if you do not have Write permission for that user's workspace

tf lock /lock:none /workspace:workspacename [/recursive][/login:username,[password]] [/collection:TeamProjectCollectionUrl]

  • tf undo The undo command removes any locks on the items. See Undo command

    To unlock individual files run the command below in Visual Studio Command Prompt:

    tf undo "file_path" /workspace:workspace_name

    e.g.:

    tf undo $/S/B/ABC/dotNET/Symphony/Tools/xyz/abc/Abc.dll /workspace:Houst01

    here it will unlock Abc.dll which is inside abc folder.

    To unlock the whole folder in one shot:

    tf undo $/S/B/ABC/dotNET/Symphony/Tools/xyz/abc/* /workspace:Houst01

    here it will unlock all files which is inside abc folder.

  • You can also unlock other users file using TFS Sidekick tools:

    It gives you a graphical interface to do all these commands, which makes it much easier to perform these tasks.

查看更多
登录 后发表回答