TFS auto-checkout before checkin

后端 未结 5 1892
夕颜
夕颜 2021-01-14 00:13

Does a feature like \"TFS auto-checkout before checkin\" exist, so that I don\'t checkout any file until the moment I say \"checkin\", e.g. in case I only change files tempo

相关标签:
5条回答
  • 2021-01-14 00:23

    These answers are fine assuming you always work in Visual Studio. But imagine the scenario of editing a bunch of files outside of Visual Studio and you want to use Windows Explorer TFS powertools to automatically checkout files which were just modified. Well, there is no automatic checkout. What I ended up doing was to sort the files by the "Date Modified" column and then individual selecting the modified files only. You can't select any files which might be added, as the TFS power tool Windows extension will grey out the "Check Out for Edit.." The other frustration is that TFS power tools doesn't have a file icon to differentiate if a file is currently checkout or simply not yet added to TFS. Basically, TFS is terrible working with more than file at a time unless you are exclusively working within VS, but who does that.

    SVN kicks TFS when it comes to this type of scenario.

    0 讨论(0)
  • 2021-01-14 00:29

    You can tell Visual studio not to check out on edit, go to tools, options, source control, environment. Then select the behaviour you want. If you choose editing to "do nothing" and saving to "prompt for checkout" it should be pretty close to what you want.

    tfs source contol options

    You could also look at svnBridge which allows you to use TortoiseSVN with TFS. I assume that the point of svnBridge is to allow developers used to SVN to use TFS without having to change the way they work, so it should meet your needs.

    A combination of both of these should get you close.

    0 讨论(0)
  • 2021-01-14 00:32

    From time to time I hear from people who dislike the automatic check out behaviour common with TFS. One of the great things about TFS is the the pending changes list that shows you the files you have currently checked out and allows you to easily undo any un-intentional check outs. While I personally find the auto-checkout features a productivity boon - like most things there is a preference that you can use to adjust the default behaviour if you find it causes problems with the way you like to work.

    In Visual Studio 2008 (with the Team Explorer 2008 installed), go to Tools, Options, Source Control, Environment and change the Checked-in items for Saving and Editing to "Prompt for check out" rather than the default which is "Check out automatically".

    This will then prompt you before the automatic checkout occurs and give you the opportunity to cancel if you wish.

    0 讨论(0)
  • 2021-01-14 00:33

    No. But you can do one thing - Open solution in 2 Visual Studio, One in which solution is Online and another in which solution is offline. Do all your changes/work on Offline solution. After completing your task.

    1. Go to first VS (Online) and checkout the files containing your changes.
    2. Go to Second VS (Offline, containing your changes) - It will prompt for file changes and click "No to All" so that all your changes persist.
    3. Press Save All.
    4. First Solution (Online) will prompt for new changes and click "Yes To All" so that all your changes done in offline mode will get in new files.
    5. Get Latest. - Any conflicting changes will be reflected (Try automerge - if you're lucky will work perfectly)
    6. CHECK-IN

    Though a tedious task but a workout for your question.

    0 讨论(0)
  • 2021-01-14 00:44

    No. When you check in TFS will checkin those files, you have to just undo those files.

    However checking out a file doesn't stop others from checking them out, unless you've locked them. This non exclusive locking is the default behaviour.

    0 讨论(0)
提交回复
热议问题