mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 3c6f6af7347d38e87bc6406024e8dcf9e9bce229 (#8962)
* Merge from vscode 3c6f6af7347d38e87bc6406024e8dcf9e9bce229 * skip failing tests * update mac build image
This commit is contained in:
committed by
Karl Burtram
parent
0eaee18dc4
commit
fefe1454de
@@ -1194,7 +1194,7 @@
|
||||
{
|
||||
"command": "git.openFile",
|
||||
"group": "navigation",
|
||||
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
|
||||
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
|
||||
},
|
||||
{
|
||||
"command": "git.openChange",
|
||||
@@ -1204,44 +1204,44 @@
|
||||
{
|
||||
"command": "git.stageSelectedRanges",
|
||||
"group": "2_git@1",
|
||||
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
|
||||
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
|
||||
},
|
||||
{
|
||||
"command": "git.unstageSelectedRanges",
|
||||
"group": "2_git@2",
|
||||
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
|
||||
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
|
||||
},
|
||||
{
|
||||
"command": "git.revertSelectedRanges",
|
||||
"group": "2_git@3",
|
||||
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
|
||||
"when": "config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
|
||||
}
|
||||
],
|
||||
"editor/context": [
|
||||
{
|
||||
"command": "git.stageSelectedRanges",
|
||||
"group": "2_git@1",
|
||||
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
|
||||
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
|
||||
},
|
||||
{
|
||||
"command": "git.unstageSelectedRanges",
|
||||
"group": "2_git@2",
|
||||
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
|
||||
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
|
||||
},
|
||||
{
|
||||
"command": "git.revertSelectedRanges",
|
||||
"group": "2_git@3",
|
||||
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^gitfs$|^file$/"
|
||||
"when": "isInDiffRightEditor && config.git.enabled && gitOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme =~ /^git$|^file$/"
|
||||
}
|
||||
],
|
||||
"scm/change/title": [
|
||||
{
|
||||
"command": "git.stageChange",
|
||||
"when": "originalResourceScheme == gitfs"
|
||||
"when": "originalResourceScheme == git"
|
||||
},
|
||||
{
|
||||
"command": "git.revertChange",
|
||||
"when": "originalResourceScheme == gitfs"
|
||||
"when": "originalResourceScheme == git"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -239,5 +239,10 @@ export class ApiImpl implements API {
|
||||
return toGitUri(uri, ref);
|
||||
}
|
||||
|
||||
getRepository(uri: Uri): Repository | null {
|
||||
const result = this._model.getRepository(uri);
|
||||
return result ? new ApiRepository(result) : null;
|
||||
}
|
||||
|
||||
constructor(private _model: Model) { }
|
||||
}
|
||||
|
||||
1
extensions/git/src/api/git.d.ts
vendored
1
extensions/git/src/api/git.d.ts
vendored
@@ -187,6 +187,7 @@ export interface API {
|
||||
readonly onDidCloseRepository: Event<Repository>;
|
||||
|
||||
toGitUri(uri: Uri, ref: string): Uri;
|
||||
getRepository(uri: Uri): Repository | null;
|
||||
}
|
||||
|
||||
export interface GitExtension {
|
||||
|
||||
@@ -47,9 +47,9 @@ export class GitFileSystemProvider implements FileSystemProvider {
|
||||
this.disposables.push(
|
||||
model.onDidChangeRepository(this.onDidChangeRepository, this),
|
||||
model.onDidChangeOriginalResource(this.onDidChangeOriginalResource, this),
|
||||
workspace.registerFileSystemProvider('gitfs', this, { isReadonly: true, isCaseSensitive: true }),
|
||||
workspace.registerFileSystemProvider('git', this, { isReadonly: true, isCaseSensitive: true }),
|
||||
workspace.registerResourceLabelFormatter({
|
||||
scheme: 'gitfs',
|
||||
scheme: 'git',
|
||||
formatting: {
|
||||
label: '${path} (git)',
|
||||
separator: '/'
|
||||
|
||||
@@ -392,7 +392,7 @@ export class Model {
|
||||
if (hint instanceof Uri) {
|
||||
let resourcePath: string;
|
||||
|
||||
if (hint.scheme === 'git' || hint.scheme === 'gitfs') {
|
||||
if (hint.scheme === 'git') {
|
||||
resourcePath = fromGitUri(hint).path;
|
||||
} else {
|
||||
resourcePath = hint.fsPath;
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Uri } from 'vscode';
|
||||
import * as qs from 'querystring';
|
||||
|
||||
export interface GitUriParams {
|
||||
path: string;
|
||||
@@ -13,25 +12,11 @@ export interface GitUriParams {
|
||||
}
|
||||
|
||||
export function isGitUri(uri: Uri): boolean {
|
||||
return /^git(fs)?$/.test(uri.scheme);
|
||||
return /^git$/.test(uri.scheme);
|
||||
}
|
||||
|
||||
export function fromGitUri(uri: Uri): GitUriParams {
|
||||
const result = qs.parse(uri.query) as any;
|
||||
|
||||
if (!result) {
|
||||
throw new Error('Invalid git URI: empty query');
|
||||
}
|
||||
|
||||
if (typeof result.path !== 'string') {
|
||||
throw new Error('Invalid git URI: missing path');
|
||||
}
|
||||
|
||||
if (typeof result.ref !== 'string') {
|
||||
throw new Error('Invalid git URI: missing ref');
|
||||
}
|
||||
|
||||
return result;
|
||||
return JSON.parse(uri.query);
|
||||
}
|
||||
|
||||
export interface GitUriOptions {
|
||||
@@ -61,8 +46,8 @@ export function toGitUri(uri: Uri, ref: string, options: GitUriOptions = {}): Ur
|
||||
}
|
||||
|
||||
return uri.with({
|
||||
scheme: 'gitfs',
|
||||
scheme: 'git',
|
||||
path,
|
||||
query: qs.stringify(params as any)
|
||||
query: JSON.stringify(params)
|
||||
});
|
||||
}
|
||||
|
||||
@@ -235,9 +235,9 @@
|
||||
"t": "text.git-commit meta.scope.metadata.git-commit comment.line.number-sign.git-commit markup.inserted.git-commit",
|
||||
"r": {
|
||||
"dark_plus": "markup.inserted: #B5CEA8",
|
||||
"light_plus": "markup.inserted: #09885A",
|
||||
"light_plus": "markup.inserted: #098658",
|
||||
"dark_vs": "markup.inserted: #B5CEA8",
|
||||
"light_vs": "markup.inserted: #09885A",
|
||||
"light_vs": "markup.inserted: #098658",
|
||||
"hc_black": "markup.inserted: #B5CEA8"
|
||||
}
|
||||
},
|
||||
@@ -252,4 +252,4 @@
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
@@ -147,9 +147,9 @@
|
||||
"t": "source.diff markup.inserted.diff punctuation.definition.inserted.diff",
|
||||
"r": {
|
||||
"dark_plus": "markup.inserted: #B5CEA8",
|
||||
"light_plus": "markup.inserted: #09885A",
|
||||
"light_plus": "markup.inserted: #098658",
|
||||
"dark_vs": "markup.inserted: #B5CEA8",
|
||||
"light_vs": "markup.inserted: #09885A",
|
||||
"light_vs": "markup.inserted: #098658",
|
||||
"hc_black": "markup.inserted: #B5CEA8"
|
||||
}
|
||||
},
|
||||
@@ -158,10 +158,10 @@
|
||||
"t": "source.diff markup.inserted.diff",
|
||||
"r": {
|
||||
"dark_plus": "markup.inserted: #B5CEA8",
|
||||
"light_plus": "markup.inserted: #09885A",
|
||||
"light_plus": "markup.inserted: #098658",
|
||||
"dark_vs": "markup.inserted: #B5CEA8",
|
||||
"light_vs": "markup.inserted: #09885A",
|
||||
"light_vs": "markup.inserted: #098658",
|
||||
"hc_black": "markup.inserted: #B5CEA8"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
"t": "text.git-rebase meta.commit-command.git-rebase constant.sha.git-rebase",
|
||||
"r": {
|
||||
"dark_plus": "constant.sha.git-rebase: #B5CEA8",
|
||||
"light_plus": "constant.sha.git-rebase: #09885A",
|
||||
"light_plus": "constant.sha.git-rebase: #098658",
|
||||
"dark_vs": "constant.sha.git-rebase: #B5CEA8",
|
||||
"light_vs": "constant.sha.git-rebase: #09885A",
|
||||
"light_vs": "constant.sha.git-rebase: #098658",
|
||||
"hc_black": "constant.sha.git-rebase: #B5CEA8"
|
||||
}
|
||||
},
|
||||
@@ -81,9 +81,9 @@
|
||||
"t": "text.git-rebase meta.commit-command.git-rebase constant.sha.git-rebase",
|
||||
"r": {
|
||||
"dark_plus": "constant.sha.git-rebase: #B5CEA8",
|
||||
"light_plus": "constant.sha.git-rebase: #09885A",
|
||||
"light_plus": "constant.sha.git-rebase: #098658",
|
||||
"dark_vs": "constant.sha.git-rebase: #B5CEA8",
|
||||
"light_vs": "constant.sha.git-rebase: #09885A",
|
||||
"light_vs": "constant.sha.git-rebase: #098658",
|
||||
"hc_black": "constant.sha.git-rebase: #B5CEA8"
|
||||
}
|
||||
},
|
||||
@@ -136,9 +136,9 @@
|
||||
"t": "text.git-rebase meta.commit-command.git-rebase constant.sha.git-rebase",
|
||||
"r": {
|
||||
"dark_plus": "constant.sha.git-rebase: #B5CEA8",
|
||||
"light_plus": "constant.sha.git-rebase: #09885A",
|
||||
"light_plus": "constant.sha.git-rebase: #098658",
|
||||
"dark_vs": "constant.sha.git-rebase: #B5CEA8",
|
||||
"light_vs": "constant.sha.git-rebase: #09885A",
|
||||
"light_vs": "constant.sha.git-rebase: #098658",
|
||||
"hc_black": "constant.sha.git-rebase: #B5CEA8"
|
||||
}
|
||||
},
|
||||
@@ -191,9 +191,9 @@
|
||||
"t": "text.git-rebase meta.commit-command.git-rebase constant.sha.git-rebase",
|
||||
"r": {
|
||||
"dark_plus": "constant.sha.git-rebase: #B5CEA8",
|
||||
"light_plus": "constant.sha.git-rebase: #09885A",
|
||||
"light_plus": "constant.sha.git-rebase: #098658",
|
||||
"dark_vs": "constant.sha.git-rebase: #B5CEA8",
|
||||
"light_vs": "constant.sha.git-rebase: #09885A",
|
||||
"light_vs": "constant.sha.git-rebase: #098658",
|
||||
"hc_black": "constant.sha.git-rebase: #B5CEA8"
|
||||
}
|
||||
},
|
||||
@@ -246,9 +246,9 @@
|
||||
"t": "text.git-rebase meta.commit-command.git-rebase constant.sha.git-rebase",
|
||||
"r": {
|
||||
"dark_plus": "constant.sha.git-rebase: #B5CEA8",
|
||||
"light_plus": "constant.sha.git-rebase: #09885A",
|
||||
"light_plus": "constant.sha.git-rebase: #098658",
|
||||
"dark_vs": "constant.sha.git-rebase: #B5CEA8",
|
||||
"light_vs": "constant.sha.git-rebase: #09885A",
|
||||
"light_vs": "constant.sha.git-rebase: #098658",
|
||||
"hc_black": "constant.sha.git-rebase: #B5CEA8"
|
||||
}
|
||||
},
|
||||
@@ -301,9 +301,9 @@
|
||||
"t": "text.git-rebase meta.commit-command.git-rebase constant.sha.git-rebase",
|
||||
"r": {
|
||||
"dark_plus": "constant.sha.git-rebase: #B5CEA8",
|
||||
"light_plus": "constant.sha.git-rebase: #09885A",
|
||||
"light_plus": "constant.sha.git-rebase: #098658",
|
||||
"dark_vs": "constant.sha.git-rebase: #B5CEA8",
|
||||
"light_vs": "constant.sha.git-rebase: #09885A",
|
||||
"light_vs": "constant.sha.git-rebase: #098658",
|
||||
"hc_black": "constant.sha.git-rebase: #B5CEA8"
|
||||
}
|
||||
},
|
||||
@@ -356,9 +356,9 @@
|
||||
"t": "text.git-rebase meta.commit-command.git-rebase constant.sha.git-rebase",
|
||||
"r": {
|
||||
"dark_plus": "constant.sha.git-rebase: #B5CEA8",
|
||||
"light_plus": "constant.sha.git-rebase: #09885A",
|
||||
"light_plus": "constant.sha.git-rebase: #098658",
|
||||
"dark_vs": "constant.sha.git-rebase: #B5CEA8",
|
||||
"light_vs": "constant.sha.git-rebase: #09885A",
|
||||
"light_vs": "constant.sha.git-rebase: #098658",
|
||||
"hc_black": "constant.sha.git-rebase: #B5CEA8"
|
||||
}
|
||||
},
|
||||
@@ -538,4 +538,4 @@
|
||||
"hc_black": "comment: #7CA668"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user