# same\_as\_p4\_reconcile.py
This is a Python 3 script that's nearly the same as simply running "p4 reconcile".
I'd already started writing it before I realized what a duplication of effort it was. So, of course, I decided to memorialize it here.
To preview how a reconcile would look, issue a command like so:
same_as_p4_reconcile.py -c 48 -n source_dir/ p4_dir/
Of course, issue the command with -h or --help to learn more.
same_as_p4_reconcile.py --help
usage: same_as_p4_reconcile.py [-h] [-c CHANGELIST] [-n] source_dir p4_dir
Similar to "p4 reconcile"
positional arguments:
source_dir The newer directory outside perforce
p4_dir The perforce directory to be modified
optional arguments:
-h, --help show this help message and exit
-c CHANGELIST, --changelist CHANGELIST
Changelist to use
-n, --preview Preview only, don't change any files
### So you put a Perforce script in a Git repo?
Wait, what?
### Is it any good?
[Yes](https://news.ycombinator.com/item?id=3067434).
### Licence
This software uses the [MIT license](http://git.dlma.com/same_as_p4_reconcile.git/blob/main/LICENSE.txt).