You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-12Lines changed: 14 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
`p4harmonize` is a tool for getting the head revision of a stream on one perforce server to mirror the head revision from some other perforce server. It can reconcile files, fix differences in file name/path capitalization, fix the file type, and fix improperly checked in AppleDouble files created by the "apple" file type.
6
6
7
-
`p4harmonize` was built with Unreal Engine releases in mind, where the Epic licensee perforce server is used as the source, and a dedicated stream on a project's perforce server is used as the destination. It is intended to be used with a setup similar to [the one recommended by Epic](https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/ProgrammingWithCPP/DownloadingSourceCode/UpdatingSourceCode/#option3:usingperforce). At Proletariat, we have different names, but the purposes are the same:
7
+
`p4harmonize` was built with Unreal Engine releases in mind, where the Epic licensee perforce server is used as the source, and a dedicated stream on a project's perforce server is used as the destination. It is intended to be used with a setup similar to [the one recommended by Epic](https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/ProgrammingWithCPP/DownloadingSourceCode/UpdatingSourceCode/#integrating,merging,andbranching). At Proletariat, we have different names, but the purposes are the same:
8
8
9
9
name | description
10
10
--- | ---
@@ -14,15 +14,17 @@ name | description
14
14
15
15
## Install
16
16
17
-
There's no pre-packaged binaries at this point, so you'll need to build one yourself. To do that, you'll need [git](https://git-scm.com/downloads) and a [recent version of Go](https://golang.org/dl/), and then you can just use the [go install](https://golang.org/ref/mod#go-install) command to download, build, and put the result in your path:
17
+
You can download the latest Windows executable from the [releases page](https://github.com/proletariatgames/p4harmonize/releases), or you can build it yourself.
18
+
19
+
To build it, you'll need [git](https://git-scm.com/downloads) and a [recent version of Go](https://golang.org/dl/), and then you can just use the [go install](https://golang.org/ref/mod#go-install) command to download, build, and put the result in your path:
18
20
19
21
```text
20
22
go install github.com/proletariatgames/p4harmonize
21
23
```
22
24
23
25
## Usage
24
26
25
-
`p4harmonize` pulls configuration from a `config.toml` file, which it looks for in the current folder. You can change where it looks by passing `-config <filename>`.
27
+
`p4harmonize` pulls configuration from a `config.toml` file, which it looks for in the current working directory. You can change where it looks by passing `-config <filename>`.
26
28
27
29
Here's an example `config.toml` file:
28
30
@@ -46,7 +48,7 @@ new_client_stream = "//test/engine_epic" # this needs to already exist
46
48
47
49
While it runs, it outputs status updates and every individual `p4` command it is running so you can follow along. Note that for an Unreal Engine upgrade, this process can easily take hours to complete.
48
50
49
-
When it is done, you still need to go in and submit the changelist it created yourself. This gives you an opportunity to sanity check the work before it gets added to your Perforce depot. This also allows you to keep the destination locked until the moment you are ready to submit the changes.
51
+
When it is done, you still need to go in and submit the changelist it created yourself. This gives you an opportunity to sanity check the work before it gets added to your Perforce depot.
50
52
51
53
## Runtime requirements
52
54
@@ -62,7 +64,7 @@ When it is done, you still need to go in and submit the changelist it created yo
62
64
63
65
## Development setup
64
66
65
-
To write code and create builds, you just need the deps listed above (git, Go, p4, and bash). If you want to run the functional tests, where p4harmonize is run against two test Perforce servers, you will also need Docker. On Windows and Mac, you'll want [Docker Desktop](https://www.docker.com/products/docker-desktop), and on Linux you'll want [Docker Server](https://docs.docker.com/engine/install/#server).
67
+
To write code and create builds, you just need the deps listed above (git, Go, p4, and bash). If you want to run the functional tests, you will also need Docker. On Windows and Mac, you'll want [Docker Desktop](https://www.docker.com/products/docker-desktop), and on Linux you'll want [Docker Server](https://docs.docker.com/engine/install/#server).
66
68
67
69
Once you have all that installed, you can clone down the source code with git:
68
70
@@ -80,16 +82,16 @@ There's a `magefile.go` in the root folder that automates building/testing, and
80
82
$ mage
81
83
Targets:
82
84
build tests and builds the app (output goes to "local" folder)
83
-
longTest Runs integration tests (spins up perforce servers via docker, then brings them down at the end).
84
-
run unit tests, builds, and runs the app
85
-
testDown kills and deletes the test perforce servers.
86
-
testPrep gets everything ready for a run against test servers, and can be used to reset test servers after a test run.
87
-
testUp brings up a test environment with two perforce servers, on ports 1667 and 1668, to act as the source and destination perforce servers for testing p4harmonize.
85
+
longTest runs a fresh build of p4harmonize against test files in docker-hosted perforce servers.
86
+
run runs unit tests, builds, and runs the app
87
+
testDown brings down and removes the docker contains started by TestUp.
88
+
testPrep runs testDown, then testUp, then executes `test/prop.sh` to fill the servers with test data.
89
+
testUp brings up two empty perforce servers via Docker, listening on ports 1667 and 1668, with a single super user named "super" (no password).
88
90
```
89
91
90
-
Note that mage target names are not case sensitive, ie `mage longTest` and `mage longtest`will all do the same thing.
92
+
Note that mage target names are not case sensitive, ie `mage longTest` and `mage longtest`are interpreted the same.
91
93
92
-
If you see "No .go files marked with the mage build tag in this directory", make sure you there is a `magefile.go` in the current folder (`mage` does not look to parent folders for magefiles).
94
+
If you see `No .go files marked with the mage build tag in this directory`, make sure you there is a `magefile.go` in the current folder (Mage does not look to parent folders for magefiles).
93
95
94
96
The `build` and `run` targets will run unit tests and build an executable in a folder named `local` (which is where it will look for a `config.toml` file).
0 commit comments