Skip to content

Commit dff44f7

Browse files
2024.1 release
1 parent 0a4a802 commit dff44f7

18 files changed

Lines changed: 327 additions & 223 deletions

RELEASENOTES.txt

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Release Notes for
22
P4API.NET, the Helix P4API for .NET
33

4-
Version 2023.2
4+
Version 2024.1
55

66
Introduction
77

@@ -17,19 +17,6 @@ Introduction
1717

1818
--------------------------------------------------------------------------
1919

20-
Important End-of-Life Notice
21-
22-
Cross platform support was provided with the 2021.2 release of P4API.NET.
23-
Since then, 4 different Nuget packages were published ('p4api.net.core',
24-
'p4api.net', 'p4api.net.x64' and 'p4api.net.x86'). But as 'p4api.net'
25-
contains all the necessary libraries to work on all these 4 platforms, there
26-
is no need for 4 different packages. Hence, this major release marks these
27-
packages - 'p4api.net.core', 'p4api.net.x64' and 'p4api.net.x86' - as
28-
deprecated. We recommend using the 'p4api.net' package to avoid deprecation
29-
warnings
30-
31-
--------------------------------------------------------------------------
32-
3320
Installation
3421

3522
The simplest way to install P4API.NET is using the NuGet package manager.
@@ -80,8 +67,8 @@ Compatibility Statements
8067

8168
API Compatibility
8269

83-
This release of P4API.NET requires the 2023.2 Helix Core API
84-
(2023.2/2519561) for C/C++ (P4API), built with Visual Studio 2019 or
70+
This release of P4API.NET requires the 2024.1 Helix Core API
71+
(2024.1/2596294) for C/C++ (P4API), built with Visual Studio 2019 or
8572
later.
8673

8774
C#/.NET Compatibility
@@ -100,7 +87,7 @@ Compatibility Statements
10087
Windows 10
10188
Windows Server 2019
10289
Windows Server 2022
103-
Mac OS X
90+
Mac OS
10491
MacOS 12.2
10592
Linux
10693
Ubuntu 20.04
@@ -116,14 +103,6 @@ Compatibility Statements
116103
Unless otherwise stated below, this release of P4API.NET is compatible
117104
with previous releases from Perforce Software.
118105

119-
Known Limitations
120-
121-
The p4api.net.chm help file that is distributed with
122-
p4api.net64.zip, p4api.net86.zip, and p4api.net-src.zip needs
123-
to be Unblocked by clicking on the file->Properties and checking
124-
the [] Unblock checkbox. Otherwise no content will appear when
125-
the file is opened.
126-
127106
--------------------------------------------------------------------------
128107

129108
Key to symbols used in change notes below.
@@ -133,15 +112,49 @@ Key to symbols used in change notes below.
133112
*** -- requires new p4d server program
134113

135114
--------------------------------------------------------------------------
115+
New functionality in 2024.1 (2024.1/2618274) (2024/06/27)
116+
117+
#2603564 (Job #120832) * ** ***
118+
Updated P4API.NET to support 2024.1 release of Helix Core.
119+
120+
#2616734,#2617678 (Job #120831) * ** ***
121+
Added support for comments in Client,Label,Typemap and Branch spec.
122+
123+
#2614334,#2614783 (Job #116235) *
124+
P4API.NET will not publish deprecated nuget packages from this release.
125+
126+
#2614333 (Job #120452) * ** ***
127+
Updated enums for ErrorSubSytem to be in sync with Helix Core server.
136128

129+
--------------------------------------------------------------------------
130+
Bugs fixed in 2024.1 (2024.1/2618274) (2024/06/27)
131+
132+
#2612692 (Job #117990) *
133+
Fixed issue where user was not able to revert file in case of
134+
SSL enabled unicode server.
135+
136+
#2599924,#2599979 (Job #119273) *
137+
Fixed the issue where License properties was not being populated.
138+
139+
#2600004 (Job #120543) *
140+
Refactored code for performance improvement in case of exception handling.
141+
142+
#2600957 (Job #120754) *
143+
Fixed issue to use correct file path separator depending on OS at runtime.
144+
145+
#2614782,#2615007,#2614780 (Job #121125,#121320,#121321) *
146+
This fix addresses vulnerabilties CVE-2024-21907,CVE-2019-0820 and
147+
CVE-2018-8292
148+
149+
--------------------------------------------------------------------------
137150
New functionality in 2023.2 Patch 1 (2023.2/2585793) (2024/04/16)
138151

139152
#2574099 (Job #113810) * **
140153
Added support for renameclient feature
141154

142155
#2581518,2582417,2582434 (Job #109430) * ** ***
143156
Added support for p4 license command options -i,-u,-o and -L.
144-
157+
145158
--------------------------------------------------------------------------
146159

147160
New functionality in 2023.2 (2023.2/2553501) (2024/02/07)

p4api.net-unit-test/ClientOptionEnumTest.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public void CleanupTest()
7575
public void ClientOptionEnumConstructorTest()
7676
{
7777
ClientOptionEnum target = new ClientOptionEnum(v0);
78-
Assert.AreEqual(target, ClientOption.None);
78+
Assert.AreEqual<ClientOption>(target, ClientOption.None);
7979
Assert.AreEqual(ClientOption.None, target & ClientOption.AllWrite);
8080
Assert.AreEqual(ClientOption.None, target & ClientOption.Clobber);
8181
Assert.AreEqual(ClientOption.None, target & ClientOption.Compress);
@@ -85,7 +85,7 @@ public void ClientOptionEnumConstructorTest()
8585
Assert.AreEqual(ClientOption.None, target & ClientOption.AltSync);
8686

8787
target = new ClientOptionEnum(v42);
88-
Assert.AreNotEqual(ClientOption.None, target);
88+
Assert.AreNotEqual<ClientOption>(ClientOption.None, target);
8989
Assert.AreNotEqual(ClientOption.None, target & ClientOption.AllWrite);
9090
Assert.AreEqual(ClientOption.None, target & ClientOption.Clobber);
9191
Assert.AreNotEqual(ClientOption.None, target & ClientOption.Compress);
@@ -95,7 +95,7 @@ public void ClientOptionEnumConstructorTest()
9595
Assert.AreEqual(ClientOption.None, target & ClientOption.AltSync);
9696

9797
target = new ClientOptionEnum(v21);
98-
Assert.AreNotEqual(ClientOption.None, target);
98+
Assert.AreNotEqual<ClientOption>(ClientOption.None, target);
9999
Assert.AreEqual(ClientOption.None, target & ClientOption.AllWrite);
100100
Assert.AreNotEqual(ClientOption.None, target & ClientOption.Clobber);
101101
Assert.AreEqual(ClientOption.None, target & ClientOption.Compress);
@@ -105,7 +105,7 @@ public void ClientOptionEnumConstructorTest()
105105
Assert.AreEqual(ClientOption.None, target & ClientOption.AltSync);
106106

107107
target = new ClientOptionEnum(v64);
108-
Assert.AreNotEqual(ClientOption.None, target);
108+
Assert.AreNotEqual<ClientOption>(ClientOption.None, target);
109109
Assert.AreNotEqual(ClientOption.None, target & ClientOption.AllWrite);
110110
Assert.AreNotEqual(ClientOption.None, target & ClientOption.Clobber);
111111
Assert.AreNotEqual(ClientOption.None, target & ClientOption.Compress);
@@ -132,7 +132,7 @@ public void ParseTest()
132132
{
133133
ClientOptionEnum target = new ClientOptionEnum(ClientOption.None);
134134
target.Parse(v0);
135-
Assert.AreEqual(target, ClientOption.None);
135+
Assert.AreEqual<ClientOption>(target, ClientOption.None);
136136
Assert.AreEqual(ClientOption.None, target & ClientOption.AllWrite);
137137
Assert.AreEqual(ClientOption.None, target & ClientOption.Clobber);
138138
Assert.AreEqual(ClientOption.None, target & ClientOption.Compress);
@@ -141,7 +141,7 @@ public void ParseTest()
141141
Assert.AreEqual(ClientOption.None, target & ClientOption.RmDir);
142142

143143
target.Parse(v42);
144-
Assert.AreNotEqual(ClientOption.None, target);
144+
Assert.AreNotEqual<ClientOption>(ClientOption.None, target);
145145
Assert.AreNotEqual(ClientOption.None, target & ClientOption.AllWrite);
146146
Assert.AreEqual(ClientOption.None, target & ClientOption.Clobber);
147147
Assert.AreNotEqual(ClientOption.None, target & ClientOption.Compress);
@@ -150,7 +150,7 @@ public void ParseTest()
150150
Assert.AreEqual(ClientOption.None, target & ClientOption.RmDir);
151151

152152
target.Parse(v21);
153-
Assert.AreNotEqual(ClientOption.None, target);
153+
Assert.AreNotEqual<ClientOption>(ClientOption.None, target);
154154
Assert.AreEqual(ClientOption.None, target & ClientOption.AllWrite);
155155
Assert.AreNotEqual(ClientOption.None, target & ClientOption.Clobber);
156156
Assert.AreEqual(ClientOption.None, target & ClientOption.Compress);
@@ -159,7 +159,7 @@ public void ParseTest()
159159
Assert.AreNotEqual(ClientOption.None, target & ClientOption.RmDir);
160160

161161
target.Parse(v64);
162-
Assert.AreNotEqual(ClientOption.None, target);
162+
Assert.AreNotEqual<ClientOption>(ClientOption.None, target);
163163
Assert.AreNotEqual(ClientOption.None, target & ClientOption.AllWrite);
164164
Assert.AreNotEqual(ClientOption.None, target & ClientOption.Clobber);
165165
Assert.AreNotEqual(ClientOption.None, target & ClientOption.Compress);

p4api.net-unit-test/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"LinuxP4dPath": "/home/mount/p4-bin/bin.linux26x86_64/p4d",
99
"LinuxTarPath": "/bin/tar",
1010
"OsxTestDirectory": "/tmp/MyTestDir",
11-
"OsxP4dPath": "/Users/admin/p4d/r23.2/p4d",
11+
"OsxP4dPath": "/Users/admin/p4d/r24.1/p4d",
1212
"OsxTarPath": "/usr/bin/tar",
1313
"ServerPort": "localhost:3666"
1414
}

p4api.net-unit-test/p4api.net-unit-test.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
</PropertyGroup>
2929
<ItemGroup>
3030
<PackageReference Include="NLog" Version="4.7.9" />
31-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
32-
<PackageReference Include="MSTest.TestAdapter" Version="2.2.3" />
33-
<PackageReference Include="MSTest.TestFramework" Version="2.2.3" />
31+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
32+
<PackageReference Include="MSTest.TestAdapter" Version="3.4.3" />
33+
<PackageReference Include="MSTest.TestFramework" Version="3.4.3" />
3434
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0-preview.6.21352.12" />
3535
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0-preview.6.21352.12" />
3636
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0-preview.6.21352.12" />
37-
<PackageReference Include="coverlet.collector" Version="3.0.3">
37+
<PackageReference Include="coverlet.collector" Version="6.0.2">
3838
<PrivateAssets>all</PrivateAssets>
3939
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4040
</PackageReference>

p4api.net/BranchSpec.cs

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3737
using System.Collections.Generic;
3838
using System.Linq;
3939
using System.Text;
40+
using System.Xml.Linq;
4041

4142
namespace Perforce.P4
4243
{
@@ -251,22 +252,7 @@ public void FromBranchSpecCmdTaggedOutput(TaggedObject objectInfo)
251252
else
252253
Locked = false;
253254

254-
int idx = 0;
255-
string key = String.Format("View{0}", idx);
256-
if (objectInfo.ContainsKey(key))
257-
{
258-
ViewMap = new ViewMap();
259-
while (objectInfo.ContainsKey(key))
260-
{
261-
ViewMap.Add(objectInfo[key]);
262-
idx++;
263-
key = String.Format("View{0}", idx);
264-
}
265-
}
266-
else
267-
{
268-
ViewMap = null;
269-
}
255+
ViewMap = Utility.GetViewMapEntries(objectInfo);
270256
}
271257
#endregion
272258

@@ -423,7 +409,7 @@ public bool Parse(String spec)
423409
$"{Environment.NewLine}" +
424410
$"Options:\t{{5}}{Environment.NewLine}" +
425411
$"{Environment.NewLine}" +
426-
$"View:{Environment.NewLine}\t{{6}}{Environment.NewLine}";
412+
$"View:{Environment.NewLine}\t{{6}}\n";
427413

428414

429415
/// <summary>
@@ -433,8 +419,10 @@ public bool Parse(String spec)
433419
override public String ToString()
434420
{
435421
String viewStr = String.Empty;
436-
if (ViewMap != null)
437-
viewStr = ViewMap.ToString().Replace($"{Environment.NewLine}", $"{Environment.NewLine}\t").Trim();
422+
if (ViewMap != null)
423+
{
424+
viewStr = ViewMap.ToString().Replace($"{Environment.NewLine}", $"\n\t").Trim();
425+
}
438426
String OptionsStr = string.Empty;
439427
if (Locked)
440428
{

p4api.net/BridgeInterfaceClasses.cs

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public enum ErrorGeneric : int
214214
/// Error Subsystem Categories
215215
/// </summary>
216216
public enum ErrorSubsystem : int
217-
{
217+
{
218218
/// <summary>
219219
/// OS error
220220
/// </summary>
@@ -230,11 +230,11 @@ public enum ErrorSubsystem : int
230230
/// <summary>
231231
/// Messaging
232232
/// </summary>
233-
ES_RPC = 3,
233+
ES_RPC = 3,
234234
/// <summary>
235235
/// Database
236236
/// </summary>
237-
ES_DB = 4,
237+
ES_DB = 4,
238238
/// <summary>
239239
/// Database support
240240
/// </summary>
@@ -274,8 +274,32 @@ public enum ErrorSubsystem : int
274274
/// <summary>
275275
/// P4V and other Qt based clients
276276
/// </summary>
277-
ES_P4QT = 14
278-
} ;
277+
ES_P4QT = 14,
278+
/// <summary>
279+
/// P4X3 server
280+
/// </summary>
281+
ES_X3SERVER = 15,
282+
/// <summary>
283+
/// Graph depot messages
284+
/// </summary>
285+
ES_GRAPH = 16,
286+
/// <summary>
287+
/// Scripting
288+
/// </summary>
289+
ES_SCRIPT = 17,
290+
/// <summary>
291+
/// Server Overflow
292+
/// </summary>
293+
ES_SERVER2 = 18,
294+
/// <summary>
295+
/// DM overflow
296+
/// </summary>
297+
ES_DM2 = 19,
298+
/// <summary>
299+
/// Help for configurables
300+
/// </summary>
301+
ES_CONFIG = 20
302+
};
279303

280304
/*******************************************************************************
281305
* P4ClientError

p4api.net/Client.cs

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3838
using System.Globalization;
3939
using System.Linq;
4040
using System.Runtime.CompilerServices;
41+
using System.Text;
4142

4243
[assembly: InternalsVisibleTo("p4api.net-unit-test, PublicKey=00240000048000009400000006020000002400005253413100040000010001005bd58b86ff0b4ac3872932400b9b4da1d7d72faad9c7a37cc1c9c3d9a89d7de24f260d07fe676146196ef8f1e5b5dc49d2eaa0347780454b82afb9502d15730858f0acc35cfd20285d4aa924b2edb55cb56846a2c3cbe2d65303b45c9dd737e6f81fec00d5c5f3c66e1335bc36d1ad13bea44851d35d65d08bee5aacf9e409b2")]
4344

@@ -742,24 +743,9 @@ public void FromClientCmdTaggedOutput(TaggedObject workspaceInfo)
742743
}
743744
}
744745

745-
idx = 0;
746-
key = String.Format("View{0}", idx);
747-
if (workspaceInfo.ContainsKey(key))
748-
{
749-
ViewMap = new ViewMap();
750-
while (workspaceInfo.ContainsKey(key))
751-
{
752-
ViewMap.Add(workspaceInfo[key]);
753-
idx++;
754-
key = String.Format("View{0}", idx);
755-
}
756-
}
757-
else
758-
{
759-
ViewMap = null;
760-
}
761-
762-
idx = 0;
746+
ViewMap = Utility.GetViewMapEntries(workspaceInfo);
747+
748+
idx = 0;
763749
key = String.Format("ChangeView{0}", idx);
764750
if (workspaceInfo.ContainsKey(key))
765751
{

0 commit comments

Comments
 (0)