浏览代码

fix: update patches

Baptiste Augrain 2 年之前
父节点
当前提交
36c0f2a014
共有 6 个文件被更改,包括 81 次插入66 次删除
  1. 1 1
      insider.json
  2. 3 0
      patch.sh
  3. 37 19
      patches/build-version.patch
  4. 16 27
      patches/custom-gallery.patch
  5. 4 4
      patches/use-github-pat.patch
  6. 20 15
      product.json

+ 1 - 1
insider.json

@@ -1,4 +1,4 @@
 {
 {
   "tag": "1.72.0",
   "tag": "1.72.0",
-  "commit": "333754f29b719f605904f072b13c054c2231b9bd"
+  "commit": "43676d69e091e7f9451667925f3f0cc20d7e7221"
 }
 }

+ 3 - 0
patch.sh

@@ -4,6 +4,9 @@ FILE="../patches/${1}.patch"
 
 
 cd vscode || { echo "'vscode' dir not found"; exit 1; }
 cd vscode || { echo "'vscode' dir not found"; exit 1; }
 
 
+git add .
+git reset -q --hard HEAD
+
 git apply --reject "${FILE}"
 git apply --reject "${FILE}"
 
 
 read -p "Press any key when the conflict have been resolved..." -n1 -s
 read -p "Press any key when the conflict have been resolved..." -n1 -s

+ 37 - 19
patches/build-version.patch

@@ -1,29 +1,48 @@
+diff --git a/.vscode/settings.json b/.vscode/settings.json
+index 184042b..a067194 100644
+--- a/.vscode/settings.json
++++ b/.vscode/settings.json
+@@ -87,3 +87,3 @@
+ 		"editor.defaultFormatter": "vscode.typescript-language-features",
+-		"editor.formatOnSave": true
++		// "editor.formatOnSave": true
+ 	},
 diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
 diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
-index a07c552..e5546e0 100644
+index 980f647..959fb88 100644
 --- a/build/gulpfile.reh.js
 --- a/build/gulpfile.reh.js
 +++ b/build/gulpfile.reh.js
 +++ b/build/gulpfile.reh.js
-@@ -250,4 +250,5 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
+@@ -245,4 +245,5 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
  		const name = product.nameShort;
  		const name = product.nameShort;
 +		const release = packageJson.release;
 +		const release = packageJson.release;
  		const packageJsonStream = gulp.src(['remote/package.json'], { base: 'remote' })
  		const packageJsonStream = gulp.src(['remote/package.json'], { base: 'remote' })
 -			.pipe(json({ name, version, dependencies: undefined, optionalDependencies: undefined }));
 -			.pipe(json({ name, version, dependencies: undefined, optionalDependencies: undefined }));
 +			.pipe(json({ name, version, release, dependencies: undefined, optionalDependencies: undefined }));
 +			.pipe(json({ name, version, release, dependencies: undefined, optionalDependencies: undefined }));
  
  
+@@ -251,3 +252,3 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
+ 		const productJsonStream = gulp.src(['product.json'], { base: '.' })
+-			.pipe(json({ commit, date, version }));
++			.pipe(json({ commit, date, version, release }));
+ 
 diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
 diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
-index 2c075a3..ff98402 100644
+index 6947d1e..80f358e 100644
 --- a/build/gulpfile.vscode.js
 --- a/build/gulpfile.vscode.js
 +++ b/build/gulpfile.vscode.js
 +++ b/build/gulpfile.vscode.js
-@@ -191,3 +191,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
+@@ -224,3 +224,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
  
  
 -		let version = packageJson.version;
 -		let version = packageJson.version;
 +		let version = packageJson.version
 +		let version = packageJson.version
  		const quality = product.quality;
  		const quality = product.quality;
-@@ -199,3 +199,4 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
+@@ -232,3 +232,4 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
  		const name = product.nameShort;
  		const name = product.nameShort;
 -		const packageJsonUpdates = { name, version };
 -		const packageJsonUpdates = { name, version };
 +		const release = packageJson.release;
 +		const release = packageJson.release;
 +		const packageJsonUpdates = { name, version, release };
 +		const packageJsonUpdates = { name, version, release };
  
  
+@@ -243,3 +244,3 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
+ 		const date = new Date().toISOString();
+-		const productJsonUpdate = { commit, date, checksums, version };
++		const productJsonUpdate = { commit, date, checksums, version, release };
+ 
 diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
 diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
 index 4a25ca5..ca33d2e 100644
 index 4a25ca5..ca33d2e 100644
 --- a/build/gulpfile.vscode.linux.js
 --- a/build/gulpfile.vscode.linux.js
@@ -70,7 +89,7 @@ index 61659d2..5cafa06 100644
 +Release:  el7
 +Release:  el7
  Summary:  Code editing. Redefined.
  Summary:  Code editing. Redefined.
 diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
 diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
-index 1ae8079..0dad6ac 100644
+index e07695c..55ccc32 100644
 --- a/src/vs/base/common/product.ts
 --- a/src/vs/base/common/product.ts
 +++ b/src/vs/base/common/product.ts
 +++ b/src/vs/base/common/product.ts
 @@ -34,2 +34,3 @@ export interface IProductConfiguration {
 @@ -34,2 +34,3 @@ export interface IProductConfiguration {
@@ -78,29 +97,28 @@ index 1ae8079..0dad6ac 100644
 +	readonly release: string;
 +	readonly release: string;
  	readonly date?: string;
  	readonly date?: string;
 diff --git a/src/vs/platform/diagnostics/node/diagnosticsService.ts b/src/vs/platform/diagnostics/node/diagnosticsService.ts
 diff --git a/src/vs/platform/diagnostics/node/diagnosticsService.ts b/src/vs/platform/diagnostics/node/diagnosticsService.ts
-index e1c60a3..a12d52c 100644
+index 66e35c8..087c055 100644
 --- a/src/vs/platform/diagnostics/node/diagnosticsService.ts
 --- a/src/vs/platform/diagnostics/node/diagnosticsService.ts
 +++ b/src/vs/platform/diagnostics/node/diagnosticsService.ts
 +++ b/src/vs/platform/diagnostics/node/diagnosticsService.ts
-@@ -239,3 +239,3 @@ export class DiagnosticsService implements IDiagnosticsService {
+@@ -238,3 +238,3 @@ export class DiagnosticsService implements IDiagnosticsService {
  		const output: string[] = [];
  		const output: string[] = [];
 -		output.push(`Version:          ${this.productService.nameShort} ${this.productService.version} (${this.productService.commit || 'Commit unknown'}, ${this.productService.date || 'Date unknown'})`);
 -		output.push(`Version:          ${this.productService.nameShort} ${this.productService.version} (${this.productService.commit || 'Commit unknown'}, ${this.productService.date || 'Date unknown'})`);
 +		output.push(`Version:          ${this.productService.nameShort} ${this.productService.version} ${this.productService.release || 'Release unknown'} (${this.productService.commit || 'Commit unknown'}, ${this.productService.date || 'Date unknown'})`);
 +		output.push(`Version:          ${this.productService.nameShort} ${this.productService.version} ${this.productService.release || 'Release unknown'} (${this.productService.commit || 'Commit unknown'}, ${this.productService.date || 'Date unknown'})`);
  		output.push(`OS Version:       ${osLib.type()} ${osLib.arch()} ${osLib.release()}`);
  		output.push(`OS Version:       ${osLib.type()} ${osLib.arch()} ${osLib.release()}`);
 diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
 diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
-index 7e63a16..74d1f26 100644
+index bceda01..4fe44e2 100644
 --- a/src/vs/platform/product/common/product.ts
 --- a/src/vs/platform/product/common/product.ts
 +++ b/src/vs/platform/product/common/product.ts
 +++ b/src/vs/platform/product/common/product.ts
-@@ -34,3 +34,3 @@ else if (typeof require?.__$__nodeRequire === 'function') {
- 	product = require.__$__nodeRequire(joinPath(rootPath, 'product.json').fsPath);
--	const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string };
-+	const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string, release: string };
+@@ -49,6 +49,7 @@ else if (typeof require?.__$__nodeRequire === 'function') {
+ 	if (!product.version) {
+-		const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string };
++		const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string, release: string };
  
  
-@@ -47,3 +47,4 @@ else if (typeof require?.__$__nodeRequire === 'function') {
- 	Object.assign(product, {
--		version: pkg.version
-+		version: pkg.version,
-+		release: pkg.release
- 	});
+ 		Object.assign(product, {
+-			version: pkg.version
++			version: pkg.version,
++			release: pkg.release
+ 		});
 diff --git a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
 diff --git a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
 index ec4ff95..36e882f 100644
 index ec4ff95..36e882f 100644
 --- a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
 --- a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts

+ 16 - 27
patches/custom-gallery.patch

@@ -1,13 +1,5 @@
-diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
-index 1ae8079..eb56045 100644
---- a/src/vs/base/common/product.ts
-+++ b/src/vs/base/common/product.ts
-@@ -72,2 +72,3 @@ export interface IProductConfiguration {
- 		readonly serviceUrl: string;
-+		readonly cacheUrl?: string;
- 		readonly itemUrl: string;
 diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
 diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
-index 7e63a16..3bfeab8 100644
+index bceda01..174c766 100644
 --- a/src/vs/platform/product/common/product.ts
 --- a/src/vs/platform/product/common/product.ts
 +++ b/src/vs/platform/product/common/product.ts
 +++ b/src/vs/platform/product/common/product.ts
 @@ -6,3 +6,3 @@
 @@ -6,3 +6,3 @@
@@ -19,8 +11,21 @@ index 7e63a16..3bfeab8 100644
  import { ISandboxConfiguration } from 'vs/base/parts/sandbox/common/sandboxTypes';
  import { ISandboxConfiguration } from 'vs/base/parts/sandbox/common/sandboxTypes';
 +import { getUserDataPath } from 'vs/platform/environment/node/userDataPath';
 +import { getUserDataPath } from 'vs/platform/environment/node/userDataPath';
  
  
-@@ -36,2 +37,28 @@ else if (typeof require?.__$__nodeRequire === 'function') {
+@@ -35,2 +36,41 @@ else if (typeof require?.__$__nodeRequire === 'function') {
  
  
++	// Set user-defined extension gallery
++	const { serviceUrl, searchUrl, itemUrl, controlUrl, recommendationsUrl } = product.extensionsGallery || {}
++
++	Object.assign(product, {
++		extensionsGallery: {
++			serviceUrl: env['VSCODE_GALLERY_SERVICE_URL'] || serviceUrl,
++			searchUrl: env['VSCODE_GALLERY_SEARCH_URL'] || searchUrl,
++			itemUrl: env['VSCODE_GALLERY_ITEM_URL'] || itemUrl,
++			controlUrl: env['VSCODE_GALLERY_CONTROL_URL'] || controlUrl,
++			recommendationsUrl: env['VSCODE_GALLERY_RECOMMENDATIONS_URL'] || recommendationsUrl
++		}
++	})
++
 +	// Merge user-customized product.json
 +	// Merge user-customized product.json
 +	try {
 +	try {
 +		const merge = (...objects: any[]) =>
 +		const merge = (...objects: any[]) =>
@@ -38,7 +43,7 @@ index 7e63a16..3bfeab8 100644
 +				return result;
 +				return result;
 +			}, {}) as any;
 +			}, {}) as any;
 +
 +
-+		const userDataPath = getUserDataPath({} as any);
++		const userDataPath = getUserDataPath({} as any, product.nameShort);
 +		const userProductPath = isWindows ? `file:///${userDataPath}/product.json` : `file://${userDataPath}/product.json`;
 +		const userProductPath = isWindows ? `file:///${userDataPath}/product.json` : `file://${userDataPath}/product.json`;
 +
 +
 +		const userProduct = require.__$__nodeRequire(FileAccess.asFileUri(userProductPath, require).fsPath);
 +		const userProduct = require.__$__nodeRequire(FileAccess.asFileUri(userProductPath, require).fsPath);
@@ -48,19 +53,3 @@ index 7e63a16..3bfeab8 100644
 +	}
 +	}
 +
 +
  	// Running out of sources
  	// Running out of sources
-@@ -46,2 +73,15 @@ else if (typeof require?.__$__nodeRequire === 'function') {
- 
-+	// Set user-defined extension gallery
-+	const { serviceUrl, cacheUrl, itemUrl, controlUrl, recommendationsUrl } = product.extensionsGallery || {}
-+
-+	Object.assign(product, {
-+		extensionsGallery: {
-+			serviceUrl: env['VSCODE_GALLERY_SERVICE_URL'] || serviceUrl,
-+			cacheUrl: env['VSCODE_GALLERY_CACHE_URL'] || cacheUrl,
-+			itemUrl: env['VSCODE_GALLERY_ITEM_URL'] || itemUrl,
-+			controlUrl: env['VSCODE_GALLERY_CONTROL_URL'] || controlUrl,
-+			recommendationsUrl: env['VSCODE_GALLERY_RECOMMENDATIONS_URL'] || recommendationsUrl
-+		}
-+	})
-+
- 	Object.assign(product, {

+ 4 - 4
patches/use-github-pat.patch

@@ -414,23 +414,23 @@ index 94ce542..d83e3c3 100644
 -
 -
  	private getServerUri(path: string = '') {
  	private getServerUri(path: string = '') {
 diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
 diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
-index fd4c88d..1524625 100644
+index bee1974..0f57882 100644
 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
 +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
 +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
-@@ -285,3 +285,3 @@ export class AccountsActivityActionViewItem extends MenuActivityActionViewItem {
+@@ -306,3 +306,3 @@ export class AccountsActivityActionViewItem extends MenuActivityActionViewItem {
  
  
 -		if (providers.length && !menus.length) {
 -		if (providers.length && !menus.length) {
 +		if (!menus.length) {
 +		if (!menus.length) {
  			const noAccountsAvailableAction = disposables.add(new Action('noAccountsAvailable', localize('noAccounts', "You are not signed in to any accounts"), undefined, false));
  			const noAccountsAvailableAction = disposables.add(new Action('noAccountsAvailable', localize('noAccounts', "You are not signed in to any accounts"), undefined, false));
 diff --git a/src/vs/workbench/services/authentication/browser/authenticationService.ts b/src/vs/workbench/services/authentication/browser/authenticationService.ts
 diff --git a/src/vs/workbench/services/authentication/browser/authenticationService.ts b/src/vs/workbench/services/authentication/browser/authenticationService.ts
-index 921cfbc..264ad7e 100644
+index 69cb0d2..920d6c6 100644
 --- a/src/vs/workbench/services/authentication/browser/authenticationService.ts
 --- a/src/vs/workbench/services/authentication/browser/authenticationService.ts
 +++ b/src/vs/workbench/services/authentication/browser/authenticationService.ts
 +++ b/src/vs/workbench/services/authentication/browser/authenticationService.ts
 @@ -275,12 +275,2 @@ export class AuthenticationService extends Disposable implements IAuthentication
 @@ -275,12 +275,2 @@ export class AuthenticationService extends Disposable implements IAuthentication
  		}
  		}
 -
 -
 -		if (!this._authenticationProviders.size) {
 -		if (!this._authenticationProviders.size) {
--			this._placeholderMenuItem = MenuRegistry.appendMenuItem(MenuId.AccountsContext, {
+-			placeholderMenuItem = MenuRegistry.appendMenuItem(MenuId.AccountsContext, {
 -				command: {
 -				command: {
 -					id: 'noAuthenticationProviders',
 -					id: 'noAuthenticationProviders',
 -					title: nls.localize('loading', "Loading..."),
 -					title: nls.localize('loading', "Loading..."),

+ 20 - 15
product.json

@@ -64,7 +64,6 @@
       "notebookContentProvider",
       "notebookContentProvider",
       "notebookEditor",
       "notebookEditor",
       "notebookLiveShare",
       "notebookLiveShare",
-      "notebookWorkspaceEdit",
       "terminalDimensions",
       "terminalDimensions",
       "terminalDataWriteEvent",
       "terminalDataWriteEvent",
       "textSearchProvider"
       "textSearchProvider"
@@ -82,11 +81,11 @@
     ],
     ],
     "ms-python.python": [
     "ms-python.python": [
       "quickPickSortByLabel",
       "quickPickSortByLabel",
-      "testObserver"
+      "testObserver",
+      "localization"
     ],
     ],
     "ms-dotnettools.dotnet-interactive-vscode": [
     "ms-dotnettools.dotnet-interactive-vscode": [
-      "notebookMessaging",
-      "notebookWorkspaceEdit"
+      "notebookMessaging"
     ],
     ],
     "GitHub.codespaces": [
     "GitHub.codespaces": [
       "contribEditSessions",
       "contribEditSessions",
@@ -96,12 +95,14 @@
       "resolvers",
       "resolvers",
       "tunnels",
       "tunnels",
       "terminalDataWriteEvent",
       "terminalDataWriteEvent",
-      "treeViewReveal"
+      "treeViewReveal",
+      "notebookKernelSource"
     ],
     ],
     "ms-vscode.azure-repos": [
     "ms-vscode.azure-repos": [
       "extensionRuntime",
       "extensionRuntime",
       "fileSearchProvider",
       "fileSearchProvider",
-      "textSearchProvider"
+      "textSearchProvider",
+      "localization"
     ],
     ],
     "ms-vscode.remote-repositories": [
     "ms-vscode.remote-repositories": [
       "contribEditSessions",
       "contribEditSessions",
@@ -119,7 +120,8 @@
       "scmSelectedProvider",
       "scmSelectedProvider",
       "scmValidation",
       "scmValidation",
       "textSearchProvider",
       "textSearchProvider",
-      "timeline"
+      "timeline",
+      "localization"
     ],
     ],
     "ms-vscode-remote.remote-wsl": [
     "ms-vscode-remote.remote-wsl": [
       "resolvers",
       "resolvers",
@@ -162,8 +164,10 @@
     "GitHub.vscode-pull-request-github": [
     "GitHub.vscode-pull-request-github": [
       "tokenInformation",
       "tokenInformation",
       "commentsResolvedState",
       "commentsResolvedState",
-      "badges",
-      "contribViewSize"
+      "contribShareMenu",
+      "contribCommentPeekContext",
+      "treeItemCheckbox",
+      "localization"
     ],
     ],
     "GitHub.copilot": [
     "GitHub.copilot": [
       "inlineCompletionsNew",
       "inlineCompletionsNew",
@@ -186,7 +190,8 @@
       "scmSelectedProvider",
       "scmSelectedProvider",
       "scmValidation",
       "scmValidation",
       "textSearchProvider",
       "textSearchProvider",
-      "timeline"
+      "timeline",
+      "localization"
     ],
     ],
     "ms-python.gather": [
     "ms-python.gather": [
       "notebookCellExecutionState"
       "notebookCellExecutionState"
@@ -198,7 +203,6 @@
       "notebookControllerKind",
       "notebookControllerKind",
       "notebookDebugOptions",
       "notebookDebugOptions",
       "notebookDeprecated",
       "notebookDeprecated",
-      "notebookWorkspaceEdit",
       "notebookMessaging",
       "notebookMessaging",
       "notebookMime",
       "notebookMime",
       "notebookCellExecutionState",
       "notebookCellExecutionState",
@@ -207,11 +211,9 @@
       "notebookKernelSource",
       "notebookKernelSource",
       "interactiveWindow"
       "interactiveWindow"
     ],
     ],
-    "ms-toolsai.vscode-jupyter-powertoys": [
-      "notebookWorkspaceEdit"
-    ],
     "dbaeumer.vscode-eslint": [
     "dbaeumer.vscode-eslint": [
-      "notebookCellExecutionState"
+      "notebookCellExecutionState",
+      "localization"
     ],
     ],
     "ms-vscode.azure-sphere-tools-ui": [
     "ms-vscode.azure-sphere-tools-ui": [
       "resolvers",
       "resolvers",
@@ -225,6 +227,9 @@
     ],
     ],
     "ms-vscode.cpptools": [
     "ms-vscode.cpptools": [
       "terminalDataWriteEvent"
       "terminalDataWriteEvent"
+    ],
+    "ms-vscode.vscode-github-issue-notebooks": [
+      "localization"
     ]
     ]
   },
   },
   "extensionKind": {
   "extensionKind": {