AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 15.10.2014, 22:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
goshoom: Locking in Team Foundation Version Control
Источник: http://dev.goshoom.net/en/2014/10/lo...rsion-control/
==============

If you use Team Foundation Version Control, you have several ways to control whether multiple developers can work on same objects simultaneously. You normally want that, because developers often need to change a common file (a class, a configuration file and so on) and waiting for each other would cause unnecessary delays. But it’s not always the case – maybe you want to lock an individual file before making a sensitive change, some files can’t be easily merged so it’s not wise creating concurrent versions, maybe you’re developing in a shared AX instance and so on.

Before we actually look at locking, it’s important to understand the difference between local and server workspaces, because each of them work with locks differently. A TFS workspace defines which files are downloaded from TFS, tracks edited files and so on. Beginning with TFS 2012, you can choose between local and server workspaces; older versions of TFS support server workspaces only.

Note that you can easily switch between workspace types – simply open workspace properties in Visual Studio, switch to the “advanced” display and set Location to either Local or Server.



If you use a server workspace, a lot of state information is maintained on server, therefore you need a connection to your TFS to perform actions such as checkout or add. Local workspaces can track such actions by themselves, therefore you may be disconnected from TFS (if you have all files you need already in the workspace). If you want to check in changes to version control, you obviously need connection to server regardless of the type of your workspace.

This clearly leads to a difference in when you can apply locks – because local workspaces don’t have to communicate with server on checkout, you can’t expect them to honor locks. Therefore if you need exclusive check-out locks, you have to use server workspaces. Both type of workspaces can use check-in locks, which means that developers can do local changes but they can’t check them in until the lock is released.

Look at Understand lock types if you need more information about lock types and their use.

One way of taking a lock is as a part of check out. Simply choose a lock type in the Check Out dialog:



The picture above is from a server workspace. If I use a local workspace, Check Out lock isn’t available.



You can be offline if you don’t need any lock, but you obviously must have a connection to TFS if you want it to lock the file and prevent others from uploading a new version.

Another option is taking a lock manually.



If you want TFS to take a Check Out lock automatically for certain file types (especially because you can’t merge them), you can configure it in team project collection settings. One option to get to the right form is Team > Team Project Collection Settings > Source Control…




Here you can edit or add file types and configure whether multiple checkouts should be allowed:



And finally, you can disable multiple checkouts for the whole team project (regardless of file type). Open source control settings for an individual team project (Team > Team Project Settings > Source Control…) and uncheck Enable multiple check-out.



People sometimes think that it’s all or nothing (everything locked/unlocked), but you clearly have more options available. And the impact of workspace types can be very confusing for those who don’t understand workspaces.

All pictures are from Visual Studio 2013 connected to Visual Studio Online.



Источник: http://dev.goshoom.net/en/2014/10/lo...rsion-control/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Version Control: Team Foundation Server - настройка DmitrySincerity DAX: Администрирование 4 14.05.2018 22:28
Microsoft Dynamics AX 2009 White Paper: Migration of Microsoft Dynamics AX Version Control System content from Microsoft Visual SourceSafe to Microsoft Team Foundation Server Vadik DAX: База знаний и проекты 0 07.05.2010 12:03
emeadaxsupport: Renaming an AOT object in Dynamics AX 2009 that is under source control with Team Foundation Server Blog bot DAX Blogs 0 06.10.2009 02:05
Microsoft Dynamics AX 2009 White Paper: Using the Version Control Integration with Microsoft Team Foundation Server Vadik DAX: База знаний и проекты 0 09.07.2009 13:17
axStart: Microsoft Dynamics AX 2009 White Paper: Team Foundation Server Version Control Setup Blog bot DAX Blogs 0 27.07.2008 13:06
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 11:46.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.