Ver a proveniência

Reorders imports (via tslint) and moves some files for better structure

main
Eric Amodio há 6 anos
ascendente
cometimento
8939ac3ed1
176 ficheiros alterados com 4354 adições e 4419 eliminações
  1. +2
    -2
      src/annotations/annotationProvider.ts
  2. +2
    -2
      src/annotations/annotations.ts
  3. +4
    -4
      src/annotations/blameAnnotationProvider.ts
  4. +5
    -5
      src/annotations/fileAnnotationController.ts
  5. +3
    -3
      src/annotations/gutterBlameAnnotationProvider.ts
  6. +3
    -3
      src/annotations/heatmapBlameAnnotationProvider.ts
  7. +0
    -71
      src/annotations/hoverBlameAnnotationProvider.ts
  8. +4
    -4
      src/annotations/lineAnnotationController.ts
  9. +4
    -4
      src/annotations/recentChangesAnnotationProvider.ts
  10. +5
    -5
      src/codelens/codeLensController.ts
  11. +8
    -8
      src/codelens/gitCodeLensProvider.ts
  12. +4
    -4
      src/codelens/gitRevisionCodeLensProvider.ts
  13. +1
    -1
      src/commands/clearFileAnnotations.ts
  14. +2
    -2
      src/commands/closeUnchangedFiles.ts
  15. +3
    -3
      src/commands/common.ts
  16. +2
    -2
      src/commands/copyMessageToClipboard.ts
  17. +2
    -2
      src/commands/copyShaToClipboard.ts
  18. +2
    -2
      src/commands/diffBranchWithBranch.ts
  19. +10
    -4
      src/commands/diffDirectory.ts
  20. +2
    -2
      src/commands/diffLineWithPrevious.ts
  21. +3
    -3
      src/commands/diffLineWithWorking.ts
  22. +2
    -2
      src/commands/diffWith.ts
  23. +5
    -5
      src/commands/diffWithBranch.ts
  24. +3
    -3
      src/commands/diffWithNext.ts
  25. +4
    -4
      src/commands/diffWithPrevious.ts
  26. +5
    -5
      src/commands/diffWithRevision.ts
  27. +2
    -2
      src/commands/diffWithWorking.ts
  28. +2
    -3
      src/commands/externalDiff.ts
  29. +5
    -5
      src/commands/openBranchInRemote.ts
  30. +4
    -4
      src/commands/openBranchesInRemote.ts
  31. +2
    -2
      src/commands/openChangedFiles.ts
  32. +1
    -1
      src/commands/openCommitInRemote.ts
  33. +5
    -5
      src/commands/openFileInRemote.ts
  34. +4
    -4
      src/commands/openFileRevision.ts
  35. +3
    -3
      src/commands/openInRemote.ts
  36. +4
    -4
      src/commands/openRepoInRemote.ts
  37. +2
    -2
      src/commands/openWorkingFile.ts
  38. +1
    -1
      src/commands/resetSuppressedWarnings.ts
  39. +3
    -7
      src/commands/showCommitSearch.ts
  40. +1
    -1
      src/commands/showGitExplorer.ts
  41. +1
    -1
      src/commands/showHistoryExplorer.ts
  42. +1
    -1
      src/commands/showLastQuickPick.ts
  43. +3
    -3
      src/commands/showQuickBranchHistory.ts
  44. +8
    -8
      src/commands/showQuickCommitDetails.ts
  45. +8
    -8
      src/commands/showQuickCommitFileDetails.ts
  46. +2
    -2
      src/commands/showQuickCurrentBranchHistory.ts
  47. +7
    -7
      src/commands/showQuickFileHistory.ts
  48. +2
    -2
      src/commands/showQuickRepoStatus.ts
  49. +3
    -3
      src/commands/showQuickStashList.ts
  50. +1
    -1
      src/commands/showResultsExplorer.ts
  51. +3
    -3
      src/commands/stashApply.ts
  52. +2
    -2
      src/commands/stashDelete.ts
  53. +2
    -3
      src/commands/stashSave.ts
  54. +2
    -2
      src/commands/switchMode.ts
  55. +1
    -1
      src/commands/toggleCodeLens.ts
  56. +1
    -1
      src/commands/toggleFileBlame.ts
  57. +2
    -2
      src/commands/toggleFileHeatmap.ts
  58. +2
    -2
      src/commands/toggleFileRecentChanges.ts
  59. +1
    -1
      src/commands/toggleLineBlame.ts
  60. +2
    -2
      src/configuration.ts
  61. +9
    -9
      src/container.ts
  62. +3
    -3
      src/extension.ts
  63. +2
    -2
      src/git/formatters/commitFormatter.ts
  64. +3
    -3
      src/git/formatters/statusFormatter.ts
  65. +4
    -4
      src/git/git.ts
  66. +1
    -1
      src/git/gitLocator.ts
  67. +2
    -2
      src/git/gitUri.ts
  68. +1
    -1
      src/git/models/blame.ts
  69. +2
    -2
      src/git/models/commit.ts
  70. +3
    -3
      src/git/models/logCommit.ts
  71. +3
    -3
      src/git/models/repository.ts
  72. +2
    -2
      src/git/models/status.ts
  73. +1
    -1
      src/git/parsers/blameParser.ts
  74. +2
    -3
      src/git/parsers/logParser.ts
  75. +1
    -1
      src/git/parsers/remoteParser.ts
  76. +1
    -1
      src/git/parsers/stashParser.ts
  77. +1
    -1
      src/git/remotes/custom.ts
  78. +2
    -2
      src/git/remotes/factory.ts
  79. +1
    -1
      src/git/shell.ts
  80. +1
    -1
      src/gitContentProvider.ts
  81. +5
    -5
      src/gitService.ts
  82. +4
    -4
      src/hovers/lineHoverController.ts
  83. +5
    -5
      src/quickPicks/branchHistoryQuickPick.ts
  84. +1
    -1
      src/quickPicks/branchesAndTagsQuickPick.ts
  85. +1
    -1
      src/quickPicks/branchesQuickPick.ts
  86. +6
    -6
      src/quickPicks/commitFileQuickPick.ts
  87. +11
    -11
      src/quickPicks/commitQuickPick.ts
  88. +2
    -2
      src/quickPicks/commitsQuickPick.ts
  89. +70
    -70
      src/quickPicks/commonQuickPicks.ts
  90. +12
    -8
      src/quickPicks/fileHistoryQuickPick.ts
  91. +1
    -1
      src/quickPicks/modesQuickPick.ts
  92. +0
    -15
      src/quickPicks/quickPicks.ts
  93. +3
    -3
      src/quickPicks/remotesQuickPick.ts
  94. +8
    -8
      src/quickPicks/repoStatusQuickPick.ts
  95. +2
    -2
      src/quickPicks/repositoriesQuickPick.ts
  96. +2
    -2
      src/quickPicks/stashListQuickPick.ts
  97. +15
    -0
      src/quickpicks.ts
  98. +6
    -6
      src/statusbar/statusBarController.ts
  99. +2
    -2
      src/trackers/activeEditorTracker.ts
  100. +3
    -3
      src/trackers/documentTracker.ts

+ 2
- 2
src/annotations/annotationProvider.ts Ver ficheiro

@ -1,5 +1,4 @@
'use strict';
import { Functions } from '../system';
import {
DecorationOptions,
Disposable,
@ -11,9 +10,10 @@ import {
Uri,
window
} from 'vscode';
import { FileAnnotationType } from '../configuration';
import { TextDocumentComparer } from '../comparers';
import { FileAnnotationType } from '../configuration';
import { CommandContext, setCommandContext } from '../constants';
import { Functions } from '../system';
import { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker';
export enum AnnotationStatus {

+ 2
- 2
src/annotations/annotations.ts Ver ficheiro

@ -1,4 +1,3 @@
import { Objects, Strings } from '../system';
import {
DecorationInstanceRenderOptions,
DecorationOptions,
@ -13,7 +12,7 @@ import {
ShowQuickCommitDetailsCommand,
ShowQuickCommitFileDetailsCommand
} from '../commands';
import { FileAnnotationType } from './../configuration';
import { FileAnnotationType } from '../configuration';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import {
@ -25,6 +24,7 @@ import {
GitUri,
ICommitFormatOptions
} from '../gitService';
import { Objects, Strings } from '../system';
import { toRgba } from '../ui/shared/colors';
export interface ComputedHeatmap {

+ 4
- 4
src/annotations/blameAnnotationProvider.ts Ver ficheiro

@ -1,5 +1,4 @@
'use strict';
import { Arrays, Iterables } from '../system';
import {
CancellationToken,
Disposable,
@ -12,11 +11,12 @@ import {
TextEditor,
TextEditorDecorationType
} from 'vscode';
import { AnnotationProviderBase } from './annotationProvider';
import { Annotations, ComputedHeatmap } from './annotations';
import { Container } from '../container';
import { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker';
import { GitBlame, GitCommit, GitUri } from '../gitService';
import { Arrays, Iterables } from '../system';
import { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker';
import { AnnotationProviderBase } from './annotationProvider';
import { Annotations, ComputedHeatmap } from './annotations';
export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase {
protected _blame: Promise<GitBlame | undefined>;

+ 5
- 5
src/annotations/fileAnnotationController.ts Ver ficheiro

@ -1,5 +1,5 @@
'use strict';
import { Functions, Iterables } from '../system';
import * as path from 'path';
import {
ConfigurationChangeEvent,
DecorationRangeBehavior,
@ -18,21 +18,21 @@ import {
window,
workspace
} from 'vscode';
import { AnnotationProviderBase, AnnotationStatus, TextEditorCorrelationKey } from './annotationProvider';
import { AnnotationsToggleMode, configuration, FileAnnotationType, HighlightLocations } from '../configuration';
import { CommandContext, isTextEditor, setCommandContext } from '../constants';
import { Container } from '../container';
import { KeyboardScope, KeyCommand, Keys } from '../keyboard';
import { Logger } from '../logger';
import { Functions, Iterables } from '../system';
import {
DocumentBlameStateChangeEvent,
DocumentDirtyStateChangeEvent,
GitDocumentState
} from '../trackers/gitDocumentTracker';
import { AnnotationProviderBase, AnnotationStatus, TextEditorCorrelationKey } from './annotationProvider';
import { GutterBlameAnnotationProvider } from './gutterBlameAnnotationProvider';
import { HeatmapBlameAnnotationProvider } from './heatmapBlameAnnotationProvider';
import { KeyboardScope, KeyCommand, Keys } from '../keyboard';
import { Logger } from '../logger';
import { RecentChangesAnnotationProvider } from './recentChangesAnnotationProvider';
import * as path from 'path';
export enum AnnotationClearReason {
User = 'User',

+ 3
- 3
src/annotations/gutterBlameAnnotationProvider.ts Ver ficheiro

@ -1,13 +1,13 @@
'use strict';
import { Objects, Strings } from '../system';
import { DecorationOptions, DecorationRenderOptions, Range, TextEditorDecorationType, window } from 'vscode';
import { Annotations } from './annotations';
import { BlameAnnotationProviderBase } from './blameAnnotationProvider';
import { FileAnnotationType, GravatarDefaultStyle } from '../configuration';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitBlameCommit, ICommitFormatOptions } from '../gitService';
import { Logger } from '../logger';
import { Objects, Strings } from '../system';
import { Annotations } from './annotations';
import { BlameAnnotationProviderBase } from './blameAnnotationProvider';
export class GutterBlameAnnotationProvider extends BlameAnnotationProviderBase {
async onProvideAnnotation(shaOrLine?: string | number, type?: FileAnnotationType): Promise<boolean> {

+ 3
- 3
src/annotations/heatmapBlameAnnotationProvider.ts Ver ficheiro

@ -1,11 +1,11 @@
'use strict';
import { DecorationOptions, Range } from 'vscode';
import { Annotations } from './annotations';
import { BlameAnnotationProviderBase } from './blameAnnotationProvider';
import { FileAnnotationType } from './../configuration';
import { FileAnnotationType } from '../configuration';
import { Container } from '../container';
import { GitBlameCommit } from '../gitService';
import { Logger } from '../logger';
import { Annotations } from './annotations';
import { BlameAnnotationProviderBase } from './blameAnnotationProvider';
export class HeatmapBlameAnnotationProvider extends BlameAnnotationProviderBase {
async onProvideAnnotation(shaOrLine?: string | number, type?: FileAnnotationType): Promise<boolean> {

+ 0
- 71
src/annotations/hoverBlameAnnotationProvider.ts Ver ficheiro

@ -1,71 +0,0 @@
// 'use strict';
// import { DecorationOptions, Range } from 'vscode';
// import { Annotations } from './annotations';
// import { BlameAnnotationProviderBase } from './blameAnnotationProvider';
// import { FileAnnotationType } from './../configuration';
// import { Container } from '../container';
// import { GitBlameCommit } from '../gitService';
// import { Logger } from '../logger';
// export class HoverBlameAnnotationProvider extends BlameAnnotationProviderBase {
// async onProvideAnnotation(shaOrLine?: string | number): Promise<boolean> {
// this.annotationType = FileAnnotationType.Hover;
// const cfg = Container.config.annotations.file.hover;
// const blame = await this.getBlame();
// if (blame === undefined) return false;
// if (cfg.heatmap.enabled) {
// const start = process.hrtime();
// const now = Date.now();
// const renderOptions = Annotations.hoverRenderOptions(cfg.heatmap);
// this.decorations = [];
// const decorationsMap: { [sha: string]: DecorationOptions } = Object.create(null);
// let commit: GitBlameCommit | undefined;
// let hover: DecorationOptions | undefined;
// for (const l of blame.lines) {
// const line = l.line;
// hover = decorationsMap[l.sha];
// if (hover !== undefined) {
// hover = {
// ...hover,
// range: new Range(line, 0, line, 0)
// } as DecorationOptions;
// this.decorations.push(hover);
// continue;
// }
// commit = blame.commits.get(l.sha);
// if (commit === undefined) continue;
// hover = Annotations.hover(commit, renderOptions, now);
// hover.range = new Range(line, 0, line, 0);
// this.decorations.push(hover);
// decorationsMap[l.sha] = hover;
// }
// if (this.decorations.length) {
// this.editor.setDecorations(this.decoration!, this.decorations);
// }
// const duration = process.hrtime(start);
// Logger.log(`${(duration[0] * 1000) + Math.floor(duration[1] / 1000000)} ms to compute hover blame annotations`);
// }
// this.registerHoverProviders(cfg);
// this.selection(shaOrLine, blame);
// return true;
// }
// }

+ 4
- 4
src/annotations/lineAnnotationController.ts Ver ficheiro

@ -10,11 +10,11 @@ import {
TextEditorDecorationType,
window
} from 'vscode';
import { configuration } from '../configuration';
import { isTextEditor } from '../constants';
import { Container } from '../container';
import { LinesChangeEvent } from '../trackers/gitLineTracker';
import { Annotations } from './annotations';
import { configuration } from './../configuration';
import { isTextEditor } from './../constants';
import { Container } from './../container';
import { LinesChangeEvent } from './../trackers/gitLineTracker';
const annotationDecoration: TextEditorDecorationType = window.createTextEditorDecorationType({
after: {

+ 4
- 4
src/annotations/recentChangesAnnotationProvider.ts Ver ficheiro

@ -1,12 +1,12 @@
'use strict';
import { DecorationOptions, MarkdownString, Position, Range, TextEditor, TextEditorDecorationType } from 'vscode';
import { AnnotationProviderBase } from './annotationProvider';
import { Annotations } from './annotations';
import { FileAnnotationType } from './../configuration';
import { FileAnnotationType } from '../configuration';
import { Container } from '../container';
import { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker';
import { GitUri } from '../gitService';
import { Logger } from '../logger';
import { GitDocumentState, TrackedDocument } from '../trackers/gitDocumentTracker';
import { AnnotationProviderBase } from './annotationProvider';
import { Annotations } from './annotations';
export class RecentChangesAnnotationProvider extends AnnotationProviderBase {
private readonly _uri: GitUri;

src/codeLensController.ts → src/codelens/codeLensController.ts Ver ficheiro

@ -1,15 +1,15 @@
'use strict';
import { ConfigurationChangeEvent, Disposable, languages } from 'vscode';
import { configuration } from './configuration';
import { CommandContext, setCommandContext } from './constants';
import { Container } from './container';
import { configuration } from '../configuration';
import { CommandContext, setCommandContext } from '../constants';
import { Container } from '../container';
import { Logger } from '../logger';
import {
DocumentBlameStateChangeEvent,
DocumentDirtyIdleTriggerEvent,
GitDocumentState
} from './trackers/gitDocumentTracker';
} from '../trackers/gitDocumentTracker';
import { GitCodeLensProvider } from './gitCodeLensProvider';
import { Logger } from './logger';
export class CodeLensController extends Disposable {
private _canToggle: boolean = false;

src/gitCodeLensProvider.ts → src/codelens/gitCodeLensProvider.ts Ver ficheiro

@ -1,5 +1,4 @@
'use strict';
import { Functions, Iterables } from './system';
import {
CancellationToken,
CodeLens,
@ -24,19 +23,20 @@ import {
ShowQuickCommitDetailsCommandArgs,
ShowQuickCommitFileDetailsCommandArgs,
ShowQuickFileHistoryCommandArgs
} from './commands';
} from '../commands';
import {
CodeLensCommand,
CodeLensLanguageScope,
CodeLensScopes,
configuration,
ICodeLensConfig
} from './configuration';
import { BuiltInCommands, DocumentSchemes } from './constants';
import { Container } from './container';
import { DocumentTracker, GitDocumentState } from './trackers/gitDocumentTracker';
import { GitBlame, GitBlameCommit, GitBlameLines, GitService, GitUri } from './gitService';
import { Logger } from './logger';
} from '../configuration';
import { BuiltInCommands, DocumentSchemes } from '../constants';
import { Container } from '../container';
import { GitBlame, GitBlameCommit, GitBlameLines, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import { Functions, Iterables } from '../system';
import { DocumentTracker, GitDocumentState } from '../trackers/gitDocumentTracker';
export class GitRecentChangeCodeLens extends CodeLens {
constructor(

src/gitRevisionCodeLensProvider.ts → src/codelens/gitRevisionCodeLensProvider.ts Ver ficheiro

@ -1,9 +1,9 @@
'use strict';
import { CancellationToken, CodeLens, CodeLensProvider, DocumentSelector, Range, TextDocument, Uri } from 'vscode';
import { Commands, DiffWithPreviousCommandArgs, DiffWithWorkingCommandArgs } from './commands';
import { DocumentSchemes } from './constants';
import { Container } from './container';
import { GitCommit, GitUri } from './gitService';
import { Commands, DiffWithPreviousCommandArgs, DiffWithWorkingCommandArgs } from '../commands';
import { DocumentSchemes } from '../constants';
import { Container } from '../container';
import { GitCommit, GitUri } from '../gitService';
export class GitDiffWithWorkingCodeLens extends CodeLens {
constructor(

+ 1
- 1
src/commands/clearFileAnnotations.ts Ver ficheiro

@ -1,9 +1,9 @@
'use strict';
import { TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { Commands, EditorCommand } from './common';
import { UriComparer } from '../comparers';
import { Container } from '../container';
import { Logger } from '../logger';
import { Commands, EditorCommand } from './common';
export class ClearFileAnnotationsCommand extends EditorCommand {
constructor() {

+ 2
- 2
src/commands/closeUnchangedFiles.ts Ver ficheiro

@ -1,11 +1,11 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorTracker } from '../trackers/activeEditorTracker';
import { ActiveEditorCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
import { TextEditorComparer, UriComparer } from '../comparers';
import { BuiltInCommands, GlyphChars } from '../constants';
import { Container } from '../container';
import { Logger } from '../logger';
import { ActiveEditorTracker } from '../trackers/activeEditorTracker';
import { ActiveEditorCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
export interface CloseUnchangedFilesCommandArgs {
uris?: Uri[];

+ 3
- 3
src/commands/common.ts Ver ficheiro

@ -1,4 +1,5 @@
'use strict';
import * as path from 'path';
import {
commands,
Disposable,
@ -14,12 +15,11 @@ import {
} from 'vscode';
import { BuiltInCommands, DocumentSchemes, ImageExtensions } from '../constants';
import { Container } from '../container';
import { ExplorerNode, ExplorerRefNode } from '../views/explorerNodes';
import { GitBranch, GitCommit, GitRemote, GitUri } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, RepositoriesQuickPick } from '../quickpicks';
// import { Telemetry } from '../telemetry';
import * as path from 'path';
import { CommandQuickPickItem, RepositoriesQuickPick } from '../quickPicks/quickPicks';
import { ExplorerNode, ExplorerRefNode } from '../views/nodes';
export enum Commands {
ClearFileAnnotations = 'gitlens.clearFileAnnotations',

+ 2
- 2
src/commands/copyMessageToClipboard.ts Ver ficheiro

@ -1,10 +1,10 @@
'use strict';
import { Iterables } from '../system';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithCommit } from './common';
import { Container } from '../container';
import { GitUri } from '../gitService';
import { Logger } from '../logger';
import { Iterables } from '../system';
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithCommit } from './common';
export interface CopyMessageToClipboardCommandArgs {
message?: string;

+ 2
- 2
src/commands/copyShaToClipboard.ts Ver ficheiro

@ -1,10 +1,10 @@
'use strict';
import { Iterables } from '../system';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithCommit } from './common';
import { Container } from '../container';
import { GitUri } from '../gitService';
import { Logger } from '../logger';
import { Iterables } from '../system';
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithCommit } from './common';
export interface CopyShaToClipboardCommandArgs {
sha?: string;

+ 2
- 2
src/commands/diffBranchWithBranch.ts Ver ficheiro

@ -1,10 +1,10 @@
'use strict';
import { CancellationTokenSource, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { Logger } from '../logger';
import { BranchesAndTagsQuickPick, CommandQuickPickItem } from '../quickPicks/quickPicks';
import { BranchesAndTagsQuickPick, CommandQuickPickItem } from '../quickpicks';
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
export interface DiffBranchWithBranchCommandArgs {
ref1?: string;

+ 10
- 4
src/commands/diffDirectory.ts Ver ficheiro

@ -1,12 +1,18 @@
'use strict';
import { CancellationTokenSource, commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
import { CommandContext, isCommandViewContextWithRef } from '../commands';
import { BuiltInCommands, GlyphChars } from '../constants';
import { Container } from '../container';
import { ComparisonResultsNode } from '../views/explorerNodes';
import { Logger } from '../logger';
import { BranchesAndTagsQuickPick, CommandQuickPickItem } from '../quickPicks/quickPicks';
import { BranchesAndTagsQuickPick, CommandQuickPickItem } from '../quickpicks';
import { ComparisonResultsNode } from '../views/nodes';
import {
ActiveEditorCommand,
CommandContext,
Commands,
getCommandUri,
getRepoPathOrActiveOrPrompt,
isCommandViewContextWithRef
} from './common';
export interface DiffDirectoryCommandArgs {
ref1?: string;

+ 2
- 2
src/commands/diffLineWithPrevious.ts Ver ficheiro

@ -1,11 +1,11 @@
'use strict';
import { commands, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
import { Container } from '../container';
import { DiffWithCommandArgs } from './diffWith';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
import { DiffWithCommandArgs } from './diffWith';
export interface DiffLineWithPreviousCommandArgs {
commit?: GitCommit;

+ 3
- 3
src/commands/diffLineWithWorking.ts Ver ficheiro

@ -1,11 +1,11 @@
'use strict';
import { commands, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
import { Container } from '../container';
import { DiffWithCommandArgs } from './diffWith';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Messages } from '../messages';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
import { DiffWithCommandArgs } from './diffWith';
export interface DiffLineWithWorkingCommandArgs {
commit?: GitCommit;

+ 2
- 2
src/commands/diffWith.ts Ver ficheiro

@ -1,11 +1,11 @@
'use strict';
import * as path from 'path';
import { commands, Range, TextDocumentShowOptions, TextEditor, Uri, ViewColumn, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './common';
import { BuiltInCommands, GlyphChars } from '../constants';
import { Container } from '../container';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import * as path from 'path';
import { ActiveEditorCommand, Commands } from './common';
export interface DiffWithCommandArgsRevision {
sha: string;

+ 5
- 5
src/commands/diffWithBranch.ts Ver ficheiro

@ -1,14 +1,14 @@
'use strict';
import { Strings } from '../system';
import * as path from 'path';
import { commands, TextDocumentShowOptions, TextEditor, Uri } from 'vscode';
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { DiffWithCommandArgs } from './diffWith';
import { GitUri } from '../gitService';
import { Messages } from '../messages';
import { BranchesAndTagsQuickPick, CommandQuickPickItem } from '../quickPicks/quickPicks';
import * as path from 'path';
import { BranchesAndTagsQuickPick, CommandQuickPickItem } from '../quickpicks';
import { Strings } from '../system';
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
import { DiffWithCommandArgs } from './diffWith';
export interface DiffWithBranchCommandArgs {
line?: number;

+ 3
- 3
src/commands/diffWithNext.ts Ver ficheiro

@ -1,12 +1,12 @@
'use strict';
import { Iterables } from '../system';
import { commands, Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
import { Container } from '../container';
import { DiffWithCommandArgs } from './diffWith';
import { GitLogCommit, GitService, GitStatusFile, GitUri } from '../gitService';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { Iterables } from '../system';
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
import { DiffWithCommandArgs } from './diffWith';
export interface DiffWithNextCommandArgs {
commit?: GitLogCommit;

+ 4
- 4
src/commands/diffWithPrevious.ts Ver ficheiro

@ -1,13 +1,13 @@
'use strict';
import { Iterables } from '../system';
import { commands, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri } from './common';
import { Container } from '../container';
import { DiffWithCommandArgs } from './diffWith';
import { DiffWithWorkingCommandArgs } from './diffWithWorking';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { Iterables } from '../system';
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri } from './common';
import { DiffWithCommandArgs } from './diffWith';
import { DiffWithWorkingCommandArgs } from './diffWithWorking';
export interface DiffWithPreviousCommandArgs {
commit?: GitCommit;

+ 5
- 5
src/commands/diffWithRevision.ts Ver ficheiro

@ -1,14 +1,14 @@
'use strict';
import { Iterables, Strings } from '../system';
import { commands, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { DiffWithCommandArgs } from './diffWith';
import { GitBranch, GitTag, GitUri } from '../gitService';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { CommandQuickPickItem, FileHistoryQuickPick, ShowBranchesAndTagsQuickPickItem } from '../quickPicks/quickPicks';
import { ChooseFromBranchesAndTagsQuickPickItem, CommandQuickPickItem, FileHistoryQuickPick } from '../quickpicks';
import { Iterables, Strings } from '../system';
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
import { DiffWithCommandArgs } from './diffWith';
export interface DiffWithRevisionCommandArgs {
branchOrTag?: GitBranch | GitTag;
@ -122,7 +122,7 @@ export class DiffWithRevisionCommand extends ActiveEditorCommand {
let ref: string;
if (pick instanceof ShowBranchesAndTagsQuickPickItem) {
if (pick instanceof ChooseFromBranchesAndTagsQuickPickItem) {
const branchOrTag = await pick.execute();
if (branchOrTag === undefined) return undefined;
if (branchOrTag instanceof CommandQuickPickItem) return branchOrTag.execute();

+ 2
- 2
src/commands/diffWithWorking.ts Ver ficheiro

@ -1,11 +1,11 @@
'use strict';
import { commands, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
import { Container } from '../container';
import { DiffWithCommandArgs } from './diffWith';
import { GitCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { ActiveEditorCommand, Commands, getCommandUri } from './common';
import { DiffWithCommandArgs } from './diffWith';
export interface DiffWithWorkingCommandArgs {
commit?: GitCommit;

+ 2
- 3
src/commands/externalDiff.ts Ver ficheiro

@ -1,11 +1,10 @@
'use strict';
import { Arrays } from '../system';
import { commands, SourceControlResourceState, Uri, window } from 'vscode';
import { Command, Commands, getRepoPathOrActiveOrPrompt } from './common';
import { BuiltInCommands, GlyphChars } from '../constants';
import { CommandContext } from '../commands';
import { Container } from '../container';
import { Logger } from '../logger';
import { Arrays } from '../system';
import { Command, CommandContext, Commands, getRepoPathOrActiveOrPrompt } from './common';
enum Status {
INDEX_MODIFIED,

+ 5
- 5
src/commands/openBranchInRemote.ts Ver ficheiro

@ -1,5 +1,10 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitUri } from '../gitService';
import { Logger } from '../logger';
import { BranchesQuickPick, CommandQuickPickItem } from '../quickpicks';
import {
ActiveEditorCommand,
CommandContext,
@ -8,11 +13,6 @@ import {
getRepoPathOrActiveOrPrompt,
isCommandViewContextWithBranch
} from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitUri } from '../gitService';
import { Logger } from '../logger';
import { BranchesQuickPick, CommandQuickPickItem } from '../quickPicks/quickPicks';
import { OpenInRemoteCommandArgs } from './openInRemote';
export interface OpenBranchInRemoteCommandArgs {

+ 4
- 4
src/commands/openBranchesInRemote.ts Ver ficheiro

@ -1,5 +1,9 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitUri } from '../gitService';
import { Logger } from '../logger';
import {
ActiveEditorCommand,
CommandContext,
@ -8,10 +12,6 @@ import {
getRepoPathOrActiveOrPrompt,
isCommandViewContextWithRemote
} from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitUri } from '../gitService';
import { Logger } from '../logger';
import { OpenInRemoteCommandArgs } from './openInRemote';
export interface OpenBranchesInRemoteCommandArgs {

+ 2
- 2
src/commands/openChangedFiles.ts Ver ficheiro

@ -1,10 +1,10 @@
'use strict';
import { Arrays } from '../system';
import { TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt, openEditor } from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { Logger } from '../logger';
import { Arrays } from '../system';
import { ActiveEditorCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt, openEditor } from './common';
export interface OpenChangedFilesCommandArgs {
uris?: Uri[];

+ 1
- 1
src/commands/openCommitInRemote.ts Ver ficheiro

@ -1,10 +1,10 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithCommit } from './common';
import { Container } from '../container';
import { GitUri } from '../gitService';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { ActiveEditorCommand, CommandContext, Commands, getCommandUri, isCommandViewContextWithCommit } from './common';
import { OpenInRemoteCommandArgs } from './openInRemote';
export interface OpenCommitInRemoteCommandArgs {

+ 5
- 5
src/commands/openFileInRemote.ts Ver ficheiro

@ -1,5 +1,10 @@
'use strict';
import { commands, Range, TextEditor, Uri, window } from 'vscode';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitUri } from '../gitService';
import { Logger } from '../logger';
import { BranchesQuickPick, CommandQuickPickItem } from '../quickpicks';
import {
ActiveEditorCommand,
CommandContext,
@ -8,12 +13,7 @@ import {
isCommandViewContextWithBranch,
isCommandViewContextWithCommit
} from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitUri } from '../gitService';
import { Logger } from '../logger';
import { OpenInRemoteCommandArgs } from './openInRemote';
import { BranchesQuickPick, CommandQuickPickItem } from '../quickPicks/quickPicks';
export interface OpenFileInRemoteCommandArgs {
branch?: string;

+ 4
- 4
src/commands/openFileRevision.ts Ver ficheiro

@ -1,14 +1,14 @@
'use strict';
import { Iterables, Strings } from '../system';
import { CancellationTokenSource, commands, Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands, getCommandUri, openEditor } from './common';
import { FileAnnotationType } from '../configuration';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitBranch, GitTag, GitUri } from '../gitService';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { CommandQuickPickItem, FileHistoryQuickPick, ShowBranchesAndTagsQuickPickItem } from '../quickPicks/quickPicks';
import { ChooseFromBranchesAndTagsQuickPickItem, CommandQuickPickItem, FileHistoryQuickPick } from '../quickpicks';
import { Iterables, Strings } from '../system';
import { ActiveEditorCommand, Commands, getCommandUri, openEditor } from './common';
export interface OpenFileRevisionCommandArgs {
branchOrTag?: GitBranch | GitTag;
@ -150,7 +150,7 @@ export class OpenFileRevisionCommand extends ActiveEditorCommand {
});
if (pick === undefined) return undefined;
if (pick instanceof ShowBranchesAndTagsQuickPickItem) {
if (pick instanceof ChooseFromBranchesAndTagsQuickPickItem) {
const branchOrTag = await pick.execute();
if (branchOrTag === undefined) return undefined;
if (branchOrTag instanceof CommandQuickPickItem) return branchOrTag.execute();

+ 3
- 3
src/commands/openInRemote.ts Ver ficheiro

@ -1,11 +1,11 @@
'use strict';
import { Strings } from '../system';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './common';
import { GlyphChars } from '../constants';
import { GitLogCommit, GitRemote, GitService, RemoteResource, RemoteResourceType } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, OpenRemoteCommandQuickPickItem, RemotesQuickPick } from '../quickPicks/quickPicks';
import { CommandQuickPickItem, OpenRemoteCommandQuickPickItem, RemotesQuickPick } from '../quickpicks';
import { Strings } from '../system';
import { ActiveEditorCommand, Commands } from './common';
export interface OpenInRemoteCommandArgs {
remote?: string;

+ 4
- 4
src/commands/openRepoInRemote.ts Ver ficheiro

@ -1,5 +1,9 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitUri } from '../gitService';
import { Logger } from '../logger';
import {
ActiveEditorCommand,
CommandContext,
@ -8,10 +12,6 @@ import {
getRepoPathOrActiveOrPrompt,
isCommandViewContextWithRemote
} from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitUri } from '../gitService';
import { Logger } from '../logger';
import { OpenInRemoteCommandArgs } from './openInRemote';
export interface OpenRepoInRemoteCommandArgs {

+ 2
- 2
src/commands/openWorkingFile.ts Ver ficheiro

@ -1,11 +1,11 @@
'use strict';
import * as path from 'path';
import { Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands, getCommandUri, openEditor } from './common';
import { FileAnnotationType } from '../configuration';
import { Container } from '../container';
import { GitUri } from '../gitService';
import { Logger } from '../logger';
import * as path from 'path';
import { ActiveEditorCommand, Commands, getCommandUri, openEditor } from './common';
export interface OpenWorkingFileCommandArgs {
uri?: Uri;

+ 1
- 1
src/commands/resetSuppressedWarnings.ts Ver ficheiro

@ -1,7 +1,7 @@
'use strict';
import { ConfigurationTarget } from 'vscode';
import { Command, Commands } from './common';
import { configuration } from '../configuration';
import { Command, Commands } from './common';
export class ResetSuppressedWarningsCommand extends Command {
constructor() {

+ 3
- 7
src/commands/showCommitSearch.ts Ver ficheiro

@ -1,16 +1,12 @@
'use strict';
import { Strings } from '../system';
import { commands, InputBoxOptions, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCachedCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitRepoSearchBy, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import {
CommandQuickPickItem,
CommitsQuickPick,
ShowCommitsSearchInResultsQuickPickItem
} from '../quickPicks/quickPicks';
import { CommandQuickPickItem, CommitsQuickPick, ShowCommitsSearchInResultsQuickPickItem } from '../quickpicks';
import { Strings } from '../system';
import { ActiveEditorCachedCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
import { ShowQuickCommitDetailsCommandArgs } from './showQuickCommitDetails';
const searchByRegex = /^([@~=:#])/;

+ 1
- 1
src/commands/showGitExplorer.ts Ver ficheiro

@ -1,7 +1,7 @@
'use strict';
import { Command, Commands } from './common';
import { GitExplorerView } from '../configuration';
import { Container } from '../container';
import { Command, Commands } from './common';
export class ShowGitExplorerCommand extends Command {
constructor() {

+ 1
- 1
src/commands/showHistoryExplorer.ts Ver ficheiro

@ -1,7 +1,7 @@
'use strict';
import { Command, Commands } from './common';
import { GitExplorerView } from '../configuration';
import { Container } from '../container';
import { Command, Commands } from './common';
export class ShowHistoryExplorerCommand extends Command {
constructor() {

+ 1
- 1
src/commands/showLastQuickPick.ts Ver ficheiro

@ -1,7 +1,7 @@
'use strict';
import { commands, window } from 'vscode';
import { Command, Commands, getLastCommand } from './common';
import { Logger } from '../logger';
import { Command, Commands, getLastCommand } from './common';
export class ShowLastQuickPickCommand extends Command {
constructor() {

+ 3
- 3
src/commands/showQuickBranchHistory.ts Ver ficheiro

@ -1,12 +1,12 @@
'use strict';
import { Strings } from '../system';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCachedCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitLog, GitUri } from '../gitService';
import { Logger } from '../logger';
import { BranchesQuickPick, BranchHistoryQuickPick, CommandQuickPickItem } from '../quickPicks/quickPicks';
import { BranchesQuickPick, BranchHistoryQuickPick, CommandQuickPickItem } from '../quickpicks';
import { Strings } from '../system';
import { ActiveEditorCachedCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
import { ShowQuickCommitDetailsCommandArgs } from './showQuickCommitDetails';
export interface ShowQuickBranchHistoryCommandArgs {

+ 8
- 8
src/commands/showQuickCommitDetails.ts Ver ficheiro

@ -1,6 +1,13 @@
'use strict';
import { Strings } from '../system';
import * as path from 'path';
import { commands, TextEditor, Uri, window } from 'vscode';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitCommit, GitLog, GitLogCommit, GitUri } from '../gitService';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { CommandQuickPickItem, CommitQuickPick, CommitWithFileStatusQuickPickItem } from '../quickpicks';
import { Strings } from '../system';
import {
ActiveEditorCachedCommand,
CommandContext,
@ -8,14 +15,7 @@ import {
getCommandUri,
isCommandViewContextWithCommit
} from './common';
import { GlyphChars } from '../constants';
import { GitCommit, GitLog, GitLogCommit, GitUri } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, CommitQuickPick, CommitWithFileStatusQuickPickItem } from '../quickPicks/quickPicks';
import { ShowQuickCommitFileDetailsCommandArgs } from './showQuickCommitFileDetails';
import { Messages } from '../messages';
import * as path from 'path';
import { Container } from '../container';
export interface ShowQuickCommitDetailsCommandArgs {
sha?: string;

+ 8
- 8
src/commands/showQuickCommitFileDetails.ts Ver ficheiro

@ -1,6 +1,13 @@
'use strict';
import { Strings } from '../system';
import * as path from 'path';
import { TextEditor, Uri, window } from 'vscode';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitCommit, GitLog, GitLogCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import { Messages } from '../messages';
import { CommandQuickPickItem, CommitFileQuickPick } from '../quickpicks';
import { Strings } from '../system';
import {
ActiveEditorCachedCommand,
CommandContext,
@ -8,14 +15,7 @@ import {
getCommandUri,
isCommandViewContextWithCommit
} from './common';
import { GlyphChars } from '../constants';
import { GitCommit, GitLog, GitLogCommit, GitService, GitUri } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, CommitFileQuickPick } from '../quickPicks/quickPicks';
import { ShowQuickCommitDetailsCommandArgs } from './showQuickCommitDetails';
import { Messages } from '../messages';
import * as path from 'path';
import { Container } from '../container';
export interface ShowQuickCommitFileDetailsCommandArgs {
sha?: string;

+ 2
- 2
src/commands/showQuickCurrentBranchHistory.ts Ver ficheiro

@ -1,10 +1,10 @@
'use strict';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCachedCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { Logger } from '../logger';
import { CommandQuickPickItem } from '../quickPicks/quickPicks';
import { CommandQuickPickItem } from '../quickpicks';
import { ActiveEditorCachedCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
import { ShowQuickBranchHistoryCommandArgs } from './showQuickBranchHistory';
export interface ShowQuickCurrentBranchHistoryCommandArgs {

+ 7
- 7
src/commands/showQuickFileHistory.ts Ver ficheiro

@ -1,20 +1,20 @@
'use strict';
import * as path from 'path';
import { commands, Range, TextEditor, Uri, window } from 'vscode';
import { Iterables, Strings } from '../system';
import { ActiveEditorCachedCommand, Commands, getCommandUri } from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitBranch, GitLog, GitTag, GitUri } from '../gitService';
import { Logger } from '../logger';
import { Messages } from '../messages';
import {
ChooseFromBranchesAndTagsQuickPickItem,
CommandQuickPickItem,
FileHistoryQuickPick,
ShowBranchesAndTagsQuickPickItem,
ShowCommitsInResultsQuickPickItem
} from '../quickPicks/quickPicks';
} from '../quickpicks';
import { Iterables, Strings } from '../system';
import { ActiveEditorCachedCommand, Commands, getCommandUri } from './common';
import { ShowQuickCommitFileDetailsCommandArgs } from './showQuickCommitFileDetails';
import { Messages } from '../messages';
import * as path from 'path';
export interface ShowQuickFileHistoryCommandArgs {
branchOrTag?: GitBranch | GitTag;
@ -138,7 +138,7 @@ export class ShowQuickFileHistoryCommand extends ActiveEditorCachedCommand {
});
if (pick === undefined) return undefined;
if (pick instanceof ShowBranchesAndTagsQuickPickItem) {
if (pick instanceof ChooseFromBranchesAndTagsQuickPickItem) {
const branchOrTag = await pick.execute();
if (branchOrTag === undefined) return undefined;
if (branchOrTag instanceof CommandQuickPickItem) return branchOrTag.execute();

+ 2
- 2
src/commands/showQuickRepoStatus.ts Ver ficheiro

@ -1,10 +1,10 @@
'use strict';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCachedCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { Logger } from '../logger';
import { CommandQuickPickItem, RepoStatusQuickPick } from '../quickPicks/quickPicks';
import { CommandQuickPickItem, RepoStatusQuickPick } from '../quickpicks';
import { ActiveEditorCachedCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
export interface ShowQuickRepoStatusCommandArgs {
goBackCommand?: CommandQuickPickItem;

+ 3
- 3
src/commands/showQuickStashList.ts Ver ficheiro

@ -1,11 +1,11 @@
'use strict';
import { Strings } from '../system';
import { commands, TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCachedCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { Logger } from '../logger';
import { CommandQuickPickItem, StashListQuickPick } from '../quickPicks/quickPicks';
import { CommandQuickPickItem, StashListQuickPick } from '../quickpicks';
import { Strings } from '../system';
import { ActiveEditorCachedCommand, Commands, getCommandUri, getRepoPathOrActiveOrPrompt } from './common';
import { ShowQuickCommitDetailsCommandArgs } from './showQuickCommitDetails';
export interface ShowQuickStashListCommandArgs {

+ 1
- 1
src/commands/showResultsExplorer.ts Ver ficheiro

@ -1,6 +1,6 @@
'use strict';
import { Command, Commands } from './common';
import { Container } from '../container';
import { Command, Commands } from './common';
export class ShowResultsExplorerCommand extends Command {
constructor() {

+ 3
- 3
src/commands/stashApply.ts Ver ficheiro

@ -1,12 +1,12 @@
'use strict';
import { Strings } from '../system';
import { MessageItem, window } from 'vscode';
import { Command, CommandContext, Commands, isCommandViewContextWithCommit } from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitStashCommit } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem, RepositoriesQuickPick, StashListQuickPick } from '../quickPicks/quickPicks';
import { CommandQuickPickItem, RepositoriesQuickPick, StashListQuickPick } from '../quickpicks';
import { Strings } from '../system';
import { Command, CommandContext, Commands, isCommandViewContextWithCommit } from './common';
export interface StashApplyCommandArgs {
confirm?: boolean;

+ 2
- 2
src/commands/stashDelete.ts Ver ficheiro

@ -1,11 +1,11 @@
'use strict';
import { MessageItem, window } from 'vscode';
import { Command, CommandContext, Commands, isCommandViewContextWithCommit } from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitStashCommit } from '../gitService';
import { Logger } from '../logger';
import { CommandQuickPickItem } from '../quickPicks/quickPicks';
import { CommandQuickPickItem } from '../quickpicks';
import { Command, CommandContext, Commands, isCommandViewContextWithCommit } from './common';
export interface StashDeleteCommandArgs {
confirm?: boolean;

+ 2
- 3
src/commands/stashSave.ts Ver ficheiro

@ -1,11 +1,10 @@
'use strict';
import { InputBoxOptions, Uri, window } from 'vscode';
import { CommandContext } from '../commands';
import { Command, Commands } from './common';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { Logger } from '../logger';
import { CommandQuickPickItem, RepositoriesQuickPick } from '../quickPicks/quickPicks';
import { CommandQuickPickItem, RepositoriesQuickPick } from '../quickpicks';
import { Command, CommandContext, Commands } from './common';
export interface StashSaveCommandArgs {
message?: string;

+ 2
- 2
src/commands/switchMode.ts Ver ficheiro

@ -1,9 +1,9 @@
'use strict';
import { ConfigurationTarget } from 'vscode';
import { Command, Commands } from './common';
import { configuration } from '../configuration';
import { Container } from '../container';
import { ModesQuickPick } from '../quickPicks/quickPicks';
import { ModesQuickPick } from '../quickpicks';
import { Command, Commands } from './common';
export class SwitchModeCommand extends Command {
constructor() {

+ 1
- 1
src/commands/toggleCodeLens.ts Ver ficheiro

@ -1,6 +1,6 @@
'use strict';
import { Command, Commands } from './common';
import { Container } from '../container';
import { Command, Commands } from './common';
export class ToggleCodeLensCommand extends Command {
constructor() {

+ 1
- 1
src/commands/toggleFileBlame.ts Ver ficheiro

@ -1,10 +1,10 @@
'use strict';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './common';
import { UriComparer } from '../comparers';
import { FileAnnotationType } from '../configuration';
import { Container } from '../container';
import { Logger } from '../logger';
import { ActiveEditorCommand, Commands } from './common';
export interface ToggleFileBlameCommandArgs {
sha?: string;

+ 2
- 2
src/commands/toggleFileHeatmap.ts Ver ficheiro

@ -1,8 +1,8 @@
'use strict';
import { commands, TextEditor, Uri } from 'vscode';
import { ToggleFileBlameCommandArgs } from '../commands';
import { ActiveEditorCommand, Commands } from './common';
import { FileAnnotationType } from '../configuration';
import { ActiveEditorCommand, Commands } from './common';
import { ToggleFileBlameCommandArgs } from './toggleFileBlame';
export class ToggleFileHeatmapCommand extends ActiveEditorCommand {
constructor() {

+ 2
- 2
src/commands/toggleFileRecentChanges.ts Ver ficheiro

@ -1,8 +1,8 @@
'use strict';
import { commands, TextEditor, Uri } from 'vscode';
import { ToggleFileBlameCommandArgs } from '../commands';
import { ActiveEditorCommand, Commands } from './common';
import { FileAnnotationType } from '../configuration';
import { ActiveEditorCommand, Commands } from './common';
import { ToggleFileBlameCommandArgs } from './toggleFileBlame';
export class ToggleFileRecentChangesCommand extends ActiveEditorCommand {
constructor() {

+ 1
- 1
src/commands/toggleLineBlame.ts Ver ficheiro

@ -1,8 +1,8 @@
'use strict';
import { TextEditor, Uri, window } from 'vscode';
import { ActiveEditorCommand, Commands } from './common';
import { Container } from '../container';
import { Logger } from '../logger';
import { ActiveEditorCommand, Commands } from './common';
export class ToggleLineBlameCommand extends ActiveEditorCommand {
constructor() {

+ 2
- 2
src/configuration.ts Ver ficheiro

@ -1,7 +1,6 @@
'use strict';
export * from './ui/config';
import { Functions } from './system';
import {
ConfigurationChangeEvent,
ConfigurationTarget,
@ -11,10 +10,11 @@ import {
Uri,
workspace
} from 'vscode';
import { IConfig, KeyMap } from './ui/config';
import { CommandContext, extensionId, setCommandContext } from './constants';
import { Container } from './container';
import { clearGravatarCache } from './gitService';
import { Functions } from './system';
import { IConfig, KeyMap } from './ui/config';
const emptyConfig: any = new Proxy<any>({} as IConfig, {
get(target, propKey, receiver) {

+ 9
- 9
src/container.ts Ver ficheiro

@ -1,22 +1,22 @@
'use strict';
import { Disposable, ExtensionContext, languages, workspace } from 'vscode';
import { FileAnnotationController } from './annotations/fileAnnotationController';
import { CodeLensController } from './codeLensController';
import { configuration, IConfig } from './configuration';
import { LineAnnotationController } from './annotations/lineAnnotationController';
import { LineHoverController } from './annotations/lineHoverController';
import { ExplorerCommands } from './views/explorerCommands';
import { CodeLensController } from './codelens/codeLensController';
import { GitRevisionCodeLensProvider } from './codelens/gitRevisionCodeLensProvider';
import { configuration, IConfig } from './configuration';
import { GitContentProvider } from './gitContentProvider';
import { GitService } from './gitService';
import { LineHoverController } from './hovers/lineHoverController';
import { Keyboard } from './keyboard';
import { StatusBarController } from './statusbar/statusBarController';
import { GitDocumentTracker } from './trackers/gitDocumentTracker';
import { GitExplorer } from './views/gitExplorer';
import { GitLineTracker } from './trackers/gitLineTracker';
import { GitRevisionCodeLensProvider } from './gitRevisionCodeLensProvider';
import { GitService } from './gitService';
import { ExplorerCommands } from './views/explorerCommands';
import { GitExplorer } from './views/gitExplorer';
import { HistoryExplorer } from './views/historyExplorer';
import { Keyboard } from './keyboard';
import { ResultsExplorer } from './views/resultsExplorer';
import { SettingsEditor } from './webviews/settingsEditor';
import { StatusBarController } from './statusBarController';
import { WelcomeEditor } from './webviews/welcomeEditor';
export class Container {

+ 3
- 3
src/extension.ts Ver ficheiro

@ -1,8 +1,7 @@
'use strict';
import { Logger } from './logger';
import { Versions } from './system';
import { commands, ExtensionContext, extensions, window, workspace } from 'vscode';
import { Commands, configureCommands } from './commands';
import {
CodeLensLanguageScope,
CodeLensScopes,
@ -15,10 +14,11 @@ import {
OutputLevel
} from './configuration';
import { CommandContext, extensionId, extensionQualifiedId, GlobalState, setCommandContext } from './constants';
import { Commands, configureCommands } from './commands';
import { Container } from './container';
import { GitService } from './gitService';
import { Logger } from './logger';
import { Messages } from './messages';
import { Versions } from './system';
// import { Telemetry } from './telemetry';
interface GitApi {

+ 2
- 2
src/git/formatters/commitFormatter.ts Ver ficheiro

@ -1,8 +1,8 @@
'use strict';
import { Strings } from '../../system';
import { GitCommit } from '../models/commit';
import { DateStyle } from '../../configuration';
import { Container } from '../../container';
import { Strings } from '../../system';
import { GitCommit } from '../models/commit';
import { Formatter, IFormatOptions } from './formatter';
export interface ICommitFormatOptions extends IFormatOptions {

+ 3
- 3
src/git/formatters/statusFormatter.ts Ver ficheiro

@ -1,9 +1,9 @@
'use strict';
import { Strings } from '../../system';
import * as path from 'path';
import { GlyphChars } from '../../constants';
import { Formatter, IFormatOptions } from './formatter';
import { Strings } from '../../system';
import { GitStatusFile, IGitStatusFile, IGitStatusFileWithCommit } from '../models/status';
import * as path from 'path';
import { Formatter, IFormatOptions } from './formatter';
export interface IStatusFormatOptions extends IFormatOptions {
relativePath?: string;

+ 4
- 4
src/git/git.ts Ver ficheiro

@ -1,11 +1,11 @@
'use strict';
import { Objects, Strings } from '../system';
import { findGitPath, IGit } from './gitLocator';
import { Logger } from '../logger';
import { CommandOptions, runCommand } from './shell';
import * as fs from 'fs';
import * as iconv from 'iconv-lite';
import * as path from 'path';
import { Logger } from '../logger';
import { Objects, Strings } from '../system';
import { findGitPath, IGit } from './gitLocator';
import { CommandOptions, runCommand } from './shell';
export { IGit };
export * from './models/models';

+ 1
- 1
src/git/gitLocator.ts Ver ficheiro

@ -1,7 +1,7 @@
'use strict';
// import { findActualExecutable, spawnPromise } from 'spawn-rx';
import { findExecutable, runCommand } from './shell';
import * as path from 'path';
import { findExecutable, runCommand } from './shell';
export interface IGit {
path: string;

+ 2
- 2
src/git/gitUri.ts Ver ficheiro

@ -1,11 +1,11 @@
'use strict';
import { Strings } from '../system';
import * as path from 'path';
import { Uri } from 'vscode';
import { UriComparer } from '../comparers';
import { DocumentSchemes, GlyphChars } from '../constants';
import { Container } from '../container';
import { GitCommit, GitService, IGitStatusFile } from '../gitService';
import * as path from 'path';
import { Strings } from '../system';
export interface IGitCommitInfo {
fileName?: string;

+ 1
- 1
src/git/models/blame.ts Ver ficheiro

@ -1,6 +1,6 @@
'use strict';
import { GitAuthor, GitCommitLine } from './commit';
import { GitBlameCommit } from './blameCommit';
import { GitAuthor, GitCommitLine } from './commit';
export interface GitBlame {
readonly repoPath: string;

+ 2
- 2
src/git/models/commit.ts Ver ficheiro

@ -1,12 +1,12 @@
'use strict';
import { Dates, Strings } from '../../system';
import * as path from 'path';
import { Uri } from 'vscode';
import { configuration, DateStyle, GravatarDefaultStyle } from '../../configuration';
import { GlyphChars } from '../../constants';
import { Container } from '../../container';
import { Dates, Strings } from '../../system';
import { Git } from '../git';
import { GitUri } from '../gitUri';
import * as path from 'path';
const gravatarCache: Map<string, Uri> = new Map();
export function clearGravatarCache() {

+ 3
- 3
src/git/models/logCommit.ts Ver ficheiro

@ -1,10 +1,10 @@
'use strict';
import { Strings } from '../../system';
import * as path from 'path';
import { Uri } from 'vscode';
import { GitCommit, GitCommitType } from './commit';
import { Strings } from '../../system';
import { Git } from '../git';
import { GitCommit, GitCommitType } from './commit';
import { GitStatusFileStatus, IGitStatusFile } from './status';
import * as path from 'path';
export class GitLogCommit extends GitCommit {
nextSha?: string;

+ 3
- 3
src/git/models/repository.ts Ver ficheiro

@ -1,5 +1,5 @@
'use strict';
import { Functions } from '../../system';
import * as _path from 'path';
import {
ConfigurationChangeEvent,
Disposable,
@ -12,10 +12,10 @@ import {
} from 'vscode';
import { configuration, IRemotesConfig } from '../../configuration';
import { Container } from '../../container';
import { GitBranch, GitDiffShortStat, GitRemote, GitStash, GitStatus, GitTag } from '../git';
import { GitUri } from '../../gitService';
import { Functions } from '../../system';
import { GitBranch, GitDiffShortStat, GitRemote, GitStash, GitStatus, GitTag } from '../git';
import { RemoteProviderFactory, RemoteProviderMap } from '../remotes/factory';
import * as _path from 'path';
export enum RepositoryChange {
Config = 'config',

+ 2
- 2
src/git/models/status.ts Ver ficheiro

@ -1,10 +1,10 @@
'use strict';
import { Strings } from '../../system';
import * as path from 'path';
import { Uri } from 'vscode';
import { GlyphChars } from '../../constants';
import { Strings } from '../../system';
import { GitUri } from '../gitUri';
import { GitLogCommit } from './logCommit';
import * as path from 'path';
export interface GitStatusUpstreamState {
ahead: number;

+ 1
- 1
src/git/parsers/blameParser.ts Ver ficheiro

@ -1,7 +1,7 @@
'use strict';
import * as path from 'path';
import { Strings } from '../../system';
import { Git, GitAuthor, GitBlame, GitBlameCommit, GitCommitLine } from './../git';
import * as path from 'path';
interface BlameEntry {
sha: string;

+ 2
- 3
src/git/parsers/logParser.ts Ver ficheiro

@ -1,9 +1,8 @@
'use strict';
import { Arrays, Strings } from '../../system';
import * as path from 'path';
import { Range } from 'vscode';
import { Arrays, Strings } from '../../system';
import { Git, GitAuthor, GitCommitType, GitLog, GitLogCommit, GitStatusFileStatus, IGitStatusFile } from './../git';
// import { Logger } from '../../logger';
import * as path from 'path';
interface LogEntry {
ref?: string;

+ 1
- 1
src/git/parsers/remoteParser.ts Ver ficheiro

@ -1,7 +1,7 @@
'use strict';
import { GitRemote } from './../git';
import { GitRemoteType } from '../models/remote';
import { RemoteProvider } from '../remotes/factory';
import { GitRemote } from './../git';
const remoteRegex = /^(.*)\t(.*)\s\((.*)\)$/gm;
const urlRegex = /^(?:(git:\/\/)(.*?)\/|(https?:\/\/)(?:.*?@)?(.*?)\/|git@(.*):|(ssh:\/\/)(?:.*@)?(.*?)(?::.*?)?\/|(?:.*?@)(.*?):)(.*)$/;

+ 1
- 1
src/git/parsers/stashParser.ts Ver ficheiro

@ -1,7 +1,7 @@
'use strict';
import { Arrays, Strings } from '../../system';
import { GitCommitType, GitLogParser, GitStash, GitStashCommit, GitStatusFileStatus, IGitStatusFile } from './../git';
// import { Logger } from '../../logger';
// import { Logger } from './logger';
interface StashEntry {
ref?: string;

+ 1
- 1
src/git/remotes/custom.ts Ver ficheiro

@ -1,7 +1,7 @@
'use strict';
import { Strings } from '../../system';
import { Range } from 'vscode';
import { IRemotesUrlsConfig } from '../../configuration';
import { Strings } from '../../system';
import { RemoteProvider } from './provider';
export class CustomService extends RemoteProvider {

+ 2
- 2
src/git/remotes/factory.ts Ver ficheiro

@ -1,11 +1,11 @@
'use strict';
import { CustomRemoteType, IRemotesConfig } from '../../configuration';
import { Logger } from '../../logger';
import { BitbucketService } from './bitbucket';
import { BitbucketServerService } from './bitbucket-server';
import { CustomRemoteType, IRemotesConfig } from '../../configuration';
import { CustomService } from './custom';
import { GitHubService } from './github';
import { GitLabService } from './gitlab';
import { Logger } from '../../logger';
import { RemoteProvider } from './provider';
import { VisualStudioService } from './visualStudio';

+ 1
- 1
src/git/shell.ts Ver ficheiro

@ -1,8 +1,8 @@
'use strict';
import { execFile } from 'child_process';
import { Logger } from '../logger';
import * as fs from 'fs';
import * as path from 'path';
import { Logger } from '../logger';
const isWindows = process.platform === 'win32';

+ 1
- 1
src/gitContentProvider.ts Ver ficheiro

@ -1,10 +1,10 @@
'use strict';
import * as path from 'path';
import { CancellationToken, TextDocumentContentProvider, Uri, window } from 'vscode';
import { DocumentSchemes } from './constants';
import { Container } from './container';
import { GitService, GitUri } from './gitService';
import { Logger } from './logger';
import * as path from 'path';
export class GitContentProvider implements TextDocumentContentProvider {
static scheme = DocumentSchemes.GitLensGit;

+ 5
- 5
src/gitService.ts Ver ficheiro

@ -1,5 +1,6 @@
'use strict';
import { Iterables, Objects, Strings, TernarySearchTree, Versions } from './system';
import * as fs from 'fs';
import * as path from 'path';
import {
ConfigurationChangeEvent,
Disposable,
@ -17,7 +18,6 @@ import {
import { configuration, IRemotesConfig } from './configuration';
import { CommandContext, DocumentSchemes, setCommandContext } from './constants';
import { Container } from './container';
import { RemoteProviderFactory, RemoteProviderMap } from './git/remotes/factory';
import {
CommitFormatting,
Git,
@ -51,11 +51,11 @@ import {
Repository,
RepositoryChange
} from './git/git';
import { CachedBlame, CachedDiff, CachedLog, GitDocumentState, TrackedDocument } from './trackers/gitDocumentTracker';
import { GitUri, IGitCommitInfo } from './git/gitUri';
import { RemoteProviderFactory, RemoteProviderMap } from './git/remotes/factory';
import { Logger } from './logger';
import * as fs from 'fs';
import * as path from 'path';
import { Iterables, Objects, Strings, TernarySearchTree, Versions } from './system';
import { CachedBlame, CachedDiff, CachedLog, GitDocumentState, TrackedDocument } from './trackers/gitDocumentTracker';
export { GitUri, IGit, IGitCommitInfo };
export * from './git/models/models';

src/annotations/lineHoverController.ts → src/hovers/lineHoverController.ts Ver ficheiro

@ -13,10 +13,10 @@ import {
TextEditor,
window
} from 'vscode';
import { Annotations } from './annotations';
import { configuration } from './../configuration';
import { Container } from './../container';
import { LinesChangeEvent } from './../trackers/gitLineTracker';
import { Annotations } from '../annotations/annotations';
import { configuration } from '../configuration';
import { Container } from '../container';
import { LinesChangeEvent } from '../trackers/gitLineTracker';
export class LineHoverController extends Disposable {
private _debugSessionEndDisposable: Disposable | undefined;

+ 5
- 5
src/quickPicks/branchHistoryQuickPick.ts Ver ficheiro

@ -1,17 +1,17 @@
'use strict';
import { Iterables, Strings } from '../system';
import { CancellationTokenSource, QuickPickOptions, window } from 'vscode';
import { Commands, ShowCommitSearchCommandArgs, ShowQuickBranchHistoryCommandArgs } from '../commands';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitLog, GitUri, RemoteResource } from '../gitService';
import { KeyNoopCommand } from '../keyboard';
import { Iterables, Strings } from '../system';
import {
CommandQuickPickItem,
CommitQuickPickItem,
getQuickPickIgnoreFocusOut,
showQuickPickProgress
} from './commonQuickPicks';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitLog, GitUri, RemoteResource } from '../gitService';
import { KeyNoopCommand } from '../keyboard';
import { OpenRemotesCommandQuickPickItem } from './remotesQuickPick';
export class BranchHistoryQuickPick {

+ 1
- 1
src/quickPicks/branchesAndTagsQuickPick.ts Ver ficheiro

@ -1,10 +1,10 @@
'use strict';
import { CancellationTokenSource, QuickPickItem, QuickPickOptions, window } from 'vscode';
import { CommandQuickPickItem, getQuickPickIgnoreFocusOut, showQuickPickProgress } from './commonQuickPicks';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitBranch, GitTag } from '../gitService';
import { KeyNoopCommand } from '../keyboard';
import { CommandQuickPickItem, getQuickPickIgnoreFocusOut, showQuickPickProgress } from './commonQuickPicks';
export class BranchOrTagQuickPickItem implements QuickPickItem {
label: string;

+ 1
- 1
src/quickPicks/branchesQuickPick.ts Ver ficheiro

@ -1,8 +1,8 @@
'use strict';
import { QuickPickItem, QuickPickOptions, window } from 'vscode';
import { CommandQuickPickItem, getQuickPickIgnoreFocusOut } from './commonQuickPicks';
import { GlyphChars } from '../constants';
import { GitBranch } from '../gitService';
import { CommandQuickPickItem, getQuickPickIgnoreFocusOut } from './commonQuickPicks';
export class BranchQuickPickItem implements QuickPickItem {
label: string;

+ 6
- 6
src/quickPicks/commitFileQuickPick.ts Ver ficheiro

@ -1,5 +1,5 @@
'use strict';
import { Iterables, Strings } from '../system';
import * as path from 'path';
import { QuickPickItem, QuickPickOptions, Uri, window } from 'vscode';
import {
Commands,
@ -12,18 +12,18 @@ import {
ShowQuickCommitFileDetailsCommandArgs,
ShowQuickFileHistoryCommandArgs
} from '../commands';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitLog, GitLogCommit, GitUri, RemoteResource } from '../gitService';
import { KeyCommand, KeyNoopCommand } from '../keyboard';
import { Iterables, Strings } from '../system';
import {
CommandQuickPickItem,
getQuickPickIgnoreFocusOut,
KeyCommandQuickPickItem,
OpenFileCommandQuickPickItem
} from './commonQuickPicks';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitLog, GitLogCommit, GitUri, RemoteResource } from '../gitService';
import { KeyCommand, KeyNoopCommand } from '../keyboard';
import { OpenRemotesCommandQuickPickItem } from './remotesQuickPick';
import * as path from 'path';
export class ApplyCommitFileChangesCommandQuickPickItem extends CommandQuickPickItem {
constructor(

+ 11
- 11
src/quickPicks/commitQuickPick.ts Ver ficheiro

@ -1,5 +1,5 @@
'use strict';
import { Arrays, Iterables, Strings } from '../system';
import * as path from 'path';
import { commands, QuickPickOptions, TextDocumentShowOptions, Uri, window } from 'vscode';
import {
Commands,
@ -11,15 +11,6 @@ import {
StashApplyCommandArgs,
StashDeleteCommandArgs
} from '../commands';
import {
CommandQuickPickItem,
getQuickPickIgnoreFocusOut,
KeyCommandQuickPickItem,
OpenFileCommandQuickPickItem,
OpenFilesCommandQuickPickItem,
QuickPickItem,
ShowCommitInResultsQuickPickItem
} from './commonQuickPicks';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import {
@ -34,8 +25,17 @@ import {
RemoteResource
} from '../gitService';
import { KeyCommand, KeyNoopCommand, Keys } from '../keyboard';
import { Arrays, Iterables, Strings } from '../system';
import {
CommandQuickPickItem,
getQuickPickIgnoreFocusOut,
KeyCommandQuickPickItem,
OpenFileCommandQuickPickItem,
OpenFilesCommandQuickPickItem,
QuickPickItem,
ShowCommitInResultsQuickPickItem
} from './commonQuickPicks';
import { OpenRemotesCommandQuickPickItem } from './remotesQuickPick';
import * as path from 'path';
export class CommitWithFileStatusQuickPickItem extends OpenFileCommandQuickPickItem {
readonly status: GitStatusFileStatus;

+ 2
- 2
src/quickPicks/commitsQuickPick.ts Ver ficheiro

@ -1,16 +1,16 @@
'use strict';
import { Iterables } from '../system';
import { CancellationTokenSource, QuickPickOptions, window } from 'vscode';
import { Container } from '../container';
import { GitLog } from '../gitService';
import { KeyNoopCommand } from '../keyboard';
import { Iterables } from '../system';
import {
CommandQuickPickItem,
CommitQuickPickItem,
getQuickPickIgnoreFocusOut,
MessageQuickPickItem,
showQuickPickProgress
} from '../quickPicks/quickPicks';
} from './commonQuickPicks';
export class CommitsQuickPick {
static showProgress(message: string) {

+ 70
- 70
src/quickPicks/commonQuickPicks.ts Ver ficheiro

@ -1,5 +1,4 @@
'use strict';
import { Strings } from '../system';
import {
CancellationTokenSource,
commands,
@ -10,13 +9,14 @@ import {
Uri,
window
} from 'vscode';
import { BranchesAndTagsQuickPick, BranchOrTagQuickPickItem } from './branchesAndTagsQuickPick';
import { Commands, openEditor } from '../commands';
import { configuration } from '../configuration';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitLog, GitLogCommit, GitStashCommit } from '../gitService';
import { KeyMapping, Keys } from '../keyboard';
import { Strings } from '../system';
import { BranchesAndTagsQuickPick, BranchOrTagQuickPickItem } from './branchesAndTagsQuickPick';
export function getQuickPickIgnoreFocusOut() {
return !configuration.get<boolean>(configuration.name('advanced')('quickPick')('closeOnFocusOut').value);
@ -100,9 +100,68 @@ export class CommandQuickPickItem implements QuickPickItem {
}
}
export class MessageQuickPickItem extends CommandQuickPickItem {
constructor(message: string) {
super({ label: message, description: '' } as QuickPickItem);
export class CommitQuickPickItem implements QuickPickItem {
label: string;
description: string;
detail: string;
constructor(
public readonly commit: GitLogCommit
) {
const message = commit.getShortMessage();
if (commit.isStash) {
this.label = message;
this.description = '';
this.detail = `${GlyphChars.Space} ${(commit as GitStashCommit).stashName || commit.shortSha} ${Strings.pad(
GlyphChars.Dot,
1,
1
)} ${commit.formattedDate} ${Strings.pad(GlyphChars.Dot, 1, 1)} ${commit.getDiffStatus()}`;
}
else {
this.label = message;
this.description = `${Strings.pad('$(git-commit)', 1, 1)} ${commit.shortSha}`;
this.detail = `${GlyphChars.Space} ${commit.author}, ${commit.formattedDate}${
commit.isFile ? '' : ` ${Strings.pad(GlyphChars.Dot, 1, 1)} ${commit.getDiffStatus()}`
}`;
}
}
}
export class ChooseFromBranchesAndTagsQuickPickItem extends CommandQuickPickItem {
constructor(
private readonly repoPath: string,
private readonly placeHolder: string,
private readonly goBackCommand?: CommandQuickPickItem,
item: QuickPickItem = {
label: 'Choose from Branch or Tag History...',
description: `${Strings.pad(GlyphChars.Dash, 2, 2)} shows list of branches and tags`
}
) {
super(item, undefined, undefined);
}
async execute(
options: TextDocumentShowOptions = { preserveFocus: false, preview: false }
): Promise<CommandQuickPickItem | BranchOrTagQuickPickItem | undefined> {
const progressCancellation = BranchesAndTagsQuickPick.showProgress(this.placeHolder);
try {
const [branches, tags] = await Promise.all([
Container.git.getBranches(this.repoPath),
Container.git.getTags(this.repoPath)
]);
if (progressCancellation.token.isCancellationRequested) return undefined;
return BranchesAndTagsQuickPick.show(branches, tags, this.placeHolder, {
progressCancellation: progressCancellation,
goBackCommand: this.goBackCommand
});
}
finally {
progressCancellation.cancel();
}
}
}
@ -112,6 +171,12 @@ export class KeyCommandQuickPickItem extends CommandQuickPickItem {
}
}
export class MessageQuickPickItem extends CommandQuickPickItem {
constructor(message: string) {
super({ label: message, description: '' } as QuickPickItem);
}
}
export class OpenFileCommandQuickPickItem extends CommandQuickPickItem {
constructor(
public readonly uri: Uri,
@ -164,34 +229,6 @@ export class OpenFilesCommandQuickPickItem extends CommandQuickPickItem {
}
}
export class CommitQuickPickItem implements QuickPickItem {
label: string;
description: string;
detail: string;
constructor(
public readonly commit: GitLogCommit
) {
const message = commit.getShortMessage();
if (commit.isStash) {
this.label = message;
this.description = '';
this.detail = `${GlyphChars.Space} ${(commit as GitStashCommit).stashName || commit.shortSha} ${Strings.pad(
GlyphChars.Dot,
1,
1
)} ${commit.formattedDate} ${Strings.pad(GlyphChars.Dot, 1, 1)} ${commit.getDiffStatus()}`;
}
else {
this.label = message;
this.description = `${Strings.pad('$(git-commit)', 1, 1)} ${commit.shortSha}`;
this.detail = `${GlyphChars.Space} ${commit.author}, ${commit.formattedDate}${
commit.isFile ? '' : ` ${Strings.pad(GlyphChars.Dot, 1, 1)} ${commit.getDiffStatus()}`
}`;
}
}
}
export class ShowCommitInResultsQuickPickItem extends CommandQuickPickItem {
constructor(
public readonly commit: GitLogCommit,
@ -243,40 +280,3 @@ export class ShowCommitsSearchInResultsQuickPickItem extends ShowCommitsInResult
super(results, { label: search }, item);
}
}
export class ShowBranchesAndTagsQuickPickItem extends CommandQuickPickItem {
constructor(
private readonly repoPath: string,
private readonly placeHolder: string,
private readonly goBackCommand?: CommandQuickPickItem,
item: QuickPickItem = {
label: 'Choose from Branch or Tag History...',
description: `${Strings.pad(GlyphChars.Dash, 2, 2)} shows list of branches and tags`
}
) {
super(item, undefined, undefined);
}
async execute(
options: TextDocumentShowOptions = { preserveFocus: false, preview: false }
): Promise<CommandQuickPickItem | BranchOrTagQuickPickItem | undefined> {
const progressCancellation = BranchesAndTagsQuickPick.showProgress(this.placeHolder);
try {
const [branches, tags] = await Promise.all([
Container.git.getBranches(this.repoPath),
Container.git.getTags(this.repoPath)
]);
if (progressCancellation.token.isCancellationRequested) return undefined;
return BranchesAndTagsQuickPick.show(branches, tags, this.placeHolder, {
progressCancellation: progressCancellation,
goBackCommand: this.goBackCommand
});
}
finally {
progressCancellation.cancel();
}
}
}

+ 12
- 8
src/quickPicks/fileHistoryQuickPick.ts Ver ficheiro

@ -1,20 +1,20 @@
'use strict';
import { Iterables, Strings } from '../system';
import * as path from 'path';
import { CancellationTokenSource, QuickPickOptions, Uri, window } from 'vscode';
import { Commands, ShowQuickCurrentBranchHistoryCommandArgs, ShowQuickFileHistoryCommandArgs } from '../commands';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitLog, GitUri, RemoteResource } from '../gitService';
import { KeyNoopCommand } from '../keyboard';
import { Iterables, Strings } from '../system';
import {
ChooseFromBranchesAndTagsQuickPickItem,
CommandQuickPickItem,
CommitQuickPickItem,
getQuickPickIgnoreFocusOut,
ShowBranchesAndTagsQuickPickItem,
showQuickPickProgress
} from './commonQuickPicks';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitLog, GitUri, RemoteResource } from '../gitService';
import { KeyNoopCommand } from '../keyboard';
import { OpenRemotesCommandQuickPickItem } from './remotesQuickPick';
import * as path from 'path';
export class FileHistoryQuickPick {
static showProgress(placeHolder: string) {
@ -49,7 +49,11 @@ export class FileHistoryQuickPick {
let index = 0;
index++;
items.splice(0, 0, new ShowBranchesAndTagsQuickPickItem(log.repoPath, placeHolder, options.currentCommand));
items.splice(
0,
0,
new ChooseFromBranchesAndTagsQuickPickItem(log.repoPath, placeHolder, options.currentCommand)
);
if (options.showInResultsExplorerCommand !== undefined) {
index++;

+ 1
- 1
src/quickPicks/modesQuickPick.ts Ver ficheiro

@ -1,7 +1,7 @@
'use strict';
import { QuickPickItem, QuickPickOptions, window } from 'vscode';
import { Container } from '../container';
import { GlyphChars } from '../constants';
import { Container } from '../container';
export interface ModesQuickPickItem extends QuickPickItem {
key: string | undefined;

+ 0
- 15
src/quickPicks/quickPicks.ts Ver ficheiro

@ -1,15 +0,0 @@
'use strict';
export * from './branchesAndTagsQuickPick';
export * from './branchesQuickPick';
export * from './branchHistoryQuickPick';
export * from './commitFileQuickPick';
export * from './commitQuickPick';
export * from './commitsQuickPick';
export * from './commonQuickPicks';
export * from './fileHistoryQuickPick';
export * from './modesQuickPick';
export * from './remotesQuickPick';
export * from './repositoriesQuickPick';
export * from './repoStatusQuickPick';
export * from './stashListQuickPick';

+ 3
- 3
src/quickPicks/remotesQuickPick.ts Ver ficheiro

@ -1,8 +1,7 @@
'use strict';
import { Strings } from '../system';
import * as path from 'path';
import { QuickPickOptions, window } from 'vscode';
import { Commands, OpenInRemoteCommandArgs } from '../commands';
import { CommandQuickPickItem, getQuickPickIgnoreFocusOut } from './commonQuickPicks';
import { GlyphChars } from '../constants';
import {
getNameFromRemoteResource,
@ -12,7 +11,8 @@ import {
RemoteResource,
RemoteResourceType
} from '../gitService';
import * as path from 'path';
import { Strings } from '../system';
import { CommandQuickPickItem, getQuickPickIgnoreFocusOut } from './commonQuickPicks';
export class OpenRemoteCommandQuickPickItem extends CommandQuickPickItem {
private remote: GitRemote;

+ 8
- 8
src/quickPicks/repoStatusQuickPick.ts Ver ficheiro

@ -1,5 +1,5 @@
'use strict';
import { Iterables, Strings } from '../system';
import * as path from 'path';
import { commands, QuickPickOptions, TextDocumentShowOptions, window } from 'vscode';
import {
Commands,
@ -9,12 +9,6 @@ import {
ShowQuickRepoStatusCommandArgs,
ShowQuickStashListCommandArgs
} from '../commands';
import {
CommandQuickPickItem,
getQuickPickIgnoreFocusOut,
OpenFileCommandQuickPickItem,
QuickPickItem
} from './commonQuickPicks';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import {
@ -27,7 +21,13 @@ import {
GitUri
} from '../gitService';
import { Keys } from '../keyboard';
import * as path from 'path';
import { Iterables, Strings } from '../system';
import {
CommandQuickPickItem,
getQuickPickIgnoreFocusOut,
OpenFileCommandQuickPickItem,
QuickPickItem
} from './commonQuickPicks';
export class OpenStatusFileCommandQuickPickItem extends OpenFileCommandQuickPickItem {
public readonly status: GitStatusFile;

+ 2
- 2
src/quickPicks/repositoriesQuickPick.ts Ver ficheiro

@ -1,9 +1,9 @@
'use strict';
import { Iterables } from '../system';
import { QuickPickItem, QuickPickOptions, window } from 'vscode';
import { CommandQuickPickItem, getQuickPickIgnoreFocusOut } from './commonQuickPicks';
import { Container } from '../container';
import { Repository } from '../gitService';
import { Iterables } from '../system';
import { CommandQuickPickItem, getQuickPickIgnoreFocusOut } from './commonQuickPicks';
export class RepositoryQuickPickItem implements QuickPickItem {
label: string;

+ 2
- 2
src/quickPicks/stashListQuickPick.ts Ver ficheiro

@ -1,17 +1,17 @@
'use strict';
import { Iterables, Strings } from '../system';
import { CancellationTokenSource, QuickPickOptions, window } from 'vscode';
import { Commands, StashSaveCommandArgs } from '../commands';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitStash } from '../gitService';
import { KeyNoopCommand } from '../keyboard';
import { Iterables, Strings } from '../system';
import {
CommandQuickPickItem,
CommitQuickPickItem,
getQuickPickIgnoreFocusOut,
showQuickPickProgress
} from '../quickPicks/quickPicks';
} from './commonQuickPicks';
export class StashListQuickPick {
static showProgress(mode: 'list' | 'apply') {

+ 15
- 0
src/quickpicks.ts Ver ficheiro

@ -0,0 +1,15 @@
'use strict';
export * from './quickpicks/branchesAndTagsQuickPick';
export * from './quickpicks/branchesQuickPick';
export * from './quickpicks/branchHistoryQuickPick';
export * from './quickpicks/commitFileQuickPick';
export * from './quickpicks/commitQuickPick';
export * from './quickpicks/commitsQuickPick';
export * from './quickpicks/commonQuickPicks';
export * from './quickpicks/fileHistoryQuickPick';
export * from './quickpicks/modesQuickPick';
export * from './quickpicks/remotesQuickPick';
export * from './quickpicks/repositoriesQuickPick';
export * from './quickpicks/repoStatusQuickPick';
export * from './quickpicks/stashListQuickPick';

src/statusBarController.ts → src/statusbar/statusBarController.ts Ver ficheiro

@ -1,11 +1,11 @@
'use strict';
import { ConfigurationChangeEvent, Disposable, StatusBarAlignment, StatusBarItem, TextEditor, window } from 'vscode';
import { Commands } from './commands';
import { configuration, StatusBarCommand } from './configuration';
import { isTextEditor } from './constants';
import { Container } from './container';
import { LinesChangeEvent } from './trackers/gitLineTracker';
import { CommitFormatter, GitCommit, ICommitFormatOptions } from './gitService';
import { Commands } from '../commands';
import { configuration, StatusBarCommand } from '../configuration';
import { isTextEditor } from '../constants';
import { Container } from '../container';
import { CommitFormatter, GitCommit, ICommitFormatOptions } from '../gitService';
import { LinesChangeEvent } from '../trackers/gitLineTracker';
export class StatusBarController extends Disposable {
private _blameStatusBarItem: StatusBarItem | undefined;

+ 2
- 2
src/trackers/activeEditorTracker.ts Ver ficheiro

@ -1,7 +1,7 @@
'use strict';
import { Functions } from './../system';
import { commands, Disposable, TextEditor, window } from 'vscode';
import { BuiltInCommands } from './../constants';
import { BuiltInCommands } from '../constants';
import { Functions } from '../system';
export class ActiveEditorTracker extends Disposable {
private _disposable: Disposable;

+ 3
- 3
src/trackers/documentTracker.ts Ver ficheiro

@ -1,5 +1,4 @@
'use strict';
import { Functions, IDeferrable } from './../system';
import {
ConfigurationChangeEvent,
Disposable,
@ -16,9 +15,10 @@ import {
window,
workspace
} from 'vscode';
import { configuration } from './../configuration';
import { CommandContext, DocumentSchemes, isActiveDocument, isTextEditor, setCommandContext } from './../constants';
import { configuration } from '../configuration';
import { CommandContext, DocumentSchemes, isActiveDocument, isTextEditor, setCommandContext } from '../constants';
import { GitUri } from '../gitService';
import { Functions, IDeferrable } from '../system';
import { DocumentBlameStateChangeEvent, TrackedDocument } from './trackedDocument';
export * from './trackedDocument';

Alguns ficheiros não foram mostrados porque foram alterados demasiados ficheiros neste diff

Carregando…
Cancelar
Guardar