Add menu command for recording changes to specific files
[?]
Dec 28, 2020, 8:58 PM
YDCLFNEJZCXIHV6SS2XC7WPBPA5QTSLRMVVDLZ3XRJ7QDAISEGHQCDependencies
- [2]
L44OILGKAdd reset command to resource state context menu - [3]
MU6ZNUYZIntegrate recordAll command with input box - [4]
ILH3GIVTAdd command centre and refresh/init commands - [5]
H3GAPFUCAdd pijul.recordAll command - [6]
YUVLBWV3Populate resource groups for unrecorded and untracked changes - [7]
JYMSJCPQAdd command to add all untracked files and fix repository refreshing - [*]
B4SKYP3YAdd repository model and add steps to initialize it - [*]
BIEL6Z5JUpdate resource groups to use custom interface - [*]
ZGMIJNFVCreate pijul.ts for executing commands using the Pijul CLI - [*]
NCBEWRYEInitialize Repository - [*]
3N3RS66TCreate pijul output channel and configure activation events - [*]
ZI7ORD4PAdd iconv dependency
Change contents
- edit in src/repository.ts at line 115
}/*** Returns adn clears the message in the record input box if one is present,* presents the user with an input box otherwise.*/private async getChangeMessage (): Promise<string | undefined> {let message: string | undefined = this.sourceControl.inputBox.value;// Clear messagethis.sourceControl.inputBox.value = '';if (!message) {message = await window.showInputBox({placeHolder: 'Change Message',prompt: 'Please include a message describing what has changed',ignoreFocusOut: true});}return message;}/*** Record all diffs in the given resources as a new change* @param resourceStates The files which will have their changes recorded* @param message The message for the new change*/async recordChanges (resourceStates: SourceControlResourceState[], message? : string): Promise<void> {if (!message) {message = await this.getChangeMessage();}if (message) {await this.repository.recordChanges(resourceStates.map(r => r.resourceUri), message);} else {window.showErrorMessage('Change was not recorded, no message was provided');} - replacement in src/repository.ts at line 159
message = this.sourceControl.inputBox.value;// Clear messagethis.sourceControl.inputBox.value = '';if (!message) {message = await window.showInputBox({placeHolder: 'Change Message',prompt: 'Please include a message describing what has changed',ignoreFocusOut: true});}message = await this.getChangeMessage(); - edit in src/pijul.ts at line 221
* Record all diffs in the given files as a new change* @param files The files that will be inlcuded in the new change* @param message The message for the new change*/async recordChanges (files: Uri[], message: string): Promise<void> {await this._pijul.exec(this.repositoryRoot, ['record', ...files.map(f => f.fsPath), '-a', '-m', message], { input: 'test' });}/** - replacement in src/commands.ts at line 126
* Create a new change with all of the currently unrecorded* changes* Create a new change with the unrecorded changes in the given files* @param repository The repository to record in* @param resourceStates The files to record changes for*/@command('pijul.record', { repository: true })async record (repository: Repository, ...resourceStates: SourceControlResourceState[]): Promise<void> {await repository.recordChanges(resourceStates);await repository.refreshStatus();}/*** Create a new change with all of the currently unrecorded changes - replacement in src/commands.ts at line 163
for (const resource of resourceStates) {console.log(resource.resourceUri.path);}repository.reset(...resourceStates);await repository.reset(...resourceStates); - edit in package.json at line 33[13.1422][14.276]
"category": "Pijul"},{"command": "pijul.record","title": "Record Current Changes", - edit in package.json at line 83
"command": "pijul.record","when": "scmProvider == pijul && scmResourceGroup == changed","group": "1_modification"},{