Skip to content

Commit

Permalink
2023.1 Patch 1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
skardile-perforce committed Sep 5, 2023
1 parent d511cb3 commit a5b8b64
Show file tree
Hide file tree
Showing 15 changed files with 2,869 additions and 2,356 deletions.
2 changes: 0 additions & 2 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ With the 2021.2 release, `P4API.NET` has been extended to support .NET CORE and

P4API.NET consists of a DLL written in C++ which contains the Perforce C++ API, which is wrapped by a layer of C# code which exports the .NET interface.

The bridge code is dependent on P4API release 22.2 or above.

Within this directory are several subprojects. p4bridge, p4bridge-unit-test, p4bridgeStressTest, p4api.net and p4api.net-unit-test

## Getting to know your solutions
Expand Down
42 changes: 40 additions & 2 deletions RELEASENOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ Compatibility Statements
Server Compatibility

You can use this release of P4API.NET with any release of the
Perforce server at or later than 2018.1
Perforce server at or later than 2018.1, but to ensure maximum
compatibility, it is recommended that you use it with the
corresponding Perforce server release

API Compatibility

Expand Down Expand Up @@ -131,12 +133,48 @@ Key to symbols used in change notes below.
*** -- requires new p4d server program

--------------------------------------------------------------------------

New functionality in 2023.1 Patch 1

#2473015 (Job #116680) *
The CreateClient() method is now backward compatible and no longer
throws exceptions while communicating with servers older than 2023.1

#2483848 (Job #116774) *
The CreateGroup() method is now backward compatible and the
MaxMemory and Description fields are appropriately handled while
communicating with servers older than 2022.2

#2479149, #2480450 (Job #116928) *
Added a new method named 'ToServerCompatibleString' to the
ProtectionMode & ProtectionType enums. This method translates the
protection modes and group/user indicator in the ProtectionMode
object to server compatible strings. E.g. 'ReadRights' is translated
to '=read' and 'Write' is translated to 'write' among others. Refer
to the P4API.NET reference for more details

--------------------------------------------------------------------------

Bugs fixed in 2023.1 Patch 1

#2475194, #2475153 (Job #116804, #116653) *
The GetProtectionTable() method now parses the comments in the
protections table without returning an exception

#2477940, #2477263 (Job #116806, #116653) *
Fixed the issue where the GetProtectionTable() method incorrectly
returned 'List' as the Protection Mode entry for specific rights
(e.g. '=read')

--------------------------------------------------------------------------

New functionality in 2023.1 (2023.1/2456134) (2023/06/20)

#2446898, #2447440, #2447458 (Job #115785) * **
Updated P4API.NET to support 2023.1 release of Helix Core

--------------------------------------------------------------------------

New functionality in 2022.2 Patch 1 (2022.2/2432799) (2023/04/24)

#2431166 (Job #115331) *
Expand Down Expand Up @@ -1178,4 +1216,4 @@ Bugs fixed in 2011.1/347706
FileAction enumeration is now correct for deleted files.
'Delete' is returned rather than 'None'.

--------------------------------------------------------------------------
--------------------------------------------------------------------------
6 changes: 3 additions & 3 deletions p4api.net-unit-test/GroupTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,10 @@ public void CleanupTest()

private static String GroupSpec =
"Group:\tTest" + Environment.NewLine + Environment.NewLine
+ "Description:\tTest Description" + Environment.NewLine + Environment.NewLine
+ "MaxResults:\t100" + Environment.NewLine + Environment.NewLine
+ "MaxScanRows:\t10" + Environment.NewLine + Environment.NewLine
+ "MaxLockTime:\t20" + Environment.NewLine + Environment.NewLine
+ "MaxOpenFiles:\t50" + Environment.NewLine + Environment.NewLine
+ "MaxMemory:\t60" + Environment.NewLine + Environment.NewLine
+ "Timeout:\t30" + Environment.NewLine + Environment.NewLine
+ "PasswordTimeout:\t40" + Environment.NewLine + Environment.NewLine
+ "Subgroups:" + Environment.NewLine
Expand All @@ -75,7 +73,9 @@ public void CleanupTest()
+ "\tBeta" + Environment.NewLine + Environment.NewLine
+ "Users:" + Environment.NewLine
+ "\tAlice" + Environment.NewLine
+ "\tBob" + Environment.NewLine;
+ "\tBob" + Environment.NewLine + Environment.NewLine
+ "Description:\tTest Description" + Environment.NewLine + Environment.NewLine
+ "MaxMemory:\t60" + Environment.NewLine + Environment.NewLine;


/// <summary>
Expand Down
45 changes: 41 additions & 4 deletions p4api.net-unit-test/ProtectionEntryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,20 @@ public void TypeTest()
Assert.AreEqual(expected, actual);
}

/// <summary>
///A test for Mode
/// <summary>
///A test for Type ToServerCompatibleString
///</summary>
[TestMethod()]
public void TypeToServerCompatibleStringTest()
{
Assert.AreEqual("user", EntryType.User.ToServerCompatibleString());
Assert.AreEqual("group", EntryType.Group.ToServerCompatibleString());
}

/// <summary>
///A test for Mode
///</summary>
[TestMethod()]
public void ModeTest()
{
ProtectionMode mode = new ProtectionMode(); // TODO: Initialize to an appropriate value
Expand All @@ -132,10 +142,37 @@ public void ModeTest()
Assert.AreEqual(expected, actual);
}

/// <summary>
///A test for Path
/// <summary>
///A test for Mode ToServerCompatibleString
///</summary>
[TestMethod()]
public void ModeToServerCompatibleStringTest()
{
Assert.AreEqual("list", ProtectionMode.List.ToServerCompatibleString());
Assert.AreEqual("read", ProtectionMode.Read.ToServerCompatibleString());
Assert.AreEqual("open", ProtectionMode.Open.ToServerCompatibleString());
Assert.AreEqual("write", ProtectionMode.Write.ToServerCompatibleString());
Assert.AreEqual("admin", ProtectionMode.Admin.ToServerCompatibleString());
Assert.AreEqual("owner", ProtectionMode.Owner.ToServerCompatibleString());
Assert.AreEqual("super", ProtectionMode.Super.ToServerCompatibleString());
Assert.AreEqual("review", ProtectionMode.Review.ToServerCompatibleString());
Assert.AreEqual("=read", ProtectionMode.ReadRights.ToServerCompatibleString());
Assert.AreEqual("=branch", ProtectionMode.BranchRights.ToServerCompatibleString());
Assert.AreEqual("=open", ProtectionMode.OpenRights.ToServerCompatibleString());
Assert.AreEqual("=write", ProtectionMode.WriteRights.ToServerCompatibleString());
Assert.AreEqual("none", ProtectionMode.None.ToServerCompatibleString());
Assert.AreEqual("readstreamspec", ProtectionMode.ReadStreamSpec.ToServerCompatibleString());
Assert.AreEqual("openstreamspec", ProtectionMode.OpenStreamSpec.ToServerCompatibleString());
Assert.AreEqual("writestreamspec", ProtectionMode.WriteStreamSpec.ToServerCompatibleString());
Assert.AreEqual("=readstreamspec", ProtectionMode.ReadStreamSpecRights.ToServerCompatibleString());
Assert.AreEqual("=openstreamspec", ProtectionMode.OpenStreamSpecRights.ToServerCompatibleString());
Assert.AreEqual("=writestreamspec", ProtectionMode.WriteStreamSpecRights.ToServerCompatibleString());
}

/// <summary>
///A test for Path
///</summary>
[TestMethod()]
public void PathTest()
{
ProtectionMode mode = new ProtectionMode(); // TODO: Initialize to an appropriate value
Expand Down
Loading

0 comments on commit a5b8b64

Please sign in to comment.