public static bool ResolveConflicts(SourceControlBase SourceControl, string path, eResolveConflictsSide side) { string error = string.Empty; bool IsConflictResolved = true; RepositoryFolderBase repositoryFolderBase = WorkSpace.Instance.SolutionRepository.GetRepositoryFolderByPath(Path.GetDirectoryName(path)); repositoryFolderBase.PauseFileWatcher(); if (!SourceControl.ResolveConflicts(path, side, ref error)) { IsConflictResolved = false; Reporter.ToUser(eUserMsgKey.GeneralErrorOccured, error); return(IsConflictResolved); } repositoryFolderBase.ResumeFileWatcher(); repositoryFolderBase.ReloadUpdatedXML(path); return(IsConflictResolved); }
public static bool ResolveConflicts(SourceControlBase SourceControl, string path, eResolveConflictsSide side) { string error = string.Empty; bool IsConflictResolved = true; try { if (path == null) { return(false); } RepositoryFolderBase repositoryFolderBase = null; if (path != SourceControl.SolutionFolder) { repositoryFolderBase = WorkSpace.Instance.SolutionRepository.GetRepositoryFolderByPath(Path.GetDirectoryName(path)); repositoryFolderBase.PauseFileWatcher(); } if (!SourceControl.ResolveConflicts(path, side, ref error)) { IsConflictResolved = false; Reporter.ToUser(eUserMsgKey.GeneralErrorOccured, error); return(IsConflictResolved); } if (repositoryFolderBase != null) { repositoryFolderBase.ResumeFileWatcher(); repositoryFolderBase.ReloadUpdatedXML(path); } return(IsConflictResolved); } catch (Exception ex) { Reporter.ToLog(eLogLevel.ERROR, "Error occured during resolving conflicts..", ex); return(false); } }