Add command to fork a new channel

[?]
Jan 5, 2021, 10:16 PM
5ZDRHVXDP5DP5E2RXRPQX4VAKVHGA5MVFYUPI2D42BAWWUGIRZNAC

Dependencies

  • [2] 7DXA53YQ Add command to delete channel
  • [*] B4SKYP3Y Add repository model and add steps to initialize it
  • [*] 64J6B76F Add command to rename channels
  • [*] ZGMIJNFV Create pijul.ts for executing commands using the Pijul CLI
  • [*] ILH3GIVT Add command centre and refresh/init commands
  • [*] NCBEWRYE Initialize Repository
  • [*] 6H4B4UJQ Add commands to open repo and global pijul configuration files
  • [*] L3VOQYAF Add changelog view to the source control panel
  • [*] GNQD74OZ Add pijul.openChange command and text document provider for pijul-change scheme

Change contents

  • edit in src/repository.ts at line 296
    [2.217]
    [5.752]
    }
    /**
    * Fork a new channel from the current one
    * @param channelName The name of the new channel
    */
    async forkChannel (channelName?: string): Promise<void> {
    if (!channelName) {
    channelName = await window.showInputBox({
    placeHolder: 'Channel Name',
    prompt: 'Please enter a name for the new Channel',
    ignoreFocusOut: true
    });
    }
    if (channelName) {
    await this.repository.forkChannel(channelName);
    } else {
    window.showErrorMessage('Channel was not forked, no name was provided');
    }
  • edit in src/pijul.ts at line 373
    [2.459]
    [5.1095]
    }
    /**
    * Fork a new channel from the current one
    * @param channelName The name of the new channel
    */
    async forkChannel (channelName: string): Promise<void> {
    await this._pijul.exec(this.repositoryRoot, ['fork', channelName]);
  • edit in src/commands.ts at line 303
    [2.903]
    [5.1459]
    await repository.refreshStatus();
    }
    /**
    * Fork a new channel from the current one
    * @param repository The repository that contains the channel
    */
    @command('pijul.forkChannel', { repository: true })
    async forkChannel (repository: Repository): Promise<void> {
    await repository.forkChannel();
  • edit in package.json at line 122
    [2.1008]
    [9.1175]
    "command": "pijul.forkChannel",
    "title": "Fork a new Channel",
    "category": "Pijul",
    "icon": "$(git-branch-create)"
    },
    {
  • edit in package.json at line 284
    [10.2688]
    [11.1794]
    ],
    "view/title" : [
    {
    "command": "pijul.forkChannel",
    "when": "view == pijul.views.channels",
    "group": "navigation"
    },
    {
    "command": "pijul.forkChannel",
    "when": "view == pijul.views.channels",
    "group": "first"
    }