I have to update my client with my modifications in xpo file. Also i need to keep the exitsing functionality on client side as it is. But the issue is, while i am importing my XPO file to client side it replaces(overwrite) the existing file on it. So, the existing functionality has been replaced by my modifications.
Is there any way to merge both the XPO file(keep both chagnes - older and newer)?
The situation you are describing is quite common, but unfortunately there is no merge tool that can do this for you automatically. This is because the logic in your code must be added to the existing custom logic in the client’s code.
You must use the COMPARE function when importing on each object and determine what you want to import.
I have also tried to use COMPARE button. But this is only showing me the differences between two (Older and Newer) files, it is not able to merge the differences from both the files. It only updates the file which currently resides in AOT(USR layer) with the file i am importing.
I wanted to merge differences from both the files.
Yes, you are able to see in a somewhat organized manner the differences (between the existing code in the USR layer (i presume named OLD above) and the one in the XPO file (named NEW)) and you will be able to decide what you want to import (merge). From my experience there is no automatic way to do this because no tool can resolve the conflicts without your help.
For the methods (and some other properties), the COMPARE tool gives you the option to merge the code using the arrows in the code panel (just be sure to perform the right operation and save the object at the end of the compare). For other properties, it is required that they are recreated.