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
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
## Overview
4
4
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.
5
+
`p4harmonize` is a tool for mirroring a stream's head revision from one perforce server to another. This includes reconciling files, fixing differences in file name/path capitalization, fixing the file type, and fixing improperly checked in %AppleDouble files.
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/#integrating,merging,andbranching). At Proletariat, we have different names, but the purposes are the same:
7
+
`p4harmonize` was built with Unreal Engine source 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
--- | ---
@@ -40,11 +40,11 @@ new_client_root = "d:/p4/local/harmonize" # this will be created by p4harmonize
40
40
new_client_stream = "//test/engine_epic"# this needs to already exist
41
41
```
42
42
43
-
`p4harmonize` connects to each server, requests file lists from each, and determines what work needs to be done. If everything is already in sync, then it reports that back to the user and ends. If there is work to be done, then it creates a changelist and begins adding its fixes to it.
43
+
`p4harmonize` connects to each server, requests file lists from each, and determines what work needs to be done. If everything is already in sync, then it quickly reports the status and stops. If there is work to be done, then it creates a changelist and begins adding its fixes to it.
44
44
45
45
While it runs, it outputs status updates and every individual `p4` command it is running so you can follow along.
46
46
47
-
When it is done, there will be a changelist that must be submitted by hand. This gives you an opportunity to sanity check the changes before they are committed.
47
+
When it is done, there will be a changelist that must be submitted by hand, giving you a chance to sanity check the work.
48
48
49
49
## Runtime requirements
50
50
@@ -67,7 +67,7 @@ When it is done, there will be a changelist that must be submitted by hand. This
- Open a bash prompt in the created `p4harmonize` folder and run`scripts/setup.sh`
70
+
- Open a bash prompt in the `p4harmonize` folder that git created in the previous step and run `scripts/setup.sh`
71
71
- This ensures Go is installed and ready
72
72
- This builds [Mage](https://magefile.org) into your $GOPATH/bin folder
73
73
@@ -88,28 +88,29 @@ Targets:
88
88
89
89
### Mage usage notes
90
90
91
-
- If your shell can't find `mage`, then you can try
92
-
- re-run `scripts/setup.sh` (or `scripts/reinstall-mage.sh`), which creates a `mage` executable in your `$GOPATH/bin`
93
-
- ensure you have a `$GOPATH/bin` folder, and that it has been added to your `$PATH` environment variable
91
+
- If your shell can't find `mage`
92
+
- make sure your `$GOPATH/bin` folder is in your `$PATH`
93
+
- make sure there's a `mage` executable in your `$GOPATH/bin` folder
94
+
- if `mage` is missing, then re-run `scripts/setup.sh`
94
95
- Mage targets are not case sensitive, so `mage longTest` and `mage longtest` will run the same target.
95
-
- 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).
96
96
97
97
## Contributing
98
98
99
-
Before opening a pull request, please run `mage longtest`, which will run all tests, including functional tests that spin up two Perforce servers in Docker, populate each with some test files, then runs p4harmonize against them, and validates the results.
99
+
Before opening a pull request, please run `mage longtest`, which spins up two Perforce servers via Docker, places test files in them, then runs p4harmonize and validates the results.
100
100
101
-
Once you have a passing longtest, feel free to open a PR. Please include a quick description of the problem your PR solves in the PR description.
101
+
Once `longtest` is passing, feel free to open a PR. Please include a quick description of the problem your PR solves in the PR description. If your PR includes performance improvements, please include benchmark numbers and an explanation of how to reproduce those numbers.
102
102
103
103
### Debugging longtest
104
104
105
-
Unfortunately the specifics of `longtest`are a bit gross at the moment, and while I hope to one day have time to go in and clean things up, for now it is an all or nothing pass/fail, and so debugging often requires going in and temporarily altering it to focus on the specific behavior that is failing. See the`func LongTest()` in `magefile.go`.
105
+
Unfortunately `longtest`is a bit gross at the moment, and while I hope to one day have time to go in and break it out into individual test cases, for now it is an all or nothing pass/fail. Debugging failures often requires temporarily altering the bash scripts and/or connecting perforce clients directly to the docker servers to find and fix the specific behavior that is failing. A good starting point is to read through`func LongTest()` in `magefile.go`.
106
106
107
107
## Special Thanks!
108
108
109
-
Thanks to [Bohdon Sayre](https://github.com/bohdon) and [Jørgen P. Tjernø](https://github.com/jorgenpt) for contributing time and code to help me fix my bugs and improve performance!
109
+
Thanks to [Bohdon Sayre](https://github.com/bohdon) and [Jørgen P. Tjernø](https://github.com/jorgenpt) for contributing time and code to help me fix my bugs and dramatically improve performance!
110
110
111
111
## TODO:
112
112
113
113
- clean up output to be more readable
114
114
- make longtest less gross to work with/debug
115
-
- test on other platforms (only tested on Windows so far)
0 commit comments