Skip to content

Commit

Permalink
Fix send-receive path shortening
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye committed Nov 27, 2024
1 parent 2c3dc5a commit e32f341
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/Testing/Services/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public static SendReceiveParams GetParams(HgProtocol protocol,

public static ProjectConfig GetNewProjectConfig(HgProtocol? protocol = null, bool isConfidential = false, Guid? owningOrgId = null, [CallerMemberName] string projectName = "")
{
projectName = projectName[..Math.Min(projectName.Length, 40)]; // make sure the path isn't too long
if (protocol.HasValue) projectName += $" ({protocol.Value.ToString()[..5]})";
var id = Guid.NewGuid();
var shortId = id.ToString().Split("-")[0];
var projectCodeName = ToProjectCodeFriendlyString(projectName)[..Math.Min(projectName.Length, 40)]; // make sure the path isn't too long
var projectCode = $"{projectCodeName}-{shortId}-dev-flex";
var projectCode = $"{ToProjectCodeFriendlyString(projectName)}-{shortId}-dev-flex";
var dir = GetNewProjectDir(projectCode, "");
return new ProjectConfig(id, projectName, projectCode, dir, isConfidential, owningOrgId);
}
Expand Down

0 comments on commit e32f341

Please sign in to comment.