Quality of TFS 2008 merged code

Posted by paologios on Stack Overflow See other posts from Stack Overflow or by paologios
Published on 2009-10-26T14:49:12Z Indexed on 2010/04/08 10:03 UTC
Read the original article Hit count: 235

Filed under:
|
|
|

Does the quality of code merged by TFS 2008 depend on the used programming language? I know merging in Java / Subversion, and merging a branch to its trunk usually does not create much conflicts. Now in my company, we use VB.NET. When I merge two files TFS does not always get code blocks right, e.g. does not find the right If..then / end if lines. To give you an example, I mean: File 2 is created as a branch of File 1. Both files were changed later, now I'm going to merge those files and am recieving conficts: The marked end-if lines (1) are detected as corresponding, meaning the added event handler Button1_Click is being deleted.

Now I wonder if this behavior is by language (C# vs. VB.NET) or are other source control solutions just better than TFS? (And I really liked TFS up to now :) )


File 1:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Not Page.IsPostBack Then
        Label1.Text = "Hello"
        Label2.Text = "World"
    End If
End Sub

Protected Sub Button2_Click(ByVal sender, ByVal e as System.EventArgs) Handles Button2.Click

    // ....

    If Page.IsValid Then
        Label3.Text = "Hello Button 2"
    End If

    // ....
End Sub

File 2 (Branch of File 1):

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Not Page.IsPostBack Then
        fillTableFromDatabase()
    End If // (1)

End Sub

Protected Sub Button1_Click(ByVal sender, ByVal e as System.EventArgs) Handles Button1.Click
    // do something here
End Sub

Protected Sub Button2_Click(ByVal sender, ByVal e as System.EventArgs) Handles Button2.Click

    // ....

    If Page.IsValid Then
    End If // (1)

    // ....
End Sub

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about tfs2008