From 51884104aa1da7d670b0a367bf2a55e83ece9ae1 Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Wed, 6 Sep 2017 14:01:59 -0400 Subject: [PATCH] Also while testmerging --- TGServerService/Repository.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/TGServerService/Repository.cs b/TGServerService/Repository.cs index a6bb1d7ddc..ad8eaafdef 100644 --- a/TGServerService/Repository.cs +++ b/TGServerService/Repository.cs @@ -377,9 +377,9 @@ namespace TGServerService return error; } var res = MergeBranch(originBranch.FriendlyName); - UpdateSubmodules(); if (res != null) throw new Exception(res); + UpdateSubmodules(); TGServerService.WriteInfo("Repo merge updated to " + originBranch.Tip.Sha, TGServerService.EventID.RepoMergeUpdate); return null; } @@ -569,6 +569,16 @@ namespace TGServerService //so we'll know if this fails var Result = MergeBranch(LocalBranchName); + if (Result == null) + try + { + UpdateSubmodules(); + } + catch (Exception e) + { + Result = e.ToString(); + } + if (Result == null) { TGServerService.WriteInfo(String.Format("Merged pull request #{0}", PRNumber), TGServerService.EventID.RepoPRMerge);