Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@ Example:
|`svn.showUpdateMessage`|Show the update message when update is run|`true`|
|`svn.remoteChanges.checkFrequency`|Set the interval in seconds to check changed files on remote repository and show in statusbar. 0 to disable|`300`|
|`svn.sourceControl.hideUnversioned`|Hide unversioned files in Source Control UI|`false`|
|`svn.refresh.remoteChanges`|Refresh remote changes on refresh command|`false`|
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,11 @@
"type": "boolean",
"description": "Hide unversioned files in Source Control UI",
"default": false
},
"svn.refresh.remoteChanges": {
"type": "boolean",
"description": "Refresh remote changes on refresh command",
"default": false
}
}
}
Expand Down
24 changes: 16 additions & 8 deletions src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import { Model } from "./model";
import { Repository } from "./repository";
import { Resource } from "./resource";
import { Svn, svnErrorCodes } from "./svn";
import IncommingChangeNode from "./treeView/nodes/incomingChangeNode";
import IncomingChangeNode from "./treeView/nodes/incomingChangeNode";
import { fromSvnUri, toSvnUri } from "./uri";
import {
Expand Down Expand Up @@ -497,7 +496,16 @@ export class SvnCommands implements IDisposable {

@command("svn.refresh", { repository: true })
public async refresh(repository: Repository) {
const refreshRemoteChanges = configuration.get<boolean>(
"refresh.remoteChanges",
false
);

await repository.status();

if (refreshRemoteChanges) {
await repository.updateRemoteChangedFiles();
}
}

@command("svn.openResourceBase")
Expand All @@ -512,7 +520,7 @@ export class SvnCommands implements IDisposable {

@command("svn.openFile")
public async openFile(
arg?: Resource | Uri | IncommingChangeNode,
arg?: Resource | Uri | IncomingChangeNode,
...resourceStates: SourceControlResourceState[]
): Promise<void> {
const preserveFocus = arg instanceof Resource;
Expand All @@ -525,7 +533,7 @@ export class SvnCommands implements IDisposable {
} else if (arg.scheme === "file") {
uris = [arg];
}
} else if (arg instanceof IncommingChangeNode) {
} else if (arg instanceof IncomingChangeNode) {
const resource = new Resource(
arg.uri,
arg.type,
Expand Down Expand Up @@ -582,15 +590,15 @@ export class SvnCommands implements IDisposable {

@command("svn.openHEADFile")
public async openHEADFile(
arg?: Resource | Uri | IncommingChangeNode
arg?: Resource | Uri | IncomingChangeNode
): Promise<void> {
let resource: Resource | undefined;

if (arg instanceof Resource) {
resource = arg;
} else if (arg instanceof Uri) {
resource = this.getSCMResource(arg);
} else if (arg instanceof IncommingChangeNode) {
} else if (arg instanceof IncomingChangeNode) {
resource = new Resource(arg.uri, arg.type, undefined, arg.props, true);
} else {
resource = this.getSCMResource();
Expand Down Expand Up @@ -631,14 +639,14 @@ export class SvnCommands implements IDisposable {

@command("svn.openChangeHead")
public async openChangeHead(
arg?: Resource | Uri | IncommingChangeNode,
arg?: Resource | Uri | IncomingChangeNode,
...resourceStates: SourceControlResourceState[]
): Promise<void> {
return this.openChange(arg, "HEAD", resourceStates);
}

public async openChange(
arg?: Resource | Uri | IncommingChangeNode,
arg?: Resource | Uri | IncomingChangeNode,
against?: string,
resourceStates?: SourceControlResourceState[]
): Promise<void> {
Expand All @@ -651,7 +659,7 @@ export class SvnCommands implements IDisposable {
if (resource !== undefined) {
resources = [resource];
}
} else if (arg instanceof IncommingChangeNode) {
} else if (arg instanceof IncomingChangeNode) {
const resource = new Resource(
arg.uri,
arg.type,
Expand Down