private void UpdateStatusTree(GitRepoStatus status, bool threaded = false) { try { var newStatusTree = new StatusTreeClass(gitSettings, status); statusTree = newStatusTree; gitManager.ExecuteAction(RepaintProjectWidnow, threaded); } catch (Exception e) { Debug.LogException(e); } }
private static void UpdateStatusTreeThreaded(object statusObj) { Monitor.Enter(statusTreeLock); try { GitRepoStatus status = (GitRepoStatus)statusObj; statusTree = new StatusTreeClass(status); actionQueue.Enqueue(RepaintProjectWidnow); } catch (Exception e) { Debug.LogException(e); } finally { Monitor.Exit(statusTreeLock); } }
private void UpdateStatusTree(GitRepoStatus status, bool threaded = false) { try { var subModules = status.SubModuleEntries; if (gitManager.InSubModule) { subModules = subModules.Concat(new [] { new GitStatusSubModuleEntry(gitSettings.ActiveSubModule) }); } var newStatusTree = injectionHelper.CreateInstance <StatusTreeClass>(cullNonAssetPaths); newStatusTree.Build(status, subModules); statusTree = newStatusTree; gitManager.ExecuteAction(RepaintProjectWidnow, threaded); } catch (Exception e) { logger.LogException(e); } }
internal static void Update(bool reloadRepository) { if (reloadRepository || (repository == null && IsValidRepo)) { if (repository != null) { repository.Dispose(); } repository = new Repository(RepoPath); } if (repository != null) { RepositoryStatus repoStatus = repository.RetrieveStatus(); if (updateRepository != null) { updateRepository.Invoke(repoStatus); } statusTree = new StatusTreeClass(repoStatus); } }