My (large) company uses Perforce for most of their source control. (I can't escape this.)
A coworker and I often have to work on the same XML-based file at the same time. When it comes time to merge our changes, P4Merge is often not as smart as I'd like. For example, consider this super-simple XML file and two colliding variations:
As shown, P4Merge is not XML-aware, and keeps only one copy of the common </b>
.
How do you either modify the Perforce tool itself to support smarter XML merges, or how could you modify the Perforce toolchain to use a smarter merge tool as part of the Resolve process?
There's a tool called Project:Merge that might do a better job of handling XML content, and it integrates with Perforce:
http://www.projectmerge.com/help/en/integratep4v.php
Update: Project:Merge has been renamed to Oso XML Merge and updated since this post was made. The most recent version can be found here.
Assuming that you're using P4V / P4Win, you can change the default diff and merge tools from the Perforce tools to the ones that you prefer. See this page from the P4V manual.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With