Add commands for applying changes to channels
[?]
Jan 11, 2021, 1:36 AM
MGRAFWDZTJ6ODMSPYNX4YLJ5JLQGN535AVTX3F6GFS54IHMEZ2EQCDependencies
- [2]
LL5PNIABAdd command for switching to a given channel - [3]
GPTHUH3NAdd commands for unrecording changes - [*]
B4SKYP3YAdd repository model and add steps to initialize it - [*]
H3GAPFUCAdd pijul.recordAll command - [*]
ZGMIJNFVCreate pijul.ts for executing commands using the Pijul CLI - [*]
YDCLFNEJAdd menu command for recording changes to specific files - [*]
ILH3GIVTAdd command centre and refresh/init commands - [*]
5ISTB4TWAdd commands to copy the hash and message of changes in the log - [*]
64J6B76FAdd command to rename channels - [*]
NCBEWRYEInitialize Repository
Change contents
- edit in src/repository.ts at line 193
* Apply a change to a given channel* @param change The change to apply to a channel* @param channelName The name of the channel the change will be applied to*/async applyChange (change: PijulChange, channelName?: string): Promise<void> {if (!channelName) {// TODO: Show more channel information with QuickPickOptionchannelName = await window.showQuickPick((await this.repository.getChannels()).map(c => c.name), { placeHolder: 'Channel Name', ignoreFocusOut: true });}this.repository.applyChange(change, channelName);}/*** Apply a change to the current channel* @param change The change to apply*/async applyChangeToCurrentChannel (change: PijulChange): Promise<void> {this.repository.applyChange(change);}/** - edit in src/pijul.ts at line 320
* Apply a change to a given channel or the current channel if no channel name is provided* @param change The change to apply to a channel* @param channelName The name of the channel the change will be applied to*/async applyChange (change: PijulChange, channelName?: string): Promise<void> {const additionalArgs: string[] = [];if (channelName) {additionalArgs.push('--channel', channelName);}await this._pijul.exec(this.repositoryRoot, ['apply', change.hash, ...additionalArgs]);}/** - edit in src/commands.ts at line 289
}/*** Apply a change to a channel* @param change The change to apply to a channel*/@command('pijul.applyChange', { repository: true })async applyChange (repository: Repository, change: PijulChange): Promise<void> {repository.applyChange(change); - edit in src/commands.ts at line 301
* Apply a change to the current channel* @param change The change to apply*/@command('pijul.applyChangeToCurrentChannel', { repository: true })async applyChangeToCurrentChannel (repository: Repository, change: PijulChange): Promise<void> {repository.applyChangeToCurrentChannel(change);}/** - edit in package.json at line 99
"category": "Pijul"},{"command": "pijul.applyChange","title": "Apply Change to Channel...","category": "Pijul"},{"command": "pijul.applyChangeToCurrentChannel","title": "Apply Change to Current Channel", - edit in package.json at line 342
},{"command": "pijul.applyChange","when": "viewItem == pijulChange","group": "changeFourth" - edit in package.json at line 349
"command": "pijul.applyChangeToCurrentChannel","when": "view == pijul.views.channels && viewItem == pijulChange","group": "changeFourth"},{