From eb40ac3922041369f224ea22ce9e64859f41f305 Mon Sep 17 00:00:00 2001 From: Edgard Lorraine Messias Date: Wed, 28 Feb 2018 13:41:51 -0300 Subject: [PATCH] Fixed branch switching if not share common ancestry (Close #195) --- src/svnRepository.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/svnRepository.ts b/src/svnRepository.ts index ad274c1a..68d07428 100644 --- a/src/svnRepository.ts +++ b/src/svnRepository.ts @@ -294,7 +294,11 @@ export class Repository { const branchUrl = repoUrl + "/" + ref; - const switchBranch = await this.exec(["switch", branchUrl]); + try { + await this.exec(["switch", branchUrl]); + } catch (error) { + await this.exec(["switch", branchUrl, "--ignore-ancestry"]); + } this.resetInfo();