Hello!
I found out the hard way that UAT does not work with a P4 workspace that relies on AltRoots.
The idea behind AltRoots is to be able to specify more than one root path for the client spec (e.g. use cases could be when using “junctions”, “symlinks”, or when sharing the same workspace in Windows and WSL, etc.).
I patched the version of `P4Utils.cs` shipped with 5.7.3 to add support for it, and I’m sharing it in case you’d like to accept it:
diff --git i/P4Utils.cs w/P4Utils.cs
index 64947e3..2ebe995 100644
--- i/P4Utils.cs
+++ w/P4Utils.cs
[Content removed]7 @@ namespace AutomationTool
{
public string Name;
public string RootPath;
+ public List<string> AltRootPaths = new List<string>();
public string Host;
public string Owner;
public string Stream;
[Content removed]14 @@ namespace AutomationTool
{
Info.RootPath = CommandUtils.ConvertSeparators(PathSeparator.Default, Info.RootPath);
}
+ foreach (var Pair in Tags)
+ {
+ if (Pair.Key.StartsWith("AltRoots", StringComparison.InvariantCultureIgnoreCase))
+ {
+ string AltRoot = CommandUtils.ConvertSeparators(PathSeparator.Default, Pair.Value);
+ Info.AltRootPaths.Add(AltRoot);
+ }
+ }
Tags.TryGetValue("Owner", out Info.Owner);
Tags.TryGetValue("Stream", out Info.Stream);
string AccessTime;
[Content removed]18 @@ namespace AutomationTool
public bool IsValidClientForFile(P4ClientInfo Info, string PathUnderClientRoot)
{
- return IsValidRootPathForFile(Info.RootPath, PathUnderClientRoot);
+ if (IsValidRootPathForFile(Info.RootPath, PathUnderClientRoot))
+ {
+ return true;
+ }
+ foreach (string AltRootPath in Info.AltRootPaths)
+ {
+ if (IsValidRootPathForFile(AltRootPath, PathUnderClientRoot))
+ {
+ return true;
+ }
+ }
+ return false;
}
public bool IsValidRootPathForFile(string RootPath, string PathUnderClientRoot)