TFS and Version control

  • Hi all

    We're currently using TFS for our version control on servers running SQL2008 and SQL2012.

    At the moment, you can have multiple people working on the same file and then just resolve conflicts when you check it in (we're set up using local copies).

    We want to move to check-out locks but still use TFS. I've tried changing the settings as per this link:-

    http://stackoverflow.com/questions/13069584/automatically-acquire-a-checkout-lock-when-checking-out-tfs2012

    on two machines but it's still using our local copies instead of the server ones (so we're still in the same boat).

    Does anyone know how we can sort this out properly so we can lock files for check-out instead of resolving conflicts at check-in time?

    Thanks

    Richard

  • What tool are you using to perform the checkouts?

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Ah, sorry. Forgot that bit.

    We're currently using Visual Studio 2010.

  • Ah, so using SQL Server Data Tools to do the database? You should still be able to check out exclusive through Visual Studio. It's just how you do the checkout in TFS from VS. Make sure you set "Multiple shared checkout" to off in the settings.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • We've done that on two machines and set it to use server workspaces as well but it's still trying to use local copies instead of the server versions.

    I get the feeling I'm missing something obvious but I just can't see it.

  • Well, it's still going to work on the files locally, but they should be locked from others working on it. You won't be saving directly to the server.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Thanks for that, it clarifies that bit at least.

    Unfortunately, when we set the server workspaces as default and unchecked allow multiple checkouts, we could still both open, change and check-in the same file at the same time.

    There were no warnings, icon changes or anything that we could spot.

    Any ideas?

  • Not really. Something is up at the TFS level. It should lock the ability of more than one person to check out a given file. It won't affect what you can do locally, but it absolutely should prevent two people (or more) having the file open. Frankly, I'm stuck. That usually just works. Heck, it's a complaint about TFS being overly stringent as compared to Git or Mercurial.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply