Skip to content

Commit

Permalink
fix: Changed how file paths are shown in branch changes (#1162)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnstonCode committed Nov 21, 2020
1 parent 63b0f49 commit 8784c5e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export interface ISvnPathChange {
kind: SvnKindType;
item: Status;
repo: Uri;
localPath: Uri;
}

export interface ISvnListItem {
Expand Down
8 changes: 6 additions & 2 deletions src/historyView/branchChangesProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,18 @@ export class BranchChangesProvider
const iconPath = getIconObject(iconName);

return {
label: element.newPath.toString(),
label: element.localPath.fsPath,
command: {
command: "svn.branchchanges.openDiff",
title: "Open diff",
arguments: [element]
},
iconPath,
tooltip: `${element.oldPath}@r${element.oldRevision}${element.newPath}@r${element.newRevision}`
tooltip: `${element.oldPath.fsPath.replace(element.repo.fsPath, "")}@r${
element.oldRevision
}${element.newPath.fsPath.replace(element.repo.fsPath, "")}@r${
element.newRevision
}`
};
}

Expand Down
3 changes: 2 additions & 1 deletion src/svnRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ export class Repository {
item: path.item,
props: path.props,
kind: path.kind,
repo: Uri.parse(this.info.repository.root)
repo: Uri.parse(this.info.repository.root),
localPath: Uri.parse(path._.replace(copyFromUrl, ""))
});
}

Expand Down

0 comments on commit 8784c5e

Please sign in to comment.