///<summary> /// Given the complete parent and child xml, /// this method compares 'records' (main xml elements) in the parent and child data sets /// at a high level of difference detection. /// /// Low-level xml differences are handed to XmlUtilities.AreXmlElementsEqual for processing differences /// of each 'record'. ///</summary> public Dictionary <string, byte[]> ReportDifferencesToListener() { Dictionary <string, byte[]> childIndex; Dictionary <string, byte[]> parentIndex; switch (_diffingMode) { default: throw new InvalidEnumArgumentException("Diffing mode not recognized."); case DiffingMode.FromFileInRevisions: PrepareIndicesUsingFilesInRepositorySource(out parentIndex, out childIndex); break; case DiffingMode.FromPathnames: PrepareIndicesUsingPathNameSource(out parentIndex, out childIndex); break; case DiffingMode.FromMixed: parentIndex = _parentIndex; PrepareIndexUsingPathNameSource(out childIndex); break; } foreach (var difference in Xml2WayDiffService.ReportDifferences( _parentFileInRevision, parentIndex, _childFileInRevision, childIndex)) { _eventListener.ChangeOccurred(difference); } return(parentIndex); }
public IEnumerable <IChangeReport> Find2WayDifferences(FileInRevision parent, FileInRevision child, HgRepository repository) { return(Xml2WayDiffService.ReportDifferences(repository, parent, child, null, "annotation", "guid") .Where(change => !(change is XmlDeletionChangeReport))); // Remove any deletion reports. }
public IEnumerable <IChangeReport> Find2WayDifferences(FileInRevision parent, FileInRevision child, HgRepository repository) { return(Xml2WayDiffService.ReportDifferences(repository, parent, child, null, "range", "id")); }