add comparing push operations
Dependencies
- [2]
OKOH6H2Fadd push and pull commands - [3]
L44OILGKAdd reset command to resource state context menu - [4]
H3GAPFUCAdd pijul.recordAll command - [5]
5ISTB4TWAdd commands to copy the hash and message of changes in the log - [6]
XVYOJLZ4add Delete Remote command - [7]
GPTHUH3NAdd commands for unrecording changes - [8]
7DXA53YQAdd command to delete channel - [9]
MGRAFWDZAdd commands for applying changes to channels - [10]
HVVRC2GNAdd command to apply all outstanding changes from one channel to another - [11]
GNQD74OZAdd pijul.openChange command and text document provider for pijul-change scheme - [12]
5ZDRHVXDAdd command to fork a new channel - [13]
64J6B76FAdd command to rename channels - [14]
LL5PNIABAdd command for switching to a given channel - [*]
B4SKYP3YAdd repository model and add steps to initialize it - [*]
ILH3GIVTAdd command centre and refresh/init commands - [*]
NCBEWRYEInitialize Repository
Change contents
- replacement in src/repository.ts at line 197
* Prompt the user to choose a remote* Prompt the user to choose a channel - replacement in src/repository.ts at line 199
private async chooseChannel (placeHolder?: string): Promise<string | undefined> {private async chooseChannel (placeHolder: string): Promise<string | undefined> { - replacement in src/repository.ts at line 202
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;}}}); - replacement in src/repository.ts at line 234
// TODO: Show more channel information with QuickPickOptionchannelName = await this.chooseChannel();channelName = await this.chooseChannel('Channel Name'); - replacement in src/repository.ts at line 333
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'); - replacement in src/repository.ts at line 365
channelName = await window.showInputBox({placeHolder: 'Channel Name',prompt: 'Please enter a name for the new Channel',ignoreFocusOut: true});channelName = await this.chooseChannelName('Please enter a name for the new Channel', 'Channel Name'); - edit in src/repository.ts at line 406
if (!targetRemote) { return; } - replacement in src/repository.ts at line 420
if (targetRemote) {await this.repository.pull(targetRemote, from, to);}await this.repository.pull(targetRemote, from, to); - edit in src/repository.ts at line 430
if (!targetRemote) { return; } - edit in src/repository.ts at line 442
}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; } - replacement in src/repository.ts at line 457
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; } - edit in src/repository.ts at line 513
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); - edit in src/commands.ts at line 446
}/*** 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); - edit in package.json at line 209
"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 ...", - edit in package.json at line 231
"command": "pijul.compareToAndPushFromTo2","title": "Compare to and push from ... to ...","category": "Pijul","icon": "$(repo-push)"},{ - replacement in package.json at line 638
"command": "pijul.pull","command": "pijul.compareToAndPushTo", - replacement in package.json at line 643
"command": "pijul.pullFrom","command": "pijul.compareToCurrentAndPushTo", - replacement in package.json at line 648
"command": "pijul.pullTo","command": "pijul.compareToAndPushFromTo", - replacement in package.json at line 653
"command": "pijul.pullFromTo","command": "pijul.compareToAndPushFromTo2", - edit in package.json at line 656
},{"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"