Initial implementation of repository conflicts.
Implement conflicts file output.
Fix bugs with conflicts detection logic.