Add pijul.recordAll command

[?]
Dec 27, 2020, 10:10 PM
H3GAPFUC4TCMSLC3O4LUNQNHRANRNVIOQJRTZT4XQ3AUXFHTW4CAC

Dependencies

  • [2] LUFSQKUV Enable support for experimental decorators
  • [3] ILH3GIVT Add command centre and refresh/init commands
  • [4] ZI7ORD4P Add iconv dependency
  • [5] 3N3RS66T Create pijul output channel and configure activation events
  • [6] B4SKYP3Y Add repository model and add steps to initialize it
  • [*] YUVLBWV3 Populate resource groups for unrecorded and untracked changes
  • [*] ZGMIJNFV Create pijul.ts for executing commands using the Pijul CLI
  • [*] NCBEWRYE Initialize Repository

Change contents

  • replacement in src/repository.ts at line 25
    [4.1068][4.1068:1104]()
    // TODO: Create resource groups
    [4.1068]
    [2.97]
    // Create resource groups
  • edit in src/repository.ts at line 49
    [8.650]
    [8.650]
    }
    /**
    * Record all diffs from the pristine as a new change
    * @param message The message for the new change
    */
    async recordAllChanges (message: string): Promise<void> {
    await this.repository.recordAllChanges(message);
  • edit in src/pijul.ts at line 216
    [8.3032]
    [8.3032]
    }
    /**
    * Record all diffs from the pristine as a new change
    * @param message The message for the new change
    */
    async recordAllChanges (message: string): Promise<void> {
    await this._pijul.exec(this.repositoryRoot, ['record', '-a', '-m', message]);
  • replacement in src/commands.ts at line 107
    [3.3526][3.3526:3563]()
    this.refresh(this.repository);
    [3.3526]
    [3.3563]
    commands.executeCommand('pijul.refresh');
  • replacement in src/commands.ts at line 115
    [3.3757][3.3757:3814]()
    * @param repository The repository to run the file in
    [3.3757]
    [3.3814]
    * @param repository The repository to refresh the files in
  • edit in src/commands.ts at line 122
    [3.3971]
    [3.3971]
    /**
    * Create a new change with all of the currently unrecorded
    * changes
    * @param repository The repository to record in
    */
    @command('pijul.recordAll', { repository: true })
    async recordAll (repository: Repository): Promise<void> {
    // TODO: Get message from input box
    const message = await window.showInputBox({
    placeHolder: 'Change Message',
    prompt: 'Please include a message describing what has changed',
    ignoreFocusOut: true
    });
    if (message) {
    repository.recordAllChanges(message);
    } else {
    window.showErrorMessage('Change was not recorded, no message was provided');
    }
    commands.executeCommand('pijul.refresh');
    }
  • replacement in package.json at line 36
    [4.311][4.311:342](),[4.342][3.4400:4430]()
    "command": "pijul.record",
    "title": "Record Change",
    [4.311]
    [4.1422]
    "command": "pijul.recordAll",
    "title": "Record All Current Changes",