File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import { Svn } from "./svn";
2424import {
2525 fixPathSeparator ,
2626 fixPegRevision ,
27+ isDescendant ,
2728 normalizePath ,
2829 unwrap
2930} from "./util" ;
@@ -183,10 +184,17 @@ export class Repository {
183184 filePath = file ;
184185 }
185186
186- let target : string = this . removeAbsolutePath ( filePath ) ;
187+ const isChild = uri . scheme === "file" && isDescendant ( this . workspaceRoot , uri . fsPath ) ;
188+
189+ let target : string = filePath ;
190+
191+ if ( isChild ) {
192+ target = this . removeAbsolutePath ( target ) ;
193+ }
194+
187195 if ( revision ) {
188196 args . push ( "-r" , revision ) ;
189- if ( ! [ "BASE" , "COMMITTED" , "PREV" ] . includes ( revision . toUpperCase ( ) ) ) {
197+ if ( isChild && ! [ "BASE" , "COMMITTED" , "PREV" ] . includes ( revision . toUpperCase ( ) ) ) {
190198 const info = await this . getInfo ( ) ;
191199 target = info . url + "/" + target . replace ( / \\ / g, "/" ) ;
192200 // TODO move to SvnRI
You can’t perform that action at this time.
0 commit comments