Nitheesh
Nitheesh

Reputation: 47

Is there a fast way to do check in lock on pending changes in TFS?

I know we can go to solutions explorer and select files to do check in lock, but this is slow. Is there any extension or option to just do check in lock on all the files with pending changes?

Upvotes: 2

Views: 631

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51183

If what you are talking about is check-in lock. For example:

Developer A has checked out $/FabrikamTFVC/Main/Source/FabrikamFiber.CallCenter/FabrikamFiber.Web/Web.config in the FabrikamTFVC project with a check-in lock type. So while other users can check out the Web.config file, no one can check in Web.config until developer A has lifted this lock:

enter image description here

In the following image, Web.config is checked out with the check-in lock. This is represented by lock in the Pending Change column:

enter image description here

You could download TFS Power Tools and you can see Find by Status under Find in the Source Control Explorer. Then follow the below steps -

  1. From the Source Control Explorer find the folder containing the locked file(s).
  2. Right-click and select Find then Find by Status...
  3. The "Find in Source Control" window appears
  4. Click the Find button
  5. A "Find in Source Control" tab should appear showing the file(s) that are checked out
  6. Right click the file you want to unlock
  7. Select Undo... from the context menu
  8. A confirmation dialog appears. Click the Yes button.
  9. The file should disappear from the "Find in Source Control" window.

Source Link

Or you could try to use Lock command to remove other users lock for an item. Eg: c:\projects>tf lock /lock:none src/


Update:

You could also create your own customize check in policy to met your requirement. Check-in policy enforces constraints every time when files are checked into TFS source control. The user must meet the policy restriction, then could check in files.

How to please refer this blog: Creating TFS Custom Check-in Policy

Upvotes: 2

Related Questions