private void ShowSelectedFileDiff() { if (DiffFiles.SelectedItem == null) { DiffText.ViewPatch(""); return; } var items = _revisionGrid.GetSelectedRevisions(); if (items.Count() == 1) { items.Add(new GitRevision(Module, DiffFiles.SelectedItemParent)); if (!string.IsNullOrWhiteSpace(DiffFiles.SelectedItemParent) && DiffFiles.SelectedItemParent == DiffFiles.CombinedDiff.Text) { var diffOfConflict = Module.GetCombinedDiffContent(items.First(), DiffFiles.SelectedItem.Name, DiffText.GetExtraDiffArguments(), DiffText.Encoding); if (string.IsNullOrWhiteSpace(diffOfConflict)) { diffOfConflict = Strings.GetUninterestingDiffOmitted(); } DiffText.ViewPatch(diffOfConflict); return; } } DiffText.ViewChanges(items, DiffFiles.SelectedItem, String.Empty); }
private async Task ViewSelectedDiff() { GitRevision revision = DiffFiles.Revision; if (DiffFiles.SelectedItem != null && revision != null) { await DiffText.ViewChanges(DiffFiles.SelectedItemParent?.Guid, revision.Guid, DiffFiles.SelectedItem, string.Empty); } }
private void ViewSelectedDiff() { if (DiffFiles.SelectedItem != null && _revision != null) { Cursor.Current = Cursors.WaitCursor; DiffText.ViewChanges(DiffFiles.SelectedItemParent, _revision.Guid, DiffFiles.SelectedItem, String.Empty); Cursor.Current = Cursors.Default; } }
private void ViewSelectedDiff() { if (DiffFiles.SelectedItem != null && _revision != null) { Cursor.Current = Cursors.WaitCursor; DiffText.ViewChanges(_revision.Guid, DiffFiles.SelectedItemParent, DiffFiles.SelectedItem, String.Empty, canViewLineOnGitHubForThisRevision: true); Cursor.Current = Cursors.Default; } }
private void ShowSelectedFileDiff() { if (DiffFiles.SelectedItem == null) { DiffText.ViewPatch(""); return; } IList <GitRevision> items = new List <GitRevision> { _rightRevision, _leftRevision }; if (items.Count() == 1) { items.Add(new GitRevision(Module, DiffFiles.SelectedItemParent)); } DiffText.ViewChanges(items, DiffFiles.SelectedItem, String.Empty); }
private void ShowSelectedFileDiff() { if (DiffFiles.SelectedItem == null) { DiffText.ViewPatch(""); return; } var baseCommit = ckCompareToMergeBase.Checked ? _mergeBase : _baseRevision; IList <GitRevision> items = new List <GitRevision> { _headRevision, baseCommit }; if (items.Count() == 1) { items.Add(new GitRevision(DiffFiles.SelectedItemParent)); } DiffText.ViewChanges(items, DiffFiles.SelectedItem, String.Empty); }
private void ViewSelectedDiff() { Cursor.Current = Cursors.WaitCursor; if (DiffFiles.SelectedItem != null) { if (_revision != null) { DiffText.ViewChanges(_revision.Guid, DiffFiles.SelectedItemParent, DiffFiles.SelectedItem, String.Empty); } else if (_revisionGuid != null) { Patch selectedPatch = Module.GetSingleDiff(_revisionGuid, _revisionGuid + "^", DiffFiles.SelectedItem.Name, DiffFiles.SelectedItem.OldName, DiffText.GetExtraDiffArguments(), DiffText.Encoding, true); DiffText.ViewPatch(selectedPatch); } } Cursor.Current = Cursors.Default; }
private async Task ShowSelectedFileDiff() { if (DiffFiles.SelectedItem == null || DiffFiles.Revision == null) { DiffText.ViewPatch(""); return; } if (DiffFiles.SelectedItemParent?.Guid == DiffFiles.CombinedDiffGuid) { var diffOfConflict = Module.GetCombinedDiffContent(DiffFiles.Revision, DiffFiles.SelectedItem.Name, DiffText.GetExtraDiffArguments(), DiffText.Encoding); if (string.IsNullOrWhiteSpace(diffOfConflict)) { diffOfConflict = Strings.GetUninterestingDiffOmitted(); } DiffText.ViewPatch(diffOfConflict); return; } await DiffText.ViewChanges(DiffFiles.SelectedItemParent?.Guid, DiffFiles.Revision?.Guid, DiffFiles.SelectedItem, string.Empty); }