Permalink
Browse files

Adding retry code to Git.Clone for parity with private

  • Loading branch information...
1 parent 6d6ced0 commit 438260c5573714862ef4bb41b0faeae1e381a91f @pranavkm pranavkm committed Nov 30, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 Kudu.TestHarness/Git.cs
View
@@ -3,7 +3,6 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
-using System.Text.RegularExpressions;
using Kudu.Client.Deployment;
using Kudu.Core.Infrastructure;
using Kudu.Core.SourceControl.Git;
@@ -87,6 +86,11 @@ public static void Add(string repositoryPath, string path)
public static TestRepository Clone(string repositoryName, string source, IDictionary<string, string> environments = null, bool requiresEditableRepository = false, bool noCache = false)
{
+ return OperationManager.Attempt(() => CloneInternal(repositoryName, source, environments, requiresEditableRepository, noCache));
+ }
+
+ private static TestRepository CloneInternal(string repositoryName, string source, IDictionary<string, string> environments, bool requiresEditableRepository, bool noCache)
+ {
// Check if we have a cached instance of the repository available locally
string cachedPath = noCache ? null : CreateCachedRepo(repositoryName, source, environments);

0 comments on commit 438260c

Please sign in to comment.