Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Comparing dcrs
xsrinivasank
We have a requirement where we want to compare two dcrs and findout the differences.
Does teamsite provide any command lines or apis for the same to achieve this.
If some one has written custom code kindly share the same
Find more posts tagged with
Comments
Adam Stoller
There's no "real" OOTB provision for this (there is a FR somewhere - don't remember the number - for providing something like this) - but here are some ideas:
1) Make sure you have pretty-printing style enabled for DCRs so that the entire contents aren't all in one line.
2) Use iwdiff (which is GNU diff) or any similar utility for comparing two DCRs.
If you can't do '1' - or you need to compare against some DCRs which are in the all-in-one-line format - create a preprocessor that uses something like XML::Twig (or similar) to read-in and then spit out in a nicer format the DCR contents.
You could also write your own diff code if you like - but getting all the algorithms correct for determining how to line up chunks of a file after the first difference is not necessarily simple.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com