By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!@ECHO OFF
IF NOT "%@Eval[2 + 2]%" == "4" (ECHO TCC/LE [http://www.jpsoft.com/] is needed to execute this script. & EXIT /B 1)
SETLOCAL
SET in_Files=%@If[%@Len[%[1]] != 0,%[1],*]
SET in_Comment=%@If[%@Len[%[2]] != 0,%[2],"Check-out by Checkout_Files.cmd"]
PUSHD "%@PATH[%@FULL[%[in_Files]]]"
ECHO ^e[42mCheckout Files: ^e[43m%[in_Files]^e[m
DO I IN %@FILENAME[%[in_Files]]
cleartool checkout -unreserved -ptime -comment %[in_Comment] "%[I]"
ENDDO
POPD
ENDLOCAL
@ECHO OFF
IF NOT "%@Eval[2 + 2]%" == "4" (ECHO TCC [http://www.jpsoft.com/] is needed to execute this script. & EXIT /B 1)
SETLOCAL
SET in_Directory=%@If[%@Len[%[1]] != 0,%[1],.]
SET in_Comment=%@If[%@Len[%[2]] != 0,%[2],"Check-out by Checkout_Tree.cmd"]
cleartool checkout -unreserved -ptime -comment %[in_Comment] "%[in_Directory]"
PUSHD %[in_Directory]
ECHO ^e[42mCheckout Tree: ^e[43m%[in_Directory]^e[m
DO Line IN /P cleartool ls -recurse -short -nxname -vob_only
cleartool checkout -unreserved -ptime -comment %[in_Comment] "%[Line]"
ENDDO
POPD
ENDLOCAL
@ECHO OFF
IF NOT "%@Eval[2 + 2]%" == "4" (ECHO TCC/LE [http://www.jpsoft.com/] is needed to execute this script. & EXIT /B 1)
SETLOCAL
SET in_Files=%@If[%@Len[%[1]] != 0,%[1],*]
SET in_Comment=%@If[%@Len[%[2]] != 0,%[2],"Check-in in by Checkin_Files.cmd"]
PUSHD "%@PATH[%@FULL[%[in_Files]]]"
ECHO ^e[42mCheckin Files: ^e[43m%[in_Files]^e[m
DO I IN %@FILENAME[%[in_Files]]
IFF %@Exec[cleartool diff -predecessor "%[I]" 1>/dev/nul 2>/dev/nul] THEN
cleartool checkin -ptime -comment %[in_Comment] "%[I]"
ELSE
cleartool uncheckout -rm "%[I]"
ENDIFF
ENDDO
POPD
ENDLOCAL
@ECHO OFF
IF NOT "%@Eval[2 + 2]%" == "4" (ECHO TCC/LE [http://www.jpsoft.com/] is needed to execute this script. & EXIT /B 1)
SETLOCAL
SET in_Directory=%@If[%@Len[%[1]] != 0,%[1],.]
SET in_Comment=%@If[%@Len[%[2]] != 0,%[2],"Check-in in by Checkin_Tree.cmd"]
PUSHD %[in_Directory]
ECHO ^e[42mCheckin Tree: ^e[43m%[in_Directory]^e[m
DO Line IN /P cleartool lscheckout -recurse -short -me
IFF %@Exec[cleartool diff -predecessor "%[Line]" 1>/dev/nul 2>/dev/nul] THEN
cleartool checkin -ptime -comment %[in_Comment] "%[Line]"
ELSE
cleartool uncheckout -rm "%[Line]"
ENDIFF
ENDDO
POPD
ENDLOCAL
@ECHO OFF
IF NOT "%@Eval[2 + 2]%" == "4" (ECHO TCC/LE [http://www.jpsoft.com/] is needed to execute this script. & EXIT /B 1)
ON ERROR QUIT
SETLOCAL
ON BREAK GOTO Catch
ON ERROR GOTO Catch
SET in_Directory=%@If[%@Len[%[1]] != 0,%[1],.]
SET in_Comment=%@If[%@Len[%[2]] != 0,%[2],"Added by Add_Tree.cmd"]
SET Basename=%@Name[%@Full[%[in_Directory]]]
PUSHD %[in_Directory]\..
::
:: Note: You cannot add the current directory!
::
SET Info=%@ExecStr[cleartool ls -directory .]
IFF %@Index[%[Info],CHECKEDOUT,0] == 0 THEN
ECHO ^e[42mCheckout Directory: ^e[43m%[_CWD]^e[m
cleartool checkout -comment %[in_Comment] "."
ENDIFF cleartool checkout -comment %[in_Comment] .
SET Info=%@ExecStr[cleartool ls -directory "%[Basename]"]
IFF %@Index[%[Info],Rule:,0] == 0 THEN
ECHO ^e[42mAdding Directory: ^e[43m%[_CWDS]%[Basename]^e[m
cleartool mkelem -mkpath -comment %[in_Comment] "%[Basename]"
ELSEIFF %@Index[%[Info],CHECKEDOUT,0] == 0 THEN
ECHO ^e[42mCheckout Directory: ^e[43m%[_CWDS]%[Basename]^e[m
cleartool checkout -comment %[in_Comment] "%[Basename]"
ENDIFF
POPD
PUSHD %[in_Directory]
DO I IN /S /A:+D *
SET Info=%@ExecStr[cleartool ls -directory "%[I]"]
IFF %@Index[%[Info],Rule:,0] == 0 THEN
ECHO ^e[42mAdding Directory: ^e[43m%[_CWDS]%[I]^e[m
cleartool mkelem -mkpath -comment %[in_Comment] "%[I]"
ELSEIFF %@Index[%[Info],CHECKEDOUT,0] == 0 THEN
ECHO ^e[42mCheckout Directory: ^e[43m%[_CWDS]%[I]^e[m
cleartool checkout -comment %[in_Comment] "%[I]"
ENDIFF
ENDDO
DO I IN /S /A:-D *
SET Info=%@ExecStr[cleartool ls "%[I]"]
IFF %@Index[%[Info],Rule:,0] == 0 THEN
ECHO ^e[46mAdding File: ^e[43m%[_CWDS]%[I]^e[m
cleartool mkelem -comment %[in_Comment] "%[I]"
ENDIFF
ENDDO
POPD
ENDLOCAL
QUIT 0
:Catch
ECHO Ein Fehler ist aufgetreten.
ECHO return code: %[_?]
ECHO system error: %[_SYSERR]: %@ErrText[%_SYSERR]
ENDLOCAL
CANCEL 1