Skip to content

Commit cd6ee34

Browse files
Merge pull request #102 from groboclown/refine-readme-101
Update the README to include notes on capturing output
2 parents 1e04654 + 1853d41 commit cd6ee34

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ These execution times are expected to scale as expected with larger depots (mill
8686
Specify which P4USER to use. Please ensure that the user is logged in.
8787
```
8888
89+
### Capturing Output
90+
91+
Though not required, we recommend capturing the output from standard out and standard error. This allows you to review any errors reported by the tool, and also captures the mapping between the git commit ID, git branch, and Perforce changelist.
92+
93+
With a POSIX shell, you can capture them both to the same file with:
94+
95+
```shell
96+
p4-fusion ARGUMENTS 2>&1 | tee p4-fusion.log
97+
```
98+
8999
## Notes On Branches
90100
91101
When at least one branch argument exists, the tool will enable branching mode.
@@ -131,7 +141,7 @@ A side effect of stream mapping mode is that you can use stream mappings to excl
131141
132142
In order to test the validity of the logic, we need to run the program over a Perforce depot and compare each changelist against the corresponding Git commit SHA, to ensure the files match up.
133143
134-
The provided script [validate-migration.sh](validate-migration.sh) runs through every generated Git commit, and ensures the file state exactly matches the state of the Perforce depot.
144+
The provided script [validate-migration.sh](validate-migration.sh) runs through every generated Git commit, and ensures the file state exactly matches the state of the Perforce depot. In order to run this script, you must capture the output from the p4-fusion command to a file.
135145
136146
Because of the extra effort the script performs, expect it to take orders of magnitude longer than the original p4-fusion execution.
137147
@@ -193,6 +203,12 @@ There should be a Git repo being created in the `clones/.git` directory with com
193203
194204
> Note: The Git repository is created bare i.e. without a working directory and running the same command again shall detect the last committed CL and only continue from that CL onwards. Binaries files are ignored by default and this behaviour can be changed by using the `--includeBinaries` option. We do not handle `.git` directories in the Perforce history.
195205
206+
If you wish to check your results with the [validate-migration.sh](#checking-results) script, then you will also need to capture the output from standard out. You can do that by running the command, like above, with the standard shell commands to pipe the output to a file:
207+
208+
```shell
209+
./build/p4-fusion/p4-fusion ARGUMENTS | tee p4-fusion.log
210+
```
211+
196212
## Contributing
197213
198214
Please refer to [CONTRIBUTING.md](CONTRIBUTING.md)

0 commit comments

Comments
 (0)