Add command to rename channels
[?]
Jan 5, 2021, 2:39 AM
64J6B76FTOAIPF2HGPIQYU523COLWHN7QOVC3XY42PHKC3GCLMZACDependencies
- [2]
5ISTB4TWAdd commands to copy the hash and message of changes in the log - [3]
WHQQV5QQAdd watcher to refresh on file system changes - [4]
GNQD74OZAdd pijul.openChange command and text document provider for pijul-change scheme - [5]
B4SKYP3YAdd repository model and add steps to initialize it - [6]
ILH3GIVTAdd command centre and refresh/init commands - [7]
BIEL6Z5JUpdate resource groups to use custom interface - [8]
6H4B4UJQAdd commands to open repo and global pijul configuration files - [9]
L44OILGKAdd reset command to resource state context menu - [10]
6ONRFFRGFirst pass of file decorations - [11]
MU6ZNUYZIntegrate recordAll command with input box - [*]
ZGMIJNFVCreate pijul.ts for executing commands using the Pijul CLI - [*]
L3VOQYAFAdd changelog view to the source control panel - [*]
NCBEWRYEInitialize Repository
Change contents
- replacement in src/repository.ts at line 3[3.134]→[3.122:178](∅→∅),[3.57]→[3.122:178](∅→∅),[3.148]→[3.122:178](∅→∅),[3.113]→[3.122:178](∅→∅),[3.122]→[3.122:178](∅→∅)
import { Repository as BaseRepository } from './pijul';import { PijulChannel, Repository as BaseRepository } from './pijul'; - edit in src/repository.ts at line 262
* Rename a channel. If a new name is not provided, the user will be prompted for one* @param channel The channel to rename* @param newName The new name that will be given to the channel*/async renameChannel (channel: PijulChannel, newName?: string): Promise<void> {if (!newName) {newName = await window.showInputBox({placeHolder: 'Channel Name',prompt: 'Please enter the new name for channel ' + channel.name,ignoreFocusOut: true});}if (newName) {this.repository.renameChannel(channel, newName);} else {window.showErrorMessage('Channel was not renamed, no new name was provided');}}/** - edit in src/pijul.ts at line 319
* Rename a channel in the repository.* @param channel The channel to rename* @param newName The new name that will be given to the channel*/async renameChannel (channel: PijulChannel, newName: string): Promise<void> {await this._pijul.exec(this.repositoryRoot, ['channel', 'rename', channel.name, newName]);}/** - replacement in src/commands.ts at line 4
import { Pijul, PijulChange } from './pijul';import { Pijul, PijulChange, PijulChannel } from './pijul'; - edit in src/commands.ts at line 266
}/*** Rename a channel* @param repository The repository that contains the channel*/@command('pijul.renameChannel', { repository: true })async renameChannel (repository: Repository, channel: PijulChannel): Promise<void> {await repository.renameChannel(channel);await repository.refreshStatus(); - edit in package.json at line 107
"command": "pijul.renameChannel","title": "Rename Channel","category": "Pijul"},{ - edit in package.json at line 283
},{"command": "pijul.renameChannel","when": "view == pijul.views.channels && viewItem == pijulChannel"