public Conflict[] GetAllConflicts(Workspace workspace) { this.Logger().Trace("GetAllConflicts"); return workspace.QueryConflicts(workspace.Folders.Select(folder => folder.ServerItem).ToArray(), true); }
private static Conflict[] AutoResolveConflicts(Workspace workspace, string targetPath, MergeOption mergeOption) { var targetPaths = new[] {targetPath}; var conflicts = workspace.QueryConflicts(targetPaths, true); if (conflicts.IsNullOrEmpty()) return null; foreach (var conflict in conflicts) { TryResolve(workspace, conflict, mergeOption); } conflicts = workspace.QueryConflicts(targetPaths, true); if (conflicts.IsNullOrEmpty()) return null; workspace.AutoResolveValidConflicts(conflicts, AutoResolveOptions.AllSilent); return workspace.QueryConflicts(targetPaths, true); }
public bool HasConfilcts(Workspace workspace, string pathfilter, bool recursive) { return workspace.QueryConflicts(new String[1] { pathfilter }, recursive).Length != 0; }