Skip to content

Commit 7fb3966

Browse files
committed
fix: Removed proposed api (#690)
BREAKING CHANGE: Removed proposed api functionallity (#675)
1 parent 5ede0dc commit 7fb3966

17 files changed

+1703
-2830
lines changed

README.md

-24
Original file line numberDiff line numberDiff line change
@@ -60,30 +60,6 @@ If you use [TortoiseSVN](https://tortoisesvn.net/), make sure the option
6060

6161
Please use a dedicated extension like [blamer-vs](https://marketplace.visualstudio.com/items?itemName=beaugust.blamer-vs)
6262

63-
## Experimental
64-
65-
### * SVN Status in File Explorer (See [#34](https://github.com/JohnstonCode/svn-scm/issues/34))
66-
How to enable:
67-
* Open the file: `<vscode path>\resources\app\product.json`
68-
* Find `extensionAllowedProposedApi`
69-
* Append `"johnstoncode.svn-scm"` in the array
70-
71-
Example:
72-
```js
73-
// FROM
74-
{
75-
"extensionAllowedProposedApi": [
76-
"ms-vsliveshare.vsliveshare"
77-
]
78-
}
79-
// TO
80-
{
81-
"extensionAllowedProposedApi": [
82-
"ms-vsliveshare.vsliveshare", "johnstoncode.svn-scm"
83-
]
84-
}
85-
```
86-
8763
## Settings
8864
Here is a table of settings with their default values. To change any of these, add the relevant Config key and value to your VSCode settings.json file.
8965

package-lock.json

+1,683-1,441
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-14
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,6 @@
372372
"dark": "icons/dark/clean.svg"
373373
}
374374
},
375-
{
376-
"command": "svn.revertSelectedRanges",
377-
"title": "Revert Selected Ranges",
378-
"category": "SVN"
379-
},
380375
{
381376
"command": "svn.close",
382377
"title": "Close repository",
@@ -530,10 +525,6 @@
530525
"command": "svn.revertAll",
531526
"when": "false"
532527
},
533-
{
534-
"command": "svn.revertSelectedRanges",
535-
"when": "config.svn.enabled && svnOpenRepositoryCount != 0 && svnHasSupportToRegisterDiffCommand == 1"
536-
},
537528
{
538529
"command": "svn.close",
539530
"when": "config.svn.enabled && svnOpenRepositoryCount != 0"
@@ -891,11 +882,6 @@
891882
"command": "svn.openChangeHead",
892883
"group": "navigation",
893884
"when": "config.svn.enabled && svnOpenRepositoryCount != 0 && svnActiveEditorHasChanges && !isInDiffEditor && resourceScheme == file"
894-
},
895-
{
896-
"command": "svn.revertSelectedRanges",
897-
"group": "2_svn@3",
898-
"when": "config.svn.enabled && svnOpenRepositoryCount != 0 && isInDiffEditor && resourceScheme != merge-conflicts.conflicts-diff && svnHasSupportToRegisterDiffCommand == 1"
899885
}
900886
],
901887
"explorer/context": [

src/commands.ts

-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import { Revert } from "./commands/revert";
3838
import { RevertAll } from "./commands/revertAll";
3939
import { RevertChange } from "./commands/revertChange";
4040
import { RevertExplorer } from "./commands/revertExplorer";
41-
import { RevertSelectedRanges } from "./commands/revertSelectedRanges";
4241
import { SwitchBranch } from "./commands/switchBranch";
4342
import { Update } from "./commands/update";
4443
import { Upgrade } from "./commands/upgrade";
@@ -77,7 +76,6 @@ export function registerCommands(model: Model, disposables: Disposable[]) {
7776
disposables.push(new AddToIgnoreExplorer());
7877
disposables.push(new RenameExplorer());
7978
disposables.push(new Upgrade());
80-
disposables.push(new RevertSelectedRanges());
8179
disposables.push(new OpenChangePrev());
8280
disposables.push(new PromptRemove());
8381
disposables.push(new Checkout());

src/commands/command.ts

+6-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as path from "path";
22
import {
33
commands,
44
Disposable,
5-
LineChange,
65
Position,
76
Range,
87
SourceControlResourceState,
@@ -14,7 +13,12 @@ import {
1413
workspace,
1514
WorkspaceEdit
1615
} from "vscode";
17-
import { ICommandOptions, Status, SvnUriAction } from "../common/types";
16+
import {
17+
ICommandOptions,
18+
Status,
19+
SvnUriAction,
20+
LineChange
21+
} from "../common/types";
1822
import { exists, readFile, stat, unlink } from "../fs";
1923
import { inputIgnoreList } from "../ignoreitems";
2024
import { applyLineChanges } from "../lineChanges";
@@ -23,7 +27,6 @@ import { Repository } from "../repository";
2327
import { Resource } from "../resource";
2428
import IncomingChangeNode from "../treeView/nodes/incomingChangeNode";
2529
import { fromSvnUri, toSvnUri } from "../uri";
26-
import { hasSupportToRegisterDiffCommand } from "../util";
2730

2831
export abstract class Command implements Disposable {
2932
private _disposable?: Disposable;
@@ -37,14 +40,6 @@ export abstract class Command implements Disposable {
3740
return;
3841
}
3942

40-
if (options.diff && hasSupportToRegisterDiffCommand()) {
41-
this._disposable = commands.registerDiffInformationCommand(
42-
commandName,
43-
(...args: any[]) => this.execute(...args)
44-
);
45-
return;
46-
}
47-
4843
if (!options.repository) {
4944
this._disposable = commands.registerCommand(
5045
commandName,

src/commands/revertChange.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { LineChange, Uri, window } from "vscode";
1+
import { Uri, window } from "vscode";
22
import { Command } from "./command";
3+
import { LineChange } from "../common/types";
34

45
export class RevertChange extends Command {
56
constructor() {

src/commands/revertSelectedRanges.ts

-49
This file was deleted.

src/common/types.ts

+7
Original file line numberDiff line numberDiff line change
@@ -289,3 +289,10 @@ export enum SvnDepth {
289289
immediates = "the target and any immediate children thereof",
290290
infinity = "the target and all of its descendants—full recursion"
291291
}
292+
293+
export interface LineChange {
294+
readonly originalStartLineNumber: number;
295+
readonly originalEndLineNumber: number;
296+
readonly modifiedStartLineNumber: number;
297+
readonly modifiedEndLineNumber: number;
298+
}

src/decorations/svnDecorationProvider.ts

-71
This file was deleted.

src/decorations/svnDecorations.ts

-75
This file was deleted.

0 commit comments

Comments
 (0)