Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix workitem 17795: Automatically save items when refreshing

  • Loading branch information...
commit c3c5d0629c714255dd7297cd714d6b7e53cefd0d 1 parent 2270ddf
@yysun authored
View
2  BasicSccProvider.Tests/PackageTest.cs
@@ -69,7 +69,7 @@ public void TestHasProjectOpened()
//Get the global service provider and the dte
IServiceProvider sp = VsIdeTestHostContext.ServiceProvider;
DTE dte = (DTE)sp.GetService(typeof(DTE));
- dte.Solution.Open(@"C:\Users\Eric\Documents\Visual Studio 2010\Projects\Solution1 - Multiple Git\Solution1 - Multiple Git.sln");
+ dte.Solution.Open(@"E:\Users\Public\My Projects\GitScc\Publish\TestProjects\UTF8Test\UTF8Test.sln");
});
}
View
11 PendingChangesToolWindow.cs
@@ -63,20 +63,29 @@ public override void OnToolWindowCreated()
{
sccProviderService = BasicSccProvider.GetServiceEx<SccProviderService>();
Refresh(sccProviderService.CurrentTracker, true); // refresh when the tool window becomes visible
- }
+ }
+
+ internal bool hasFileSaved()
+ {
+ var dte = BasicSccProvider.GetServiceEx<EnvDTE.DTE>();
+ return dte.ItemOperations.PromptToSave != EnvDTE.vsPromptResult.vsPromptResultCancelled;
+ }
internal void OnCommitCommand()
{
+ if (!hasFileSaved()) return;
((PendingChangesView)control).Commit();
}
internal void OnAmendCommitCommand()
{
+ if (!hasFileSaved()) return;
((PendingChangesView)control).AmendCommit();
}
private void OnRefreshCommand(object sender, EventArgs e)
{
+ hasFileSaved(); //just a reminder, refresh anyway
sccProviderService.OpenTracker();
sccProviderService.RefreshNodesGlyphs();
Refresh(sccProviderService.CurrentTracker, true);
View
5 Readme.htm
@@ -30,8 +30,9 @@
<li>Prompt user to set name and email for git, if not already</li>
<li>Support bulk file deletion</li>
<li>Merge pull requests, #27, #28, #32, #34 from github</li>
- <li>Bug fix: <a href="http://gitscc.codeplex.com/workitem/17798">Allow commit of selected changes via Ctrl+Enter</a></li>
- <li>Bug fix: <a href="http://gitscc.codeplex.com/workitem/17792">Git Refresh not working in Pending Changes when auto refresh is disabled</a></li>
+ <li><a href="http://gitscc.codeplex.com/workitem/17798">Allow commit of selected changes via Ctrl+Enter</a></li>
+ <li><a href="http://gitscc.codeplex.com/workitem/17795">Automatically save items when refreshing</a>
+ <li><a href="http://gitscc.codeplex.com/workitem/17792">Git Refresh not working in Pending Changes when auto refresh is disabled</a></li>
</ul>
<strong>V 0.9.6.1 </strong>
<ul>
Please sign in to comment.
Something went wrong with that request. Please try again.