Merge XAML, csproj, vcproj, sln

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
shoover
Posts: 12
Joined: Wed Dec 03, 2008 9:04 am

Merge XAML, csproj, vcproj, sln

Post by shoover » Mon Feb 23, 2009 10:16 am

I'm running Vault 4.0.6. When a merge is required for a XAML, csproj, vcproj, or sln file in a Visual Studio project, the gui client says binary files cannot be merged. However, these are clearly XML-based text files that could be merged. Would I get different behavior if I upgraded to 4.1?

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Merge XAML, csproj, vcproj, sln

Post by Beth » Mon Feb 23, 2009 1:35 pm

Go to your Vault admin web page, expand the repository and select file types. In there you can designate those files as mergeable. I wouldn't recommend it for the .sln file, and Microsoft has the same recommendation. Merging the .sln file sometimes breaks it.

I think sometimes it's not recommended to merge project files either, but I do know there are some people who do that successfully.
Beth Kieler
SourceGear Technical Support

shoover
Posts: 12
Joined: Wed Dec 03, 2008 9:04 am

Re: Merge XAML, csproj, vcproj, sln

Post by shoover » Mon Feb 23, 2009 2:26 pm

Thank you.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Merge XAML, csproj, vcproj, sln

Post by Beth » Mon Feb 23, 2009 2:30 pm

Feel free to let me know if you have further questions.
Beth Kieler
SourceGear Technical Support

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: Merge XAML, csproj, vcproj, sln

Post by jeffhostetler » Mon Feb 23, 2009 2:43 pm

Merging XML with a line-oriented text-base tool is not recommended.
It frequently works, but it can cause problems. It all depends on how
the files have changed.

The problem is that XML syntax allows a variety of forms that all
*mean* the same thing, such as line breaks and rearranging various
attributes within a tag. An XML-aware tool would see that and "do the
right thing". A line-oriented tool just sees them as lines and doesn't
know about the quirks of XML.

If you launch DiffMerge on the various versions of the XML files,
see if all the differences are clean inserts of a block of lines (such
as when you add a source file to a project). If that is the case, you'll
probably be fine. But if you see any changes that are more subtle
and XML-ish, then you should probably avoid it.

What we really need is an XML-aware tool to do these kinds of merges.

Hope this helps,
jeff

shoover
Posts: 12
Joined: Wed Dec 03, 2008 9:04 am

Re: Merge XAML, csproj, vcproj, sln

Post by shoover » Mon Feb 23, 2009 4:41 pm

Jeff, I think I see the subtle nature of changing XML you're referring to. XAML files are in danger of the biggest mess in that regard because there are small property changes and large structural changes all the time. csproj files often have clean inserts of lines and should be mergeable in those cases. Either way, I'll take this information and see what the rest of the team thinks.

Post Reply