public FormFileHistory(GitUICommands aCommands, string fileName, GitRevision revision, bool filterByRevision) : this(aCommands) { FileChanges.SetInitialRevision(revision); Translate(); FileChanges.ShowBuildServerInfo = true; FileName = fileName; SetTitle(string.Empty); Diff.ExtraDiffArgumentsChanged += DiffExtraDiffArgumentsChanged; bool isSubmodule = GitModule.IsValidGitWorkingDir(Path.Combine(Module.WorkingDir, FileName)); if (revision != null && revision.IsArtificial() || isSubmodule) //no blame for artificial { tabControl1.RemoveIfExists(BlameTab); } FileChanges.SelectionChanged += FileChangesSelectionChanged; FileChanges.DisableContextMenu(); UpdateFollowHistoryMenuItems(); fullHistoryToolStripMenuItem.Checked = AppSettings.FullHistoryInFileHistory; loadHistoryOnShowToolStripMenuItem.Checked = AppSettings.LoadFileHistoryOnShow; loadBlameOnShowToolStripMenuItem.Checked = AppSettings.LoadBlameOnShow && tabControl1.Contains(BlameTab); saveAsToolStripMenuItem.Visible = !isSubmodule; if (filterByRevision && revision != null && revision.Guid != null) { _filterBranchHelper.SetBranchFilter(revision.Guid, false); } }
public FormFileHistory(GitUICommands aCommands, string fileName, GitRevision revision, bool filterByRevision) : this(aCommands) { FileChanges.SetInitialRevision(revision); Translate(); FileChanges.ShowBuildServerInfo = true; FileName = fileName; SetTitle(string.Empty); Diff.ExtraDiffArgumentsChanged += DiffExtraDiffArgumentsChanged; FileChanges.SelectionChanged += FileChangesSelectionChanged; FileChanges.DisableContextMenu(); followFileHistoryToolStripMenuItem.Checked = AppSettings.FollowRenamesInFileHistory; fullHistoryToolStripMenuItem.Checked = AppSettings.FullHistoryInFileHistory; loadHistoryOnShowToolStripMenuItem.Checked = AppSettings.LoadFileHistoryOnShow; loadBlameOnShowToolStripMenuItem.Checked = AppSettings.LoadBlameOnShow; if (filterByRevision && revision != null && revision.Guid != null) { _filterBranchHelper.SetBranchFilter(revision.Guid, false); } }
public FormFileHistory(GitUICommands commands, string fileName, GitRevision revision = null, bool filterByRevision = false, bool showBlame = false) : this(commands) { FileChanges.InitialObjectId = revision?.ObjectId; FileChanges.ShowBuildServerInfo = true; FileName = fileName; SetTitle(); Diff.ExtraDiffArgumentsChanged += (sender, e) => UpdateSelectedFileViewers(); var isSubmodule = GitModule.IsValidGitWorkingDir(_fullPathResolver.Resolve(FileName)); if (isSubmodule) { tabControl1.RemoveIfExists(BlameTab); } FileChanges.SelectionChanged += FileChangesSelectionChanged; FileChanges.DisableContextMenu(); bool blameTabExists = tabControl1.Contains(BlameTab); UpdateFollowHistoryMenuItems(); fullHistoryToolStripMenuItem.Checked = AppSettings.FullHistoryInFileHistory; showFullHistoryToolStripMenuItem.Checked = AppSettings.FullHistoryInFileHistory; simplifyMergesToolStripMenuItem.Checked = AppSettings.SimplifyMergesInFileHistory; simplifyMergesToolStripMenuItem.Enabled = AppSettings.FullHistoryInFileHistory; simplifyMergesContextMenuItem.Checked = AppSettings.SimplifyMergesInFileHistory; simplifyMergesContextMenuItem.Enabled = AppSettings.FullHistoryInFileHistory; loadHistoryOnShowToolStripMenuItem.Checked = AppSettings.LoadFileHistoryOnShow; loadBlameOnShowToolStripMenuItem.Checked = AppSettings.LoadBlameOnShow && blameTabExists; saveAsToolStripMenuItem.Visible = !isSubmodule; toolStripBlameOptions.Visible = blameTabExists; if (blameTabExists) { ignoreWhitespaceToolStripMenuItem.Checked = AppSettings.IgnoreWhitespaceOnBlame; detectMoveAndCopyInAllFilesToolStripMenuItem.Checked = AppSettings.DetectCopyInAllOnBlame; detectMoveAndCopyInThisFileToolStripMenuItem.Checked = AppSettings.DetectCopyInFileOnBlame; displayAuthorFirstToolStripMenuItem.Checked = AppSettings.BlameDisplayAuthorFirst; showAuthorAvatarToolStripMenuItem.Checked = AppSettings.BlameShowAuthorAvatar; showAuthorToolStripMenuItem.Checked = AppSettings.BlameShowAuthor; showAuthorDateToolStripMenuItem.Checked = AppSettings.BlameShowAuthorDate; showAuthorTimeToolStripMenuItem.Checked = AppSettings.BlameShowAuthorTime; showLineNumbersToolStripMenuItem.Checked = AppSettings.BlameShowLineNumbers; showOriginalFilePathToolStripMenuItem.Checked = AppSettings.BlameShowOriginalFilePath; } if (filterByRevision && revision?.ObjectId != null) { _filterBranchHelper.SetBranchFilter(revision.Guid, false); } tabControl1.SelectedTab = blameTabExists && showBlame ? BlameTab : DiffTab; }
public FormFileHistory(GitUICommands aCommands, string fileName, GitRevision revision, bool filterByRevision) : this(aCommands) { FileChanges.SetInitialRevision(revision?.Guid); Translate(); FileChanges.ShowBuildServerInfo = true; FileName = fileName; SetTitle(string.Empty); Diff.ExtraDiffArgumentsChanged += DiffExtraDiffArgumentsChanged; bool isSubmodule = GitModule.IsValidGitWorkingDir(_fullPathResolver.Resolve(FileName)); if (isSubmodule) { tabControl1.RemoveIfExists(BlameTab); } FileChanges.SelectionChanged += FileChangesSelectionChanged; FileChanges.DisableContextMenu(); bool blameTabExists = tabControl1.Contains(BlameTab); UpdateFollowHistoryMenuItems(); fullHistoryToolStripMenuItem.Checked = AppSettings.FullHistoryInFileHistory; ShowFullHistory.Checked = AppSettings.FullHistoryInFileHistory; loadHistoryOnShowToolStripMenuItem.Checked = AppSettings.LoadFileHistoryOnShow; loadBlameOnShowToolStripMenuItem.Checked = AppSettings.LoadBlameOnShow && blameTabExists; saveAsToolStripMenuItem.Visible = !isSubmodule; toolStripBlameOptions.Visible = blameTabExists; if (blameTabExists) { ignoreWhitespaceToolStripMenuItem.Checked = AppSettings.IgnoreWhitespaceOnBlame; detectMoveAndCopyInAllFilesToolStripMenuItem.Checked = AppSettings.DetectCopyInFileOnBlame; detectMoveAndCopyInThisFileToolStripMenuItem.Checked = AppSettings.DetectCopyInAllOnBlame; } if (filterByRevision && revision != null && revision.Guid != null) { _filterBranchHelper.SetBranchFilter(revision.Guid, false); } }
private void FilterInRevisionGrid(BaseBranchNode branch) { FilterBranchHelper.SetBranchFilter(branch.FullPath, refresh: true); }