Avoid accidental overwriting between different developers when registering or merging

Different developers checkout code for the same file or different branches may merge. I'm new to TFS from the admin side, but I know how to do basic code registration. How can I avoid collision of codes from admin? We use Microsoft Team Foundation Server as our version control.

+3


source to share


1 answer


Version control systems are built to allow different users to edit the same files, and therefore, when merged, it provides a sane experience when merging. The ability to test the same file by multiple developers is one of those things that allows teams to become highly productive. When multiple versions of the same product are developed or supported, conflicts cannot be prevented at all.

There are many additional guides available in the ALM RAngers manual . I highly recommend you and your developers read this.

Note:

Visual Studio 2013 offers a much better merging experience than older versions. Third party tools like Semantic Merge further enhance the experience by analyzing the merged code and applying some additional smart logic to prevent conflicts.

For some, it is notoriously difficult to combine files like SSIS packages, there are additional specialized tools like BIDS Helper Smart Diff .

Some things you can do:

Make sure developers report

Teams that have a daily scrum (stand-up meeting) or can use Team Rooms in TFS can signal intent and keep others informed about what they are actively doing. Make sure you have a dedicated communication channel and that users have the Team Rooms extension if they are not in a co-location. Communication prevents many of these problems and is the best solution after such a teaming problem occurs.

If developers are updating and registration frequency

While there is no server setup for this, if your developers are trained to fork, merges and generic source control patterns can help. If the user regularly checks incoming changes (receives the latest) and checks them as soon as he is relatively confident in his code (say, after the first test passes when using TDD), the likelihood of conflicts is significantly lower.



Incoming change object

Codelens has been updated with a new lens as one of the post-RTM updates . The lens requires both Client and Server to be updated to at least version 2 and at least for Visual Studio 2013 Ultimate Update 2. It is recommended that you always stay current when you start applying updates, so I recommend you install update 4.

While Code Lens is an Ultimate feature, it will carry over to Professional with the release of Visual Studio 2015.

Use exclusive check

If users use the Checkout and lock option to check a file, they can signal to other users that the file is undergoing major changes. This feature requires all users to have the Server Workspace workspace type set. Local workspaces, given their incoherent nature, ignore the lock flag. Although individual users can always override their workspace type, you can set the default workspace type at the collection level .

Disable concatenation and multiple checks for specific file types

Better solution is to mark file types that are difficult to combine, old old style SSIS packages with lots of XML and GUIDs are a good candidate here. Open source control settings and add bad file extensions. This setting is partially applied in Visual Studio regardless of the workspace setting (Visual Studio will only offer Take Localor Take Servernot offer a merge.

Disable multiple checks

You can set the Source Source Control option to not allow "Multiple checks" , this will automatically get the lock when the file is checked out. It is not recommended to enable this feature as it introduces a lot of frustration while working in Visual Studio (most importantly, when adding any file, you need to acquire a lock in the project file). As with exclusive checking, all users must use server workspaces.

Since this feature will prevent multiple people from checking out any file, it often tries to put a lot of effort into solving this problem. Only in case your developers get messed up at high frequency can you temporarily enable this feature during training.

+8


source







All Articles