Skip to content

Instantly share code, notes, and snippets.

@garymcleanhall
Last active March 1, 2017 17:21
Show Gist options
  • Save garymcleanhall/59c901bd8d06dab957ec64c9e52405de to your computer and use it in GitHub Desktop.
Save garymcleanhall/59c901bd8d06dab957ec64c9e52405de to your computer and use it in GitHub Desktop.
echo off
REM PARAMS: $BASE $LOCAL $REMOTE $MERGED
set base=%1
set local=%2
set remote=%3
set merged=%4
set nul="nul"
set emptyfile="%userprofile%/.empty"
set p4mergepath="c:/program files/perforce/p4merge.exe"
if "%local%" == "%nul%" (
set local=%emptyfile%
)
if "%remote%" == "%nul%" (
set local=%emptyfile%
)
call %p4mergepath% %base% %local% %remote% %merged%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment