Skip to content

Commit 6507095

Browse files
authored
Revert "SCM - add trace logging to the active repository controller to track down stale status bar items (microsoft#259804)" (microsoft#263265)
This reverts commit 9224064.
1 parent 2c61594 commit 6507095

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

src/vs/workbench/api/browser/mainThreadSCM.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import { ITextModel } from '../../../editor/common/model.js';
3030
import { structuralEquals } from '../../../base/common/equals.js';
3131
import { historyItemBaseRefColor, historyItemRefColor, historyItemRemoteRefColor } from '../../contrib/scm/browser/scmHistory.js';
3232
import { ColorIdentifier } from '../../../platform/theme/common/colorUtils.js';
33-
import { ILogService } from '../../../platform/log/common/log.js';
3433

3534
function getIconFromIconDto(iconDto?: UriComponents | { light: UriComponents; dark: UriComponents } | ThemeIcon): URI | { light: URI; dark: URI } | ThemeIcon | undefined {
3635
if (iconDto === undefined) {
@@ -313,7 +312,6 @@ class MainThreadSCMProvider implements ISCMProvider {
313312
private readonly _rootUri: URI | undefined,
314313
private readonly _iconPath: URI | { light: URI; dark: URI } | ThemeIcon | undefined,
315314
private readonly _inputBoxTextModel: ITextModel,
316-
private readonly _logService: ILogService,
317315
private readonly _quickDiffService: IQuickDiffService,
318316
private readonly _uriIdentService: IUriIdentityService,
319317
private readonly _workspaceContextService: IWorkspaceContextService
@@ -348,8 +346,6 @@ class MainThreadSCMProvider implements ISCMProvider {
348346
}
349347

350348
if (typeof features.statusBarCommands !== 'undefined') {
351-
this._logService.trace('[MainThreadSCMProvider][$updateSourceControl] rootUri: ', this.rootUri?.toString());
352-
this._logService.trace('[MainThreadSCMProvider][$updateSourceControl] statusBarCommands: ', features.statusBarCommands);
353349
this._statusBarCommands.set(features.statusBarCommands, undefined);
354350
}
355351

@@ -556,7 +552,6 @@ export class MainThreadSCM implements MainThreadSCMShape {
556552
@ISCMService private readonly scmService: ISCMService,
557553
@ISCMViewService private readonly scmViewService: ISCMViewService,
558554
@ILanguageService private readonly languageService: ILanguageService,
559-
@ILogService private readonly logService: ILogService,
560555
@IModelService private readonly modelService: IModelService,
561556
@ITextModelService private readonly textModelService: ITextModelService,
562557
@IQuickDiffService private readonly quickDiffService: IQuickDiffService,
@@ -582,7 +577,7 @@ export class MainThreadSCM implements MainThreadSCMShape {
582577
this._repositoryBarriers.set(handle, new Barrier());
583578

584579
const inputBoxTextModelRef = await this.textModelService.createModelReference(URI.revive(inputBoxDocumentUri));
585-
const provider = new MainThreadSCMProvider(this._proxy, handle, parentHandle, id, label, rootUri ? URI.revive(rootUri) : undefined, getIconFromIconDto(iconPath), inputBoxTextModelRef.object.textEditorModel, this.logService, this.quickDiffService, this._uriIdentService, this.workspaceContextService);
580+
const provider = new MainThreadSCMProvider(this._proxy, handle, parentHandle, id, label, rootUri ? URI.revive(rootUri) : undefined, getIconFromIconDto(iconPath), inputBoxTextModelRef.object.textEditorModel, this.quickDiffService, this._uriIdentService, this.workspaceContextService);
586581
const repository = this.scmService.registerSCMProvider(provider);
587582
this._repositories.set(handle, repository);
588583

src/vs/workbench/contrib/scm/browser/activity.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import { autorun, autorunWithStore, derived, IObservable, observableFromEvent }
2424
import { observableConfigValue } from '../../../../platform/observable/common/platformObservableUtils.js';
2525
import { Command } from '../../../../editor/common/languages.js';
2626
import { ThemeIcon } from '../../../../base/common/themables.js';
27-
import { ILogService } from '../../../../platform/log/common/log.js';
2827

2928
const ActiveRepositoryContextKeys = {
3029
ActiveRepositoryName: new RawContextKey<string>('scmActiveRepositoryName', ''),
@@ -45,7 +44,6 @@ export class SCMActiveRepositoryController extends Disposable implements IWorkbe
4544
@IActivityService private readonly activityService: IActivityService,
4645
@IConfigurationService private readonly configurationService: IConfigurationService,
4746
@IContextKeyService private readonly contextKeyService: IContextKeyService,
48-
@ILogService private readonly logService: ILogService,
4947
@ISCMService private readonly scmService: ISCMService,
5048
@ISCMViewService private readonly scmViewService: ISCMViewService,
5149
@IStatusbarService private readonly statusbarService: IStatusbarService,
@@ -111,15 +109,10 @@ export class SCMActiveRepositoryController extends Disposable implements IWorkbe
111109
}));
112110

113111
this._register(autorunWithStore((reader, store) => {
114-
this.logService.trace('[SCMActiveRepositoryController][updateStatusBarAutorun] start');
115112
const repository = this.scmViewService.activeRepository.read(reader);
116113
const commands = repository?.provider.statusBarCommands.read(reader);
117114

118-
this.logService.trace('[SCMActiveRepositoryController][updateStatusBarAutorun] commands: ', commands);
119-
this.logService.trace('[SCMActiveRepositoryController][updateStatusBarAutorun] repository: ', repository?.provider.rootUri?.toString());
120-
121115
this._updateStatusBar(repository, commands ?? [], store);
122-
this.logService.trace('[SCMActiveRepositoryController][updateStatusBarAutorun] end');
123116
}));
124117

125118
this._register(autorun(reader => {
@@ -145,7 +138,6 @@ export class SCMActiveRepositoryController extends Disposable implements IWorkbe
145138

146139
private _updateStatusBar(repository: ISCMRepository | undefined, commands: readonly Command[], store: DisposableStore): void {
147140
if (!repository) {
148-
this.logService.trace('[SCMActiveRepositoryController][_updateStatusBar] no active repository');
149141
return;
150142
}
151143

0 commit comments

Comments
 (0)