This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed
src/GitHub.App/ViewModels/GitHubPane Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -678,20 +678,32 @@ IObservable<Unit> DoPush(object unused)
678678
679679 async Task DoSyncSubmodules ( object unused )
680680 {
681- usageTracker . IncrementCounter ( x => x . NumberOfSyncSubmodules ) . Forget ( ) ;
681+ try
682+ {
683+ IsBusy = true ;
684+ usageTracker . IncrementCounter ( x => x . NumberOfSyncSubmodules ) . Forget ( ) ;
682685
683- var progress = new CaptureProgress ( ) ;
684- var complete = await pullRequestsService . SyncSubmodules ( LocalRepository , progress ) ;
685- if ( ! complete )
686+ var progress = new CaptureProgress ( ) ;
687+ var complete = await pullRequestsService . SyncSubmodules ( LocalRepository , progress ) ;
688+ if ( ! complete )
689+ {
690+ throw new ApplicationException ( progress . ToString ( ) ) ;
691+ }
692+ }
693+ finally
686694 {
687- throw new ApplicationException ( progress . ToString ( ) ) ;
695+ IsBusy = false ;
688696 }
689697 }
690698
691699 sealed class CaptureProgress : IProgress < string > , IDisposable
692700 {
693701 StringWriter writer = new StringWriter ( CultureInfo . CurrentCulture ) ;
694- public void Report ( string value ) => writer . WriteLine ( value ) ;
702+ public void Report ( string value )
703+ {
704+ VisualStudio . Services . Dte . StatusBar . Text = value ;
705+ writer . WriteLine ( value ) ;
706+ }
695707 public override string ToString ( ) => writer . ToString ( ) ;
696708 public void Dispose ( ) => writer . Dispose ( ) ;
697709 }
You can’t perform that action at this time.
0 commit comments