From f506d66c498e04899749af4fbf6b7e8b74b6f848 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 2 Jul 2019 10:31:04 +0200 Subject: [PATCH 1/9] fixes #76264 --- src/vs/workbench/contrib/files/browser/fileActions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/files/browser/fileActions.ts b/src/vs/workbench/contrib/files/browser/fileActions.ts index 1fd4fba81b1..4d7115afb8b 100644 --- a/src/vs/workbench/contrib/files/browser/fileActions.ts +++ b/src/vs/workbench/contrib/files/browser/fileActions.ts @@ -1047,12 +1047,12 @@ export const pasteFileHandler = async (accessor: ServicesAccessor) => { // Cut is done. Make sure to clear cut state. explorerService.setToCopy([], false); } - if (stats.length === 1) { + if (stats.length >= 1) { const stat = stats[0]; + if (stat && !stat.isDirectory && stats.length === 1) { + await editorService.openEditor({ resource: stat.resource, options: { pinned: true, preserveFocus: true } }); + } if (stat) { - if (!stat.isDirectory) { - await editorService.openEditor({ resource: stat.resource, options: { pinned: true, preserveFocus: true } }); - } await explorerService.select(stat.resource); } } From 675a30a14ac1c0d20abdaf092ac4c8aaad502303 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 2 Jul 2019 10:50:38 +0200 Subject: [PATCH 2/9] build - switch schedule to cron syntax --- build/azure-pipelines/product-build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines/product-build.yml b/build/azure-pipelines/product-build.yml index 6ef418e21e9..4a1895327af 100644 --- a/build/azure-pipelines/product-build.yml +++ b/build/azure-pipelines/product-build.yml @@ -112,4 +112,11 @@ jobs: - LinuxAlpine - macOS steps: - - template: sync-mooncake.yml \ No newline at end of file + - template: sync-mooncake.yml + +schedules: +- cron: "0 6 * * Mon-Fri" + displayName: Mon through Fri at 6:00 + branches: + include: + - master \ No newline at end of file From 7694303571d28e423a8016fef5cd57dde4dfb95a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 2 Jul 2019 10:51:24 +0200 Subject: [PATCH 3/9] :lipstick: --- build/azure-pipelines/product-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines/product-build.yml b/build/azure-pipelines/product-build.yml index 4a1895327af..85903906f12 100644 --- a/build/azure-pipelines/product-build.yml +++ b/build/azure-pipelines/product-build.yml @@ -116,7 +116,7 @@ jobs: schedules: - cron: "0 6 * * Mon-Fri" - displayName: Mon through Fri at 6:00 + displayName: Mon-Fri at 6:00 branches: include: - master \ No newline at end of file From 8af1b9fe1b0b10e5b19c8e6f174b6a99634e6144 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Tue, 2 Jul 2019 11:07:48 +0200 Subject: [PATCH 4/9] '.' bug in file picker Fixes #76426 --- .../services/dialogs/browser/remoteFileDialog.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/services/dialogs/browser/remoteFileDialog.ts b/src/vs/workbench/services/dialogs/browser/remoteFileDialog.ts index 0ae7ef8a596..6e892d18f95 100644 --- a/src/vs/workbench/services/dialogs/browser/remoteFileDialog.ts +++ b/src/vs/workbench/services/dialogs/browser/remoteFileDialog.ts @@ -388,7 +388,11 @@ export class RemoteFileDialog { const relativePath = resources.relativePath(currentDisplayUri, directUri); const isSameRoot = (this.filePickBox.value.length > 1 && currentPath.length > 1) ? equalsIgnoreCase(this.filePickBox.value.substr(0, 2), currentPath.substr(0, 2)) : false; if (relativePath && isSameRoot) { - const path = resources.joinPath(this.currentFolder, relativePath); + let path = resources.joinPath(this.currentFolder, relativePath); + const directBasename = resources.basename(directUri); + if ((directBasename === '.') || (directBasename === '..')) { + path = this.remoteUriFrom(this.pathAppend(path, directBasename)); + } return resources.hasTrailingPathSeparator(directUri) ? resources.addTrailingPathSeparator(path) : path; } else { return directUri; @@ -479,7 +483,7 @@ export class RemoteFileDialog { } catch (e) { // do nothing } - if (statWithoutTrailing && statWithoutTrailing.isDirectory && (resources.basename(valueUri) !== '.')) { + if (statWithoutTrailing && statWithoutTrailing.isDirectory) { await this.updateItems(inputUriDirname, false, resources.basename(valueUri)); this.badPath = undefined; return UpdateResult.Updated; @@ -689,7 +693,7 @@ export class RemoteFileDialog { this.busy = true; this.userEnteredPathSegment = trailing ? trailing : ''; this.autoCompletePathSegment = ''; - const newValue = trailing ? this.pathFromUri(resources.joinPath(newFolder, trailing)) : this.pathFromUri(newFolder, true); + const newValue = trailing ? this.pathAppend(newFolder, trailing) : this.pathFromUri(newFolder, true); this.currentFolder = resources.addTrailingPathSeparator(newFolder, this.separator); return this.createItems(this.currentFolder).then(items => { this.filePickBox.items = items; @@ -728,7 +732,7 @@ export class RemoteFileDialog { private pathAppend(uri: URI, additional: string): string { if ((additional === '..') || (additional === '.')) { const basePath = this.pathFromUri(uri); - return basePath + (this.endsWithSlash(basePath) ? '' : this.separator) + additional; + return basePath + this.separator + additional; } else { return this.pathFromUri(resources.joinPath(uri, additional)); } From f91bd1869c47bd574a50066e47f82ce7ef2c6ffc Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 2 Jul 2019 11:14:26 +0200 Subject: [PATCH 5/9] distro build: push release branches --- build/azure-pipelines/distro-build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines/distro-build.yml b/build/azure-pipelines/distro-build.yml index 639456ad4ce..ab8a5e778c8 100644 --- a/build/azure-pipelines/distro-build.yml +++ b/build/azure-pipelines/distro-build.yml @@ -30,7 +30,13 @@ steps: git remote add distro "https://github.com/$VSCODE_MIXIN_REPO.git" git fetch distro - git push distro origin/master:refs/heads/master + + # Push master branch into master and oss/master + git push distro origin/master:refs/heads/master origin/master:refs/heads/oss/master + + # Push every release branch into oss/release + git for-each-ref --format="%(refname:short)" refs/remotes/origin/release/* | sed 's/^origin\/\(.*\)$/\0:refs\/heads\/oss\/\1/' | xargs git push + git merge $(node -p "require('./package.json').distro") displayName: Sync & Merge Distro \ No newline at end of file From b57a00bd28bee23a982c50f36ea528c56aaffd00 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 2 Jul 2019 11:17:40 +0200 Subject: [PATCH 6/9] debug: Handle disposable result of createAndFillInActionBarActions #76419 --- .../contrib/debug/browser/debugToolBar.ts | 21 +++++++++++++++---- .../contrib/debug/browser/debugViewlet.ts | 10 ++++++++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/debug/browser/debugToolBar.ts b/src/vs/workbench/contrib/debug/browser/debugToolBar.ts index 678ff1bad19..56fda384f0d 100644 --- a/src/vs/workbench/contrib/debug/browser/debugToolBar.ts +++ b/src/vs/workbench/contrib/debug/browser/debugToolBar.ts @@ -31,6 +31,7 @@ import { createAndFillInActionBarActions, MenuEntryActionViewItem } from 'vs/pla import { IMenu, IMenuService, MenuId, MenuItemAction } from 'vs/platform/actions/common/actions'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { FocusSessionAction } from 'vs/workbench/contrib/debug/browser/debugActions'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; const DEBUG_TOOLBAR_POSITION_KEY = 'debug.actionswidgetposition'; const DEBUG_TOOLBAR_Y_KEY = 'debug.actionswidgety'; @@ -54,6 +55,7 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution { private activeActions: IAction[]; private updateScheduler: RunOnceScheduler; private debugToolBarMenu: IMenu; + private disposeOnUpdate: IDisposable; private isVisible: boolean; private isBuilt: boolean; @@ -105,12 +107,17 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution { return this.hide(); } - const actions = DebugToolBar.getActions(this.debugToolBarMenu, this.debugService, this.instantiationService); + const { actions, disposable } = DebugToolBar.getActions(this.debugToolBarMenu, this.debugService, this.instantiationService); if (!arrays.equals(actions, this.activeActions, (first, second) => first.id === second.id)) { this.actionBar.clear(); this.actionBar.push(actions, { icon: true, label: false }); this.activeActions = actions; } + if (this.disposeOnUpdate) { + dispose(this.disposeOnUpdate); + } + this.disposeOnUpdate = disposable; + this.show(); }, 20)); @@ -257,14 +264,17 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution { dom.hide(this.$el); } - public static getActions(menu: IMenu, debugService: IDebugService, instantiationService: IInstantiationService): IAction[] { + public static getActions(menu: IMenu, debugService: IDebugService, instantiationService: IInstantiationService): { actions: IAction[], disposable: IDisposable } { const actions: IAction[] = []; - createAndFillInActionBarActions(menu, undefined, actions, () => false); + const disposable = createAndFillInActionBarActions(menu, undefined, actions, () => false); if (debugService.getViewModel().isMultiSessionView()) { actions.push(instantiationService.createInstance(FocusSessionAction, FocusSessionAction.ID, FocusSessionAction.LABEL)); } - return actions.filter(a => !(a instanceof Separator)); // do not render separators for now + return { + actions: actions.filter(a => !(a instanceof Separator)), // do not render separators for now + disposable + }; } public dispose(): void { @@ -274,5 +284,8 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution { this.$el.remove(); delete this.$el; } + if (this.disposeOnUpdate) { + dispose(this.disposeOnUpdate); + } } } diff --git a/src/vs/workbench/contrib/debug/browser/debugViewlet.ts b/src/vs/workbench/contrib/debug/browser/debugViewlet.ts index 09f06f523ce..c4bf84c04a0 100644 --- a/src/vs/workbench/contrib/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/contrib/debug/browser/debugViewlet.ts @@ -41,6 +41,7 @@ export class DebugViewlet extends ViewContainerViewlet { private breakpointView: ViewletPanel; private panelListeners = new Map(); private debugToolBarMenu: IMenu; + private disposeOnTitleUpdate: IDisposable; constructor( @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService, @@ -114,7 +115,14 @@ export class DebugViewlet extends ViewContainerViewlet { this.debugToolBarMenu = this.menuService.createMenu(MenuId.DebugToolBar, this.contextKeyService); this._register(this.debugToolBarMenu); } - return DebugToolBar.getActions(this.debugToolBarMenu, this.debugService, this.instantiationService); + + const { actions, disposable } = DebugToolBar.getActions(this.debugToolBarMenu, this.debugService, this.instantiationService); + if (this.disposeOnTitleUpdate) { + dispose(this.disposeOnTitleUpdate); + } + this.disposeOnTitleUpdate = disposable; + + return actions; } get showInitialDebugActions(): boolean { From e79052776a2ce184762ed0b4280370ea02155b3d Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 2 Jul 2019 11:19:21 +0200 Subject: [PATCH 7/9] fix distro build --- build/azure-pipelines/distro-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-pipelines/distro-build.yml b/build/azure-pipelines/distro-build.yml index ab8a5e778c8..4057894f025 100644 --- a/build/azure-pipelines/distro-build.yml +++ b/build/azure-pipelines/distro-build.yml @@ -35,7 +35,7 @@ steps: git push distro origin/master:refs/heads/master origin/master:refs/heads/oss/master # Push every release branch into oss/release - git for-each-ref --format="%(refname:short)" refs/remotes/origin/release/* | sed 's/^origin\/\(.*\)$/\0:refs\/heads\/oss\/\1/' | xargs git push + git for-each-ref --format="%(refname:short)" refs/remotes/origin/release/* | sed 's/^origin\/\(.*\)$/\0:refs\/heads\/oss\/\1/' | xargs git push distro git merge $(node -p "require('./package.json').distro") From 5967934c55a32b1aaab273e232a5688df225288f Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 2 Jul 2019 11:23:37 +0200 Subject: [PATCH 8/9] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ecf3e2f1958..c52ce057f89 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-oss-dev", "version": "1.37.0", - "distro": "2b36463d246567c8e51d136b5868513a8c866886", + "distro": "f737a181ef604c1b4f43a4c233607c986878bb20", "author": { "name": "Microsoft Corporation" }, From ca44b6c61809eceef9acbe937a465a06067e7670 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 2 Jul 2019 11:47:07 +0200 Subject: [PATCH 9/9] bring back close --- src/vs/workbench/contrib/comments/browser/media/close.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/vs/workbench/contrib/comments/browser/media/close.svg diff --git a/src/vs/workbench/contrib/comments/browser/media/close.svg b/src/vs/workbench/contrib/comments/browser/media/close.svg new file mode 100644 index 00000000000..751e89b3b02 --- /dev/null +++ b/src/vs/workbench/contrib/comments/browser/media/close.svg @@ -0,0 +1 @@ + \ No newline at end of file