Skip to content

Commit 4dbeedb

Browse files
committed
removed prop stuff
1 parent 3ff3b95 commit 4dbeedb

File tree

5 files changed

+10
-122
lines changed

5 files changed

+10
-122
lines changed

package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,6 @@
9494
"command": "svn.patch",
9595
"title": "Svn patch",
9696
"category": "SVN"
97-
},
98-
{
99-
"command": "svn.propset:ignore",
100-
"title": "Svn propset:ignore",
101-
"category": "SVN"
10297
}
10398
],
10499
"menus": {

src/commands.ts

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,6 @@ interface Command {
2828

2929
const Commands: Command[] = [];
3030

31-
const IgnoreOptions: any[] = [
32-
{
33-
name: 'ignore',
34-
type: 'recursive',
35-
flag: '-R'
36-
},
37-
{
38-
name: 'ignore',
39-
type: 'non-recursive',
40-
flag: ''
41-
}
42-
]
43-
4431
function command(commandId: string, options: CommandOptions = {}): Function {
4532
return (target: any, key: string, descriptor: any) => {
4633
if (!(typeof descriptor.value === "function")) {
@@ -51,16 +38,6 @@ function command(commandId: string, options: CommandOptions = {}): Function {
5138
};
5239
}
5340

54-
async function askForFilesAndDirectories() {
55-
return await window
56-
.showInputBox({
57-
value: "",
58-
placeHolder: "Files",
59-
prompt: "Enter a space separated list of the files/directories",
60-
ignoreFocusOut: true
61-
});
62-
}
63-
6441
class CreateBranchItem implements QuickPickItem {
6542
constructor(private commands: SvnCommands) {}
6643

@@ -105,55 +82,6 @@ class SwitchBranchItem implements QuickPickItem {
10582
}
10683
}
10784

108-
// class PropSetItem implements QuickPickItem {
109-
// constructor(private name: string, private flag: string){}
110-
111-
// get label(): string {
112-
// return this.name;
113-
// }
114-
115-
// get description(): string {
116-
// return '';
117-
// }
118-
119-
// async run(repository: Repository): Promise<void> {
120-
// const files = await window
121-
// .showInputBox({
122-
// value: "",
123-
// placeHolder: "Files",
124-
// prompt: "Enter a space separated list of the files/directories",
125-
// ignoreFocusOut: true
126-
// });
127-
128-
// if (!files) {
129-
// return;
130-
// }
131-
132-
// await repository.propset(this.name, files);
133-
// }
134-
// }
135-
class IgnorePropItem implements QuickPickItem {
136-
constructor(private name: string, private type:string, private flag: string){}
137-
138-
get label(): string {
139-
return this.type;
140-
}
141-
142-
get description(): string {
143-
return '';
144-
}
145-
146-
async run(repository: Repository): Promise<void> {
147-
const files = await askForFilesAndDirectories();
148-
149-
if (!files) {
150-
return;
151-
}
152-
153-
repository.propset(this.name, this.flag, files);
154-
}
155-
}
156-
15785
export class SvnCommands {
15886
private commands: any[] = [];
15987

@@ -436,19 +364,6 @@ export class SvnCommands {
436364
window.showErrorMessage("Unable to patch");
437365
}
438366
}
439-
440-
@command("svn.propset:ignore", { repository: true })
441-
async propsetIgnore(repository: Repository) {
442-
const placeHolder = "recursive or non-recursive?";
443-
const picks = IgnoreOptions.map(item => new IgnorePropItem(item.name, item.type, item.flag));
444-
const choice = await window.showQuickPick(picks, { placeHolder });
445-
446-
if (!choice) {
447-
return;
448-
}
449-
450-
await choice.run(repository);
451-
}
452367

453368
private runByRepository<T>(
454369
resource: Uri,

src/repository.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,4 @@ export class Repository {
245245
this._onDidChangeRepository.fire();
246246
}
247247
}
248-
249-
async propset(name:string, flag:string, files:string) {
250-
return this.repository.propset(name, flag, files);
251-
}
252248
}

src/svn.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,8 @@ export class Svn {
246246
update(root: string) {
247247
return this.exec(root, ["update"]);
248248
}
249-
249+
250250
patch(root: string) {
251251
return this.exec(root, ["diff"]);
252252
}
253-
254-
propset(root:string, name:string, flag:string, files: any[]) {
255-
let args = ['propset', `svn:${name}`, flag, ...files];
256-
257-
return this.exec(root, args);
258-
}
259253
}

src/svnRepository.ts

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ export class Repository {
8484
}
8585
}
8686

87-
return "";
88-
}
87+
return "";
88+
}
8989

9090
async getRepoUrl() {
9191
const config = workspace.getConfiguration("svn");
@@ -205,7 +205,10 @@ export class Repository {
205205
throw new Error(result.stderr);
206206
}
207207

208-
const switchBranch = await this.svn.switchBranch(this.workspaceRoot, newBranch);
208+
const switchBranch = await this.svn.switchBranch(
209+
this.workspaceRoot,
210+
newBranch
211+
);
209212

210213
if (switchBranch.exitCode !== 0) {
211214
throw new Error(switchBranch.stderr);
@@ -255,29 +258,14 @@ export class Repository {
255258

256259
return message;
257260
}
258-
261+
259262
async patch() {
260263
const result = await this.svn.patch(this.workspaceRoot);
261264
if (result.exitCode !== 0) {
262265
throw new Error(result.stderr);
263266
}
264-
267+
265268
const message = result.stdout;
266-
return message;
267-
}
268-
269-
async propset(name:string, flag:string, files:string) {
270-
const filesArray = files.split(" ");
271-
const result = await this.svn.propset(this.workspaceRoot, name, flag, filesArray);
272-
273-
console.log(result);
274-
275-
if (result.exitCode !== 0) {
276-
throw new Error(result.stderr);
277-
}
278-
279-
console.log(result.stdout);
280-
281-
return result.stdout;
269+
return message;
282270
}
283271
}

0 commit comments

Comments
 (0)