private void PublishRepo() { if (Provider == null) { HandleViewModelError(null, new ErrorEventArgs(RubberduckUI.SourceControl_PublishRepo_FailureTitle, RubberduckUI.SourceControl_PublishRepo_NoOpenRepo, NotificationType.Error)); return; } Logger.Trace("Publishing repo to remote"); try { Provider.AddOrigin(PublishRemotePath, Provider.CurrentBranch.Name); Provider.Publish(Provider.CurrentBranch.Name); } catch (SourceControlException ex) { HandleViewModelError(null, new ErrorEventArgs(ex.Message, ex.InnerException, NotificationType.Error)); } catch { HandleViewModelError(this, new ErrorEventArgs(RubberduckUI.SourceControl_UnknownErrorTitle, RubberduckUI.SourceControl_UnknownErrorMessage, NotificationType.Error)); throw; } OnPropertyChanged("RepoDoesNotHaveRemoteLocation"); ClosePublishRepoGrid(); }
private void PublishRepo() { if (Provider == null) { ViewModel_ErrorThrown(null, new ErrorEventArgs(RubberduckUI.SourceControl_PublishRepo_FailureTitle, RubberduckUI.SourceControl_PublishRepo_NoOpenRepo, NotificationType.Error)); return; } try { Provider.AddOrigin(PublishRemotePath, Provider.CurrentBranch.Name); Provider.Publish(Provider.CurrentBranch.Name); } catch (SourceControlException ex) { ViewModel_ErrorThrown(null, new ErrorEventArgs(ex.Message, ex.InnerException.Message, NotificationType.Error)); } OnPropertyChanged("RepoDoesNotHaveRemoteLocation"); ClosePublishRepoGrid(); }