PT4BQ3EA66QQOSTYW3WQRIOMYXEBZPDUPYEF25KVG7ITGRV5CBTQC OKOH6H2FW3PK6Q2Y5CO7TRCRH2JZS6EIBKLIZO5OZAS3MFHJKRLQC B4SKYP3Y5R7UPPGLLZV7OK3SIN4TRAJ3IL6FS3T7ZFZF5HTEQARQC H3GAPFUC4TCMSLC3O4LUNQNHRANRNVIOQJRTZT4XQ3AUXFHTW4CAC MGRAFWDZTJ6ODMSPYNX4YLJ5JLQGN535AVTX3F6GFS54IHMEZ2EQC 64J6B76FTOAIPF2HGPIQYU523COLWHN7QOVC3XY42PHKC3GCLMZAC 5ZDRHVXDP5DP5E2RXRPQX4VAKVHGA5MVFYUPI2D42BAWWUGIRZNAC XVYOJLZ4GYPFZFVBTTR7U3HXG5KBDBD5VQAW64GA6V32O2VP2H4AC HVVRC2GNC3D5PULNDL5XSPOQVJS2QWVU7GDGYSWLNYTK73UPYMHQC ILH3GIVTVMKSU5TH5ZZSPB3URX622JA2BNBOO6K7ZTF4ISYDTJLAC NCBEWRYEEJMJO37SHY7XCNFZYWLT5HUHCKN47UGSEY3FFWFX6QFQC return await window.showQuickPick(items, { placeHolder: placeHolder ?? 'Channel Name', ignoreFocusOut: true });
return await window.showQuickPick(items, {placeHolder: placeHolder,ignoreFocusOut: true});}/*** Prompt the user to choose a channel name*/private async chooseChannelName (prompt: string, placeHolder: string): Promise<string | undefined> {// TODO: Show more channel information with QuickPickOptionreturn await window.showInputBox({placeHolder: placeHolder,prompt,ignoreFocusOut: true,validateInput: name => {if (name.includes(':')) {return 'Channel name may not contain a colon';} else {return undefined;}}});
newName = await window.showInputBox({placeHolder: 'Channel Name',prompt: 'Please enter the new name for channel ' + channel.name,ignoreFocusOut: true});
newName = await this.chooseChannelName('Please enter the new name for channel ' + channel.name, 'Channel Name');
}await this.repository.push(targetRemote, from, to);}/*** Push changes to a remote comparing to a channel* @param targetRemote The remote that will be pushed to*/async compareToAndPushTo (targetRemote?: PijulRemote): Promise<void> {if (!targetRemote) {targetRemote = await this.chooseRemote();if (!targetRemote) { return; }
if (targetRemote) {await this.repository.push(targetRemote, from, to);
const comparison = await this.chooseChannel('Comparison Channel');if (comparison === undefined) { return; }const to = await this.chooseChannelName('Please enter the name of the channel to push to', 'To Channel');if (to === undefined) { return; }await this.repository.push(targetRemote, undefined, comparison + ':' + to);}/*** Push changes to a remote comparing to a channel* @param targetRemote The remote that will be pushed to*/async compareToCurrentAndPushTo (targetRemote?: PijulRemote): Promise<void> {if (!targetRemote) {targetRemote = await this.chooseRemote();if (!targetRemote) { return; }}const to = await this.chooseChannelName('Please enter the name of the channel to push to', 'To Channel');if (to === undefined) { return; }await this.repository.push(targetRemote, undefined, ':' + to);}/*** Push changes to a remote comparing to a channel* @param targetRemote The remote that will be pushed to*/async compareToAndPushFromTo (targetRemote?: PijulRemote): Promise<void> {if (!targetRemote) {targetRemote = await this.chooseRemote();if (!targetRemote) { return; }}const comparison = await this.chooseChannel('Comparison Channel');if (comparison === undefined) { return; }const from = await this.chooseChannel('From Channel');if (from === undefined) { return; }const to = await this.chooseChannelName('Please enter the name of the channel to push to', 'To Channel');if (to === undefined) { return; }await this.repository.push(targetRemote, from, comparison + ':' + to);}/*** Push changes to a remote comparing to a channel* @param targetRemote The remote that will be pushed to*/async compareToAndPushFromTo2 (targetRemote?: PijulRemote): Promise<void> {if (!targetRemote) {targetRemote = await this.chooseRemote();if (!targetRemote) { return; }
const from = await this.chooseChannel('From Channel');if (from === undefined) { return; }const to = await this.chooseChannelName('Please enter the name of the channel to push to', 'To Channel');if (to === undefined) { return; }await this.repository.push(targetRemote, from, ':' + to);
}/*** Push changes* @param repository The repository that contains the remote* @param targetRemote The remote to be pushed to*/@command('pijul.compareToAndPushTo', { repository: true })async compareToAndPushTo (repository: Repository, targetRemote?: PijulRemote): Promise<void> {await repository.compareToAndPushTo(targetRemote);}/*** Push changes from a channel* @param repository The repository that contains the remote* @param targetRemote The remote to be pushed to*/@command('pijul.compareToCurrentAndPushTo', { repository: true })async compareToCurrentAndPushTo (repository: Repository, targetRemote?: PijulRemote): Promise<void> {await repository.compareToCurrentAndPushTo(targetRemote);}/*** Push changes to a channel* @param repository The repository that contains the remote* @param targetRemote The remote to be pushed to*/@command('pijul.compareToAndPushFromTo', { repository: true })async compareToAndPushFromTo (repository: Repository, targetRemote?: PijulRemote): Promise<void> {await repository.compareToAndPushFromTo(targetRemote);}/*** Push changes from a channel to another channel* @param repository The repository that contains the remote* @param targetRemote The remote to be pushed to*/@command('pijul.compareToAndPushFromTo2', { repository: true })async compareToAndPushFromTo2 (repository: Repository, targetRemote?: PijulRemote): Promise<void> {await repository.compareToAndPushFromTo2(targetRemote);
"category": "Pijul","icon": "$(repo-push)"},{"command": "pijul.compareToAndPushTo","title": "Compare to ... and push to ...","category": "Pijul","icon": "$(repo-push)"},{"command": "pijul.compareToCurrentAndPushTo","title": "Compare to current and push to ...","category": "Pijul","icon": "$(repo-push)"},{"command": "pijul.compareToAndPushFromTo","title": "Compare to ... and push from ... to ...",
},{"command": "pijul.pull","when": "view == pijul.views.remotes && viewItem == pijulRemote","group": "changeFirst@9"},{"command": "pijul.pullFrom","when": "view == pijul.views.remotes && viewItem == pijulRemote","group": "changeFirst@10"},{"command": "pijul.pullTo","when": "view == pijul.views.remotes && viewItem == pijulRemote","group": "changeFirst@11"},{"command": "pijul.pullFromTo","when": "view == pijul.views.remotes && viewItem == pijulRemote","group": "changeFirst@12"