I think it is a good idea to keep the tree default behavior as expand, so that the tree does not get folded whenever the view is updated after changes.
Next, we can add checkbox for each item in the tree, so that 'compare' or 'merge' operations can be performed. Should we do this in this interface or we provide compare, which takes to the other interface suggested by Niyam.