Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
aivanov-oneinc committed Jan 31, 2018
2 parents afab431 + c2ec732 commit 57fdc57
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 143 deletions.
48 changes: 27 additions & 21 deletions GitExtensions.VS2015.sln
Original file line number Diff line number Diff line change
@@ -1,21 +1,38 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{3D5CA0E0-EF51-4488-A8B7-86CC330D7AD8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Statistics", "Statistics", "{AF6D7B1B-FAF6-4793-AC05-00C63A5BC0F5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitExtensions", "GitExtensions\GitExtensions.csproj", "{F15A69AF-7EBD-4F69-A026-5071FA3EC61B}"
ProjectSection(ProjectDependencies) = postProject
{1DC7D403-484B-43B4-B017-1356397A32CB} = {1DC7D403-484B-43B4-B017-1356397A32CB}
{A426EE0B-E52E-4D74-AF24-06797142D7B2} = {A426EE0B-E52E-4D74-AF24-06797142D7B2}
{D4628A13-CD53-401F-A645-CB16FD15ABBB} = {D4628A13-CD53-401F-A645-CB16FD15ABBB}
{31D96116-16A6-45C2-9A6D-6DD5A1FC5F20} = {31D96116-16A6-45C2-9A6D-6DD5A1FC5F20}
{699CE23D-8BBD-4C15-82E9-7A628ACCA4C6} = {699CE23D-8BBD-4C15-82E9-7A628ACCA4C6}
{921F0443-C3A1-4A09-82E8-C4AFB9654943} = {921F0443-C3A1-4A09-82E8-C4AFB9654943}
{50AEAB6C-83C4-45F8-AA01-90E1405C48AF} = {50AEAB6C-83C4-45F8-AA01-90E1405C48AF}
{B1B0C273-AB3F-48BF-92C7-DE0BE90D5870} = {B1B0C273-AB3F-48BF-92C7-DE0BE90D5870}
{6D468574-C232-4FA8-B1CB-F559579F800D} = {6D468574-C232-4FA8-B1CB-F559579F800D}
{4041B976-50D0-4C6E-ABAF-7E67458A1264} = {4041B976-50D0-4C6E-ABAF-7E67458A1264}
{101D3C78-27CC-446A-98EC-E2DE88BF0641} = {101D3C78-27CC-446A-98EC-E2DE88BF0641}
{39228D7F-9239-4A2D-8A6F-4D0F7DEB9178} = {39228D7F-9239-4A2D-8A6F-4D0F7DEB9178}
{92B57383-233E-46AE-8A86-6E98BF349A72} = {92B57383-233E-46AE-8A86-6E98BF349A72}
{E6AAC693-815B-4D1A-83D7-F4DE36072793} = {E6AAC693-815B-4D1A-83D7-F4DE36072793}
{0B131F9D-BB10-4C3E-9656-5AB858158DE5} = {0B131F9D-BB10-4C3E-9656-5AB858158DE5}
{274F449F-7472-4248-9A57-8CA665A75B5D} = {274F449F-7472-4248-9A57-8CA665A75B5D}
{452CBBA1-8AF0-4F3B-8BEB-B8B31DC2B749} = {452CBBA1-8AF0-4F3B-8BEB-B8B31DC2B749}
{7C106FAC-CB81-4D37-BE98-E7F6A5BDD143} = {7C106FAC-CB81-4D37-BE98-E7F6A5BDD143}
{687A73BB-12A0-4AF7-B420-4A9C47DB75CB} = {687A73BB-12A0-4AF7-B420-4A9C47DB75CB}
{F50B1DBF-1C9F-4437-87EC-7ABA805CC446} = {F50B1DBF-1C9F-4437-87EC-7ABA805CC446}
{121965D1-4399-4538-B8BF-403EB5B847C3} = {121965D1-4399-4538-B8BF-403EB5B847C3}
{F261BCD1-F5F7-4664-A229-E52032E6E9FD} = {F261BCD1-F5F7-4664-A229-E52032E6E9FD}
{F261BCD1-F5F7-4664-A230-E52032E6E9FD} = {F261BCD1-F5F7-4664-A230-E52032E6E9FD}
{626CA9EB-DB83-4BEB-87D5-15E3B397EF57} = {626CA9EB-DB83-4BEB-87D5-15E3B397EF57}
{8B3778F2-6049-4D4C-B94F-D5FF3A5DC7F8} = {8B3778F2-6049-4D4C-B94F-D5FF3A5DC7F8}
{7E5433F4-DD13-4D8E-95B2-59B4FFE7D636} = {7E5433F4-DD13-4D8E-95B2-59B4FFE7D636}
{EC6988F6-0E8E-42D2-8E41-E562C5FB65BC} = {EC6988F6-0E8E-42D2-8E41-E562C5FB65BC}
EndProjectSection
EndProject
Expand All @@ -31,7 +48,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitStatistics", "Plugins\St
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Setup", "Setup\Setup.wixproj", "{9380C29C-3C7F-47A8-A4C9-A5EE9D7B386A}"
ProjectSection(ProjectDependencies) = postProject
{E996BE2D-B07D-472D-9D74-3EA2D48EF269} = {E996BE2D-B07D-472D-9D74-3EA2D48EF269}
{F15A69AF-7EBD-4F69-A026-5071FA3EC61B} = {F15A69AF-7EBD-4F69-A026-5071FA3EC61B}
{F01BB9F8-40F5-4D19-A8C1-9ED8E30107B6} = {F01BB9F8-40F5-4D19-A8C1-9ED8E30107B6}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceManager", "ResourceManager\ResourceManager.csproj", "{D3440FD7-AFC5-4351-8741-6CDBF15CE944}"
Expand Down Expand Up @@ -60,25 +79,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReleaseNotesGenerator", "Pl
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TranslationApp", "TranslationApp\TranslationApp.csproj", "{7C106FAC-CB81-4D37-BE98-E7F6A5BDD143}"
ProjectSection(ProjectDependencies) = postProject
{D4628A13-CD53-401F-A645-CB16FD15ABBB} = {D4628A13-CD53-401F-A645-CB16FD15ABBB}
{31D96116-16A6-45C2-9A6D-6DD5A1FC5F20} = {31D96116-16A6-45C2-9A6D-6DD5A1FC5F20}
{699CE23D-8BBD-4C15-82E9-7A628ACCA4C6} = {699CE23D-8BBD-4C15-82E9-7A628ACCA4C6}
{921F0443-C3A1-4A09-82E8-C4AFB9654943} = {921F0443-C3A1-4A09-82E8-C4AFB9654943}
{50AEAB6C-83C4-45F8-AA01-90E1405C48AF} = {50AEAB6C-83C4-45F8-AA01-90E1405C48AF}
{B1B0C273-AB3F-48BF-92C7-DE0BE90D5870} = {B1B0C273-AB3F-48BF-92C7-DE0BE90D5870}
{101D3C78-27CC-446A-98EC-E2DE88BF0641} = {101D3C78-27CC-446A-98EC-E2DE88BF0641}
{92B57383-233E-46AE-8A86-6E98BF349A72} = {92B57383-233E-46AE-8A86-6E98BF349A72}
{E6AAC693-815B-4D1A-83D7-F4DE36072793} = {E6AAC693-815B-4D1A-83D7-F4DE36072793}
{0B131F9D-BB10-4C3E-9656-5AB858158DE5} = {0B131F9D-BB10-4C3E-9656-5AB858158DE5}
{274F449F-7472-4248-9A57-8CA665A75B5D} = {274F449F-7472-4248-9A57-8CA665A75B5D}
{452CBBA1-8AF0-4F3B-8BEB-B8B31DC2B749} = {452CBBA1-8AF0-4F3B-8BEB-B8B31DC2B749}
{687A73BB-12A0-4AF7-B420-4A9C47DB75CB} = {687A73BB-12A0-4AF7-B420-4A9C47DB75CB}
{121965D1-4399-4538-B8BF-403EB5B847C3} = {121965D1-4399-4538-B8BF-403EB5B847C3}
{F261BCD1-F5F7-4664-A229-E52032E6E9FD} = {F261BCD1-F5F7-4664-A229-E52032E6E9FD}
{F261BCD1-F5F7-4664-A230-E52032E6E9FD} = {F261BCD1-F5F7-4664-A230-E52032E6E9FD}
{8B3778F2-6049-4D4C-B94F-D5FF3A5DC7F8} = {8B3778F2-6049-4D4C-B94F-D5FF3A5DC7F8}
{7E5433F4-DD13-4D8E-95B2-59B4FFE7D636} = {7E5433F4-DD13-4D8E-95B2-59B4FFE7D636}
{EC6988F6-0E8E-42D2-8E41-E562C5FB65BC} = {EC6988F6-0E8E-42D2-8E41-E562C5FB65BC}
{E996BE2D-B07D-472D-9D74-3EA2D48EF269} = {E996BE2D-B07D-472D-9D74-3EA2D48EF269}
{F15A69AF-7EBD-4F69-A026-5071FA3EC61B} = {F15A69AF-7EBD-4F69-A026-5071FA3EC61B}
{F01BB9F8-40F5-4D19-A8C1-9ED8E30107B6} = {F01BB9F8-40F5-4D19-A8C1-9ED8E30107B6}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{BB46D906-E5AC-4CAB-B53E-BCC26AA74146}"
Expand Down Expand Up @@ -119,6 +122,9 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VS", "VS", "{D3E0C080-5AC9-45DD-91A5-4933956C3560}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitExtensionsVSIX", "GitExtensionsVSIX\GitExtensionsVSIX.csproj", "{F01BB9F8-40F5-4D19-A8C1-9ED8E30107B6}"
ProjectSection(ProjectDependencies) = postProject
{F15A69AF-7EBD-4F69-A026-5071FA3EC61B} = {F15A69AF-7EBD-4F69-A026-5071FA3EC61B}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitPluginShared", "GitPluginShared\GitPluginShared.csproj", "{C0A7B025-B7EE-477A-BAC7-A6365E7BD893}"
EndProject
Expand Down
64 changes: 0 additions & 64 deletions GitExtensions/GitExtensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -108,74 +108,10 @@
<Project>{CF5B22E7-230F-4E50-BE88-C4F7023CED2C}</Project>
<Name>GitUI</Name>
</ProjectReference>
<ProjectReference Include="..\Plugins\AutoCompileSubmodules\AutoCompileSubmodules.csproj">
<Project>{7E5433F4-DD13-4D8E-95B2-59B4FFE7D636}</Project>
<Name>AutoCompileSubmodules</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Plugins\BackgroundFetch\BackgroundFetch.csproj">
<Project>{F261BCD1-F5F7-4664-A230-E52032E6E9FD}</Project>
<Name>BackgroundFetch</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Plugins\CreateLocalBranches\CreateLocalBranches.csproj">
<Project>{31D96116-16A6-45C2-9A6D-6DD5A1FC5F20}</Project>
<Name>CreateLocalBranches</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Plugins\DeleteUnusedBranches\DeleteUnusedBranches.csproj">
<Project>{921F0443-C3A1-4A09-82E8-C4AFB9654943}</Project>
<Name>DeleteUnusedBranches</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Plugins\FindLargeFiles\FindLargeFiles.csproj">
<Project>{F261BCD1-F5F7-4664-A229-E52032E6E9FD}</Project>
<Name>FindLargeFiles</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Plugins\Gerrit\Gerrit.csproj">
<Project>{EC6988F6-0E8E-42D2-8E41-E562C5FB65BC}</Project>
<Name>Gerrit</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Plugins\Github3\Github3.csproj">
<Project>{B1B0C273-AB3F-48BF-92C7-DE0BE90D5870}</Project>
<Name>Github3</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Plugins\GitUIPluginInterfaces\GitUIPluginInterfaces.csproj">
<Project>{27559302-F35E-4B62-A6EC-11FF21A5FA6F}</Project>
<Name>GitUIPluginInterfaces</Name>
</ProjectReference>
<ProjectReference Include="..\Plugins\Gource\Gource.csproj">
<Project>{687A73BB-12A0-4AF7-B420-4A9C47DB75CB}</Project>
<Name>Gource</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Plugins\ProxySwitcher\ProxySwitcher.csproj">
<Project>{274F449F-7472-4248-9A57-8CA665A75B5D}</Project>
<Name>ProxySwitcher</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Plugins\ReleaseNotesGenerator\ReleaseNotesGenerator.csproj">
<Project>{8B3778F2-6049-4D4C-B94F-D5FF3A5DC7F8}</Project>
<Name>ReleaseNotesGenerator</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Plugins\Bitbucket\Bitbucket.csproj">
<Project>{50AEAB6C-83C4-45F8-AA01-90E1405C48AF}</Project>
<Name>Bitbucket</Name>
</ProjectReference>
<ProjectReference Include="..\Plugins\Statistics\GitImpact\GitImpact.csproj">
<Project>{0B131F9D-BB10-4C3E-9656-5AB858158DE5}</Project>
<Name>GitImpact</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Plugins\Statistics\GitStatistics\GitStatistics.csproj">
<Project>{92B57383-233E-46AE-8A86-6E98BF349A72}</Project>
<Name>GitStatistics</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\GitCommands\GitCommands.csproj">
<Project>{BD6AA2A2-997D-4AFF-ACC7-B64F6E51D181}</Project>
<Name>GitCommands</Name>
Expand Down
1 change: 1 addition & 0 deletions Plugins/DeleteUnusedBranches/DeleteUnusedBranches.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Branch.cs" />
<Compile Include="DeleteUnusedBranchesFormSettings.cs" />
<Compile Include="DeleteUnusedBranchesPlugin.cs" />
<Compile Include="DeleteUnusedBranchesForm.cs">
<SubType>Form</SubType>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 28 additions & 49 deletions Plugins/DeleteUnusedBranches/DeleteUnusedBranchesForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ public sealed partial class DeleteUnusedBranchesForm : GitExtensionsFormBase
private readonly TranslationString _searchBranches = new TranslationString("Search branches");
private readonly TranslationString _loading = new TranslationString("Loading...");
private readonly TranslationString _branchesSelected = new TranslationString("{0}/{1} branches selected.");
private readonly DeleteUnusedBranchesFormSettings _settings;

private readonly SortableBranchesList _branches = new SortableBranchesList();
private int _days;
private string _referenceBranch;
private readonly IGitModule _gitCommands;
private readonly IGitUICommands _gitUiCommands;
private readonly IGitPlugin _gitPlugin;
Expand All @@ -40,14 +39,11 @@ public DeleteUnusedBranchesForm()
Translate();
}

public DeleteUnusedBranchesForm(int days, string referenceBranch, IGitModule gitCommands, IGitUICommands gitUiCommands, IGitPlugin gitPlugin)
public DeleteUnusedBranchesForm(DeleteUnusedBranchesFormSettings settings, IGitModule gitCommands, IGitUICommands gitUiCommands, IGitPlugin gitPlugin)
: this()
{
InitializeComponent();
Translate();

this._referenceBranch = referenceBranch;
this._days = days;
this._gitCommands = gitCommands;
_settings = settings;
_gitCommands = gitCommands;
_gitUiCommands = gitUiCommands;
_gitPlugin = gitPlugin;
imgLoading.Image = IsMonoRuntime() ? Resources.loadingpanel_static : Resources.loadingpanel;
Expand All @@ -58,11 +54,17 @@ protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);

mergedIntoBranch.Text = _referenceBranch;
olderThanDays.Value = _days;
mergedIntoBranch.Text = _settings.MergedInBranch;
olderThanDays.Value = _settings.DaysOlderThan;
IncludeRemoteBranches.Checked = _settings.DeleteRemoteBranchesFromFlag;
_NO_TRANSLATE_Remote.Text = _settings.RemoteName;
useRegexFilter.Checked = _settings.UseRegexToFilterBranchesFlag;
regexFilter.Text = _settings.RegexFilter;
useRegexCaseInsensitive.Checked = _settings.RegexCaseInsensitiveFlag;
regexDoesNotMatch.Checked = _settings.RegexInvertedFlag;
includeUnmergedBranches.Checked = _settings.IncludeUnmergedBranchesFlag;

BranchesGrid.DataSource = _branches;
ClearResults();
}

private static IEnumerable<Branch> GetObsoleteBranches(RefreshContext context, string curBranch)
Expand Down Expand Up @@ -168,49 +170,17 @@ private void buttonSettings_Click(object sender, EventArgs e)
_gitUiCommands.StartSettingsDialog(_gitPlugin);
}

private void IncludeRemoteBranches_CheckedChanged(object sender, EventArgs e)
{
ClearResults();
}

private void useRegexFilter_CheckedChanged(object sender, EventArgs e)
{
ClearResults();
}

private void remote_TextChanged(object sender, EventArgs e)
{
ClearResults();
}

private void regexFilter_TextChanged(object sender, EventArgs e)
{
ClearResults();
}

private void mergedIntoBranch_TextChanged(object sender, EventArgs e)
{
_referenceBranch = mergedIntoBranch.Text;
ClearResults();
}

private void includeUnmergedBranches_CheckedChanged(object sender, EventArgs e)
{
ClearResults();
ClearResults(sender, e);

if (includeUnmergedBranches.Checked)
MessageBox.Show(this, _deletingUnmergedBranches.Text, _deleteCaption.Text, MessageBoxButtons.OK);
}

private void olderThanDays_ValueChanged(object sender, EventArgs e)
{
_days = (int)olderThanDays.Value;
ClearResults();
}

private void ClearResults()
private void ClearResults(object sender, EventArgs e)
{
instructionLabel.Text = string.Format(_chooseBrancesToDelete.Text, _referenceBranch);
instructionLabel.Text = string.Format(_chooseBrancesToDelete.Text, mergedIntoBranch.Text);
lblStatus.Text = string.Format(_pressToSearch.Text, RefreshBtn.Text);
_branches.Clear();
_branches.ResetBindings();
Expand Down Expand Up @@ -242,8 +212,17 @@ private void RefreshObsoleteBranches()

IsRefreshing = true;
var curBranch = _gitUiCommands.GitModule.GetSelectedBranch();
var context = new RefreshContext(_gitCommands, IncludeRemoteBranches.Checked, includeUnmergedBranches.Checked, _referenceBranch, _NO_TRANSLATE_Remote.Text,
useRegexFilter.Checked ? regexFilter.Text : null, useRegexCaseInsensitive.Checked ? useRegexCaseInsensitive.Checked : false, regexDoesNotMatch.Checked ? regexDoesNotMatch.Checked : false, TimeSpan.FromDays(_days), _refreshCancellation.Token);
var context = new RefreshContext(
_gitCommands,
IncludeRemoteBranches.Checked,
includeUnmergedBranches.Checked,
mergedIntoBranch.Text,
_NO_TRANSLATE_Remote.Text,
useRegexFilter.Checked ? regexFilter.Text : null,
useRegexCaseInsensitive.Checked ? useRegexCaseInsensitive.Checked : false,
regexDoesNotMatch.Checked ? regexDoesNotMatch.Checked : false,
TimeSpan.FromDays((int)olderThanDays.Value),
_refreshCancellation.Token);
Task.Factory.StartNew(() => GetObsoleteBranches(context, curBranch).ToList(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default)
.ContinueWith(task =>
{
Expand Down
Loading

0 comments on commit 57fdc57

Please sign in to comment.