Skip to content

Instantly share code, notes, and snippets.

@hewigovens
Created September 4, 2011 12:38
Show Gist options
  • Save hewigovens/1192801 to your computer and use it in GitHub Desktop.
Save hewigovens/1192801 to your computer and use it in GitHub Desktop.
perforce auto integration
@echo off
echo setting perforce env ...
rem set below variables in conformity with your environments.
set P4PORT=
set P4_HOME=
set REMOTE_DEV_TREE=
set REMOTE_INT_TREE=
set LOCAL_DEV_TREE=
set LOCAL_INT_TREE=
set P4CLIENT=
set P4PASSWD=
rem set P4EDITOR=""
PATH=%P4_HOME%;%PATH%
echo start integrating from %REMOTE_DEV_TREE% to %REMOTE_INT_TREE% ...
echo %P4PASSWD%>pwd.tmp
echo.>>pwd.tmp
p4.exe login -a <pwd.tmp
del pwd.tmp
rem using existing workspace
rem p4.exe client -i<p4_client.txt
p4.exe client %P4CLIENT%
p4.exe -c %P4CLIENT% integrate -i %REMOTE_DEV_TREE% %REMOTE_INT_TREE%
p4.exe -c %P4CLIENT% resolve -at
p4.exe -c %P4CLIENT% submit -d "daily integrate"
echo integrating complete.
echo start syncing local Dev and Int trees...
p4.exe -c %P4_CLIENT% sync %LOCAL_DEV_TREE%
p4.exe -c %P4_CLIENT% sync %LOCAL_INT_TREE%
echo syncing local Dev and Int trees complete.
@shwangdev
Copy link

用bash写个,我在linux 上用

@hewigovens
Copy link
Author

基本上原样改写就行了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment