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);