Skip to content

Commit 8784c5e

Browse files
authored
fix: Changed how file paths are shown in branch changes (#1162)
1 parent 63b0f49 commit 8784c5e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/common/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export interface ISvnPathChange {
6262
kind: SvnKindType;
6363
item: Status;
6464
repo: Uri;
65+
localPath: Uri;
6566
}
6667

6768
export interface ISvnListItem {

src/historyView/branchChangesProvider.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,18 @@ export class BranchChangesProvider
5151
const iconPath = getIconObject(iconName);
5252

5353
return {
54-
label: element.newPath.toString(),
54+
label: element.localPath.fsPath,
5555
command: {
5656
command: "svn.branchchanges.openDiff",
5757
title: "Open diff",
5858
arguments: [element]
5959
},
6060
iconPath,
61-
tooltip: `${element.oldPath}@r${element.oldRevision}${element.newPath}@r${element.newRevision}`
61+
tooltip: `${element.oldPath.fsPath.replace(element.repo.fsPath, "")}@r${
62+
element.oldRevision
63+
}${element.newPath.fsPath.replace(element.repo.fsPath, "")}@r${
64+
element.newRevision
65+
}`
6266
};
6367
}
6468

src/svnRepository.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ export class Repository {
271271
item: path.item,
272272
props: path.props,
273273
kind: path.kind,
274-
repo: Uri.parse(this.info.repository.root)
274+
repo: Uri.parse(this.info.repository.root),
275+
localPath: Uri.parse(path._.replace(copyFromUrl, ""))
275276
});
276277
}
277278

0 commit comments

Comments
 (0)