Skip to content

Commit 50f9a1f

Browse files
2022.2 Patch 1 release
1 parent a08c41c commit 50f9a1f

18 files changed

Lines changed: 12713 additions & 12274 deletions

BUILD.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ With the 2021.2 release, `P4API.NET` has been extended to support .NET CORE and
88

99
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.
1010

11-
The bridge code is dependent on P4API release 21.2 or above.
11+
The bridge code is dependent on P4API release 22.2 or above.
1212

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

@@ -52,10 +52,10 @@ The *p4bridge*, *p4bridge-unit-test* and *p4bridgeStressTest* projects require c
5252
The default installation of cmake on ubuntu will require updating.
5353
to update to the latest version on ubuntu, follow package updating instructions here: [CMake APT repository](https://apt.kitware.com)
5454

55-
### Getting the P4API and openssl 1.1.1 libraries
55+
### Getting the P4API and openssl 3 libraries
5656

5757
We've included some sample setup scripts for copying the P4API and openssl libraries into their expected source subdirectories. They are found in the root p4api.net directory.
58-
look for *setuplibrary.bat*, *setuplibrary_linux.sh* and *setuplibrary_osx.sh*
58+
look for [setuplibrary.bat](./setuplibrary.bat), [setuplibrary_linux.sh](./setuplibrary_linux.sh) and [setuplibrary_osx.sh](./setuplibrary_osx.sh)
5959

6060
These scripts are just examples, they represent what I had to do to get my environment to work correctly, they will need to be edited to work in your environment.
6161

@@ -146,4 +146,4 @@ Deploy this package to a local test repository with:
146146
### List packages in the local test repository
147147

148148
`nuget list -Source c:\dev\local-nuget -PreRelease p4api.net`
149-
returns: *2021.2.xxx.yyyy*
149+
returns: *2022.2.xxx.yyyy*

RELEASENOTES.txt

Lines changed: 93 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
Release Notes for
22
P4API.NET, the Helix P4API for .NET
33

4-
Version 2021.2
4+
Version 2022.2
55

66
Introduction
77

88
This document lists all user-visible changes to P4API.NET
9-
between release 2011.1 and 2021.2
10-
11-
Limitations:
9+
between release 2011.1 and this release
1210

1311
Perforce numbers releases YYYY.R/CCCCC, e.g. 2002.1/30547.
1412
YYYY is the year; R is the release of that year; CCCCC is the
@@ -19,9 +17,37 @@ Limitations:
1917

2018
--------------------------------------------------------------------------
2119

20+
Important End-of-Life Notice
21+
22+
Cross platform support was provided with the previous release of P4API.NET.
23+
Currently 4 different Nuget packages are 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 of P4API.NET
27+
would be the last to publish all these packages. Starting with the next
28+
release, only the 'p4api.net' package would be published and
29+
other packages would be deprecated
30+
31+
--------------------------------------------------------------------------
32+
33+
Installation
34+
35+
The simplest way to install P4API.NET is using the NuGet package manager.
36+
The P4API.NET package can be found here -
37+
https://www.nuget.org/packages/p4api.net
38+
39+
More details and other options can be found in the user guide -
40+
https://www.perforce.com/manuals/p4api.net/Content/P4API_NET/release-compatibility-prereqs.html#Installation
41+
42+
--------------------------------------------------------------------------
43+
2244
Building P4API.NET from Source
2345

24-
Instructions for building are in the source code markdown (.md) files
46+
The official version of P4API.NET exists as source on:
47+
https://github.com/perforce/p4api.net
48+
49+
Instructions for building are in the BUILD.md file which can be found
50+
here - https://github.com/perforce/p4api.net/blob/master/BUILD.md
2551

2652
To build the help file project (p4api.net.shfbproj) you will need
2753
the Sandcastle Help File Builder from http://shfb.codeplex.com/.
@@ -32,10 +58,9 @@ Building P4API.NET from Source
3258
P4API.NET supports SSL connections, and requires linking with SSL
3359
libraries.
3460

35-
Executables linked against the P4API libraries must
36-
also be linked against OpenSSL libraries 1.1.1 or 1.0.2: but the 1.1.1
37-
is recommended. Use the OpenSSL libraries as mentioned
38-
in p4api.net\BUILD.md.
61+
Executables linked against the P4API libraries must also be linked
62+
against real OpenSSL libraries: The latest 3.0.x patch is recommended.
63+
Use the OpenSSL libraries as mentioned in BUILD.md.
3964

4065
P4API.NET is now dependent on NLog (http://nlog-project.org/). The
4166
related package will be installed automatically by Visual Studio
@@ -46,48 +71,48 @@ Building P4API.NET from Source
4671

4772
Compatibility Statements
4873

49-
Discontinued versions
50-
51-
2020.1 is the last release for p4api.net64.zip and
52-
p4api.net86.zip. They are obsoleted by the new p4api.net
53-
and p4api.net.core NuGet packages which work on Any CPU.
54-
2020.1 is the last release of p4api.net-src.zip on the Perforce
55-
ftp site. It is now hosted on GitHub:
56-
https://github.com/perforce/p4api.net
57-
5874
Server Compatibility
5975

6076
You can use this release of P4API.NET with any release of the
6177
Perforce server at or later than 2018.1
6278

6379
API Compatibility
6480

65-
The 2021.2 release of P4API.NET requires the 2021.2 Helix Core
66-
API for C/C++ (P4API), built with Visual Studio 2019 or later.
81+
This release of P4API.NET requires the 2022.2 Helix Core
82+
API (2022.2/2407422) for C/C++ (P4API), built with Visual Studio 2019
83+
or later.
6784

6885
C#/.NET Compatibility
6986

70-
The 2021.2 release of P4API.NET, when built from source using p4apicore.net.sln, is
71-
compatible with '.NET Framework 4.6.2', '.NET 6.0' and '.NET Standard 2.0'.
72-
Other .Net Framework, .NET Core and .NET Standard versions might work,
73-
but are not supported.
87+
This release of P4API.NET, when built from source using
88+
p4apicore.net.sln, is compatible with '.NET Framework 4.6.2',
89+
'.NET 6.0' and '.NET Standard 2.0'. Other .Net Framework, .NET Core
90+
and .NET Standard versions might work, but are not supported.
7491

7592
Platform Compatibility
7693

77-
While P4API.NET is generally usable on Windows, Linux and MacOS platforms, the
78-
release is certified only on the following platforms:
94+
While P4API.NET is generally usable on Windows, Linux and MacOS
95+
platforms, the release is certified only on the following platforms:
7996

80-
Windows 10, Windows Server 2019, Windows Server 2022, Ubuntu 20.04 and MacOS 12.2
97+
Windows
98+
Windows 10
99+
Windows Server 2019
100+
Windows Server 2022
101+
Mac OS X
102+
MacOS 12.2
103+
Linux
104+
Ubuntu 20.04
81105

82106
Compiler Compatibility
83107

84-
Details regarding compiler compatibility can be found in the source code markdown (.md)
85-
files i.e. p4api.net\BUILD.md and p4api.net\p4bridge\P4Bridge.md
108+
Details regarding compiler compatibility can be found in the source
109+
code markdown (.md) files i.e. p4api.net\BUILD.md and
110+
p4api.net\p4bridge\P4Bridge.md
86111

87112
Compatibility with Previous Releases
88113

89-
Unless otherwise stated below, the 2021.2 release of P4API.NET is
90-
API compatible with previous releases from Perforce Software.
114+
Unless otherwise stated below, this release of P4API.NET is compatible
115+
with previous releases from Perforce Software.
91116

92117
Known Limitations
93118

@@ -107,7 +132,43 @@ Key to symbols used in change notes below.
107132

108133
--------------------------------------------------------------------------
109134

110-
Bug fixed in 2021.2 Patch 5
135+
New functionality in 2022.2 Patch 1 (2022.2/2432799) (2023/04/24)
136+
137+
#2431166 (Job #115331) *
138+
Binaries of P4API.NET are now statically linked with OpenSSL 3.0.8
139+
140+
--------------------------------------------------------------------------
141+
142+
New functionality in 2022.2 (2022.2/2428247) (2023/04/13)
143+
144+
#2426141, #2424368 (Job #114276) * **
145+
Updated P4API.NET to support 2022.2 release of Helix Core
146+
147+
#2426754 (Job #106149) * **
148+
Added support for the '-P' option in IntegrateFilesCmdOptions
149+
object, thus allowing for specifying a different target stream
150+
overriding the configured parent
151+
152+
--------------------------------------------------------------------------
153+
154+
Bug fixed in 2021.2 Patch 7 (2021.2/2413698) (2023/03/02)
155+
156+
#2410204 (Job #113832) *
157+
Fixed the issue where adding the 'RevertFilesCmdFlags.Preview' (-n)
158+
flag had no impact on file reverts.
159+
160+
--------------------------------------------------------------------------
161+
162+
New functionality in 2021.2 Patch 6 (2021.2/2405588) (2023/02/10)
163+
164+
Important security note
165+
This version addresses vulnerabilities in OpenSSL (CVE-2023-0286,
166+
CVE-2023-0215, CVE-2022-4450, CVE-2022-4304) by linking in version
167+
1.1.1t of the library.
168+
169+
--------------------------------------------------------------------------
170+
171+
Bug fixed in 2021.2 Patch 5 (2021.2/2401970) (2023/02/03)
111172

112173
#2394629 *
113174
Property 'CommandTimeout' in class 'Connection' is marked as

p4api.net-unit-test/ClientTest.cs

Lines changed: 84 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3384,6 +3384,87 @@ public void ReconcileCleanTest()
33843384
}
33853385
}
33863386

3387+
/// <summary>
3388+
///A test for RevertFiles
3389+
///</summary>
3390+
[TestMethod()]
3391+
public void RevertFilesPreviewTest()
3392+
{
3393+
string uri = configuration.ServerPort;
3394+
string user = "admin";
3395+
string pass = string.Empty;
3396+
string ws_client = "admin_space";
3397+
3398+
for (int i = 0; i < 1; i++) // run once for ascii
3399+
{
3400+
Utilities.CheckpointType cptype = (Utilities.CheckpointType)i;
3401+
Process p4d = null;
3402+
Repository rep = null;
3403+
try
3404+
{
3405+
p4d = Utilities.DeployP4TestServer(TestDir, 2, cptype);
3406+
Assert.IsNotNull(p4d, "Setup Failure");
3407+
3408+
var clientRoot = Utilities.TestClientRoot(TestDir, cptype);
3409+
var adminSpace = Path.Combine(clientRoot, "admin_space");
3410+
Directory.CreateDirectory(adminSpace);
3411+
Server server = new Server(new ServerAddress(uri));
3412+
rep = new Repository(server);
3413+
Utilities.SetClientRoot(rep, TestDir, cptype, ws_client);
3414+
3415+
using (Connection con = rep.Connection)
3416+
{
3417+
con.UserName = user;
3418+
con.Client = new Client();
3419+
con.Client.Name = ws_client;
3420+
Assert.AreEqual(con.Status, ConnectionStatus.Disconnected);
3421+
Assert.AreEqual(con.Server.State, ServerState.Unknown);
3422+
Assert.IsTrue(con.Connect(null));
3423+
Assert.AreEqual(con.Server.State, ServerState.Online);
3424+
Assert.AreEqual(con.Status, ConnectionStatus.Connected);
3425+
Assert.AreEqual("admin", con.Client.OwnerName);
3426+
3427+
// test revert against all .txt files in a directory with no changelist specified
3428+
FileSpec fromFile = new FileSpec(new LocalPath(Path.Combine(adminSpace, "TestData", "*.txt")),
3429+
null);
3430+
3431+
// test revert against all files in changelist 5 (1 marked for add)
3432+
fromFile = new FileSpec(new DepotPath("//..."), null);
3433+
3434+
// Revert Preview
3435+
var sFlags = new Options(
3436+
RevertFilesCmdFlags.Preview,
3437+
5);
3438+
var rFiles = con.Client.RevertFiles(sFlags, fromFile);
3439+
Assert.IsNotNull(rFiles);
3440+
Assert.AreEqual(1, rFiles.Count);
3441+
3442+
3443+
// Revert Actual
3444+
sFlags = new Options(
3445+
RevertFilesCmdFlags.None,
3446+
5);
3447+
rFiles = con.Client.RevertFiles(sFlags, fromFile);
3448+
Assert.IsNotNull(rFiles); // That means In earlier "Revert Preview" nothing was reverted.
3449+
Assert.AreEqual(1, rFiles.Count);
3450+
3451+
// Verify nothing left after "Revert Actual"
3452+
sFlags = new Options(
3453+
RevertFilesCmdFlags.Preview,
3454+
5);
3455+
rFiles = con.Client.RevertFiles(sFlags, fromFile);
3456+
Assert.IsNull(rFiles); // That means In earlier "Revert Actual" all files in changelist got reverted.
3457+
}
3458+
}
3459+
finally
3460+
{
3461+
Utilities.RemoveTestServer(p4d, TestDir);
3462+
p4d?.Dispose();
3463+
rep?.Dispose();
3464+
}
3465+
}
3466+
}
3467+
33873468
/// <summary>
33883469
///A test for RevertFiles
33893470
///</summary>
@@ -3433,7 +3514,7 @@ public void RevertFilesTest()
34333514
FileSpec fromFile = new FileSpec(new LocalPath(Path.Combine(adminSpace, "TestData", "*.txt")),
34343515
null);
34353516
Options sFlags = new Options(
3436-
RevertFilesCmdFlags.Preview,
3517+
RevertFilesCmdFlags.None,
34373518
-1
34383519
);
34393520
IList<FileSpec> rFiles = con.Client.RevertFiles(sFlags, fromFile);
@@ -3444,7 +3525,7 @@ public void RevertFilesTest()
34443525
// test revert against all files in changelist 5 (1 marked for add)
34453526
fromFile = new FileSpec(new DepotPath("//..."), null);
34463527
sFlags = new Options(
3447-
RevertFilesCmdFlags.Preview,
3528+
RevertFilesCmdFlags.None,
34483529
5);
34493530
rFiles = con.Client.RevertFiles(sFlags, fromFile);
34503531

@@ -3458,7 +3539,7 @@ public void RevertFilesTest()
34583539

34593540
fromFile = new FileSpec(new DepotPath("//..."), null);
34603541
sFlags = new Options(
3461-
RevertFilesCmdFlags.Preview,
3542+
RevertFilesCmdFlags.None,
34623543
0);
34633544
rFiles = con.Client.RevertFiles(sFlags, fromFile);
34643545

0 commit comments

Comments
 (0)