Add command for switching to a given channel
[?]
Jan 5, 2021, 2:54 AM
LL5PNIABADMCIKL7OKCQM7AIQFK363TYWU65FSVM22YAV73FWROACDependencies
- [2]
VT237HUJAdd tree view for channels - [3]
64J6B76FAdd command to rename channels - [4]
J6DDODYYUpdate views to refresh with the rest of the repository state - [5]
GNQD74OZAdd pijul.openChange command and text document provider for pijul-change scheme - [6]
5ISTB4TWAdd commands to copy the hash and message of changes in the log - [*]
B4SKYP3YAdd repository model and add steps to initialize it - [*]
ZGMIJNFVCreate pijul.ts for executing commands using the Pijul CLI - [*]
ILH3GIVTAdd command centre and refresh/init commands - [*]
NCBEWRYEInitialize Repository
Change contents
- replacement in src/views/channels.ts at line 28
contextValue: 'pijulChannel'// Different context menu options for current and inactive channelscontextValue: 'pijulChannel' + (element.isCurrent ? 'Current' : '') - edit in src/repository.ts at line 280
}/*** Switch to the given channel from the current channel* @param targetChannel The channel that will be switched to*/async switchChannel (targetChannel: PijulChannel): Promise<void> {this.repository.switchChannel(targetChannel); - edit in src/pijul.ts at line 325
}/*** Switch to the given channel from the current channel* @param targetChannel The channel that will be switched to*/async switchChannel (channel: PijulChannel): Promise<void> {await this._pijul.exec(this.repositoryRoot, ['channel', 'switch', channel.name]); - edit in src/commands.ts at line 275
await repository.refreshStatus();}/*** Switch to a different channel* @param repository The repository that contains the channels*/@command('pijul.switchChannel', { repository: true })async switchChannel (repository: Repository, targetChannel: PijulChannel): Promise<void> {if (targetChannel.isCurrent) {throw new Error('Attempting to switch to current channel, this should be impossible');}await repository.switchChannel(targetChannel); - edit in package.json at line 109
"category": "Pijul"},{"command": "pijul.switchChannel","title": "Switch to Channel", - edit in package.json at line 290
"command": "pijul.switchChannel","when": "view == pijul.views.channels && viewItem == pijulChannel"},{ - replacement in package.json at line 295
"when": "view == pijul.views.channels && viewItem == pijulChannel""when": "view == pijul.views.channels && viewItem == pijulChannel || viewItem == pijulChannelCurrent"