Add reset command to resource state context menu
[?]
Dec 28, 2020, 7:13 PM
L44OILGKTGXSLQ3A4UQH44AMJXAVZSFISAB6ICHCDB6D42NKUWBQCDependencies
- [2]
6ONRFFRGFirst pass of file decorations - [3]
BIEL6Z5JUpdate resource groups to use custom interface - [4]
B4SKYP3YAdd repository model and add steps to initialize it - [5]
JYMSJCPQAdd command to add all untracked files and fix repository refreshing - [6]
YUVLBWV3Populate resource groups for unrecorded and untracked changes - [7]
MU6ZNUYZIntegrate recordAll command with input box - [8]
WHQQV5QQAdd watcher to refresh on file system changes - [9]
ILH3GIVTAdd command centre and refresh/init commands - [10]
ZGMIJNFVCreate pijul.ts for executing commands using the Pijul CLI - [*]
NCBEWRYEInitialize Repository - [*]
3N3RS66TCreate pijul output channel and configure activation events - [*]
H6KYVQ2QAdd a class to represent resources
Change contents
- replacement in src/repository.ts at line 1
import { Disposable, Event, EventEmitter, OutputChannel, RelativePattern, scm, SourceControl, Uri, window, workspace } from 'vscode';import { Disposable, Event, EventEmitter, OutputChannel, RelativePattern, scm, SourceControl, SourceControlResourceState, Uri, window, workspace } from 'vscode'; - replacement in src/repository.ts at line 153
* Reset all files in the repository by undoing recorded changes* Reset all files in the repository by undoing unrecorded changes - edit in src/repository.ts at line 160
* Reset specific files in the repository by undoing unrecorded changes*/async reset (...resourceStates: SourceControlResourceState[]): Promise<void> {await this.repository.reset(resourceStates.map(r => r.resourceUri));}/** - replacement in src/pijul.ts at line 237
* Reset all files in the repository by undoing recorded changes* Reset all files in the repository by undoing unrecorded changes - edit in src/pijul.ts at line 242
/*** Reset specific files in the repository by undoing unrecorded*/async reset (files: Uri[]): Promise<void> {await this._pijul.exec(this.repositoryRoot, ['reset', ...files.map(f => f.fsPath)]);} - replacement in src/commands.ts at line 1
import { commands, Disposable, OutputChannel, window, workspace } from 'vscode';import { commands, Disposable, OutputChannel, SourceControlResourceState, window, workspace } from 'vscode'; - edit in src/commands.ts at line 144
}/*** Resets specific files in the repository, discarding unrecorded changes* @param repository The repository that contains the files* @param resourceStates The resources that will be reset*/@command('pijul.reset', { repository: true })async stage (repository: Repository, ...resourceStates: SourceControlResourceState[]): Promise<void> {for (const resource of resourceStates) {console.log(resource.resourceUri.path);}repository.reset(...resourceStates); - edit in package.json at line 46
"command": "pijul.reset","title": "Reset Unrecorded Changes","category": "Pijul"},{ - edit in package.json at line 74[13.1696][14.6229]
},"menus": {"scm/resourceState/context": [{"command": "pijul.reset","when": "scmProvider == pijul && scmResourceGroup == changed","group": "1_modification"}]