VOBSTORE=/home/clearcase/vobs
VOBEXT=.vob
VOBBASE=/vobs
VOB=HLTest01
VIEW=vdsl_main
VIEWSTORE=/home/clearcase/views
VIEWEXT=.vws
TOPDIR=$VOBBASE/$VOB
CC_VOB_PREFIX=$TOPDIR
CC_TEST_MODE=$TOPDIR
CC_LINK_VOB=$CC_VOB_PREFIX
# Start with an empty view in an empty VOB.
VIEW=vdsl_main
RMVIEW
VIEW=vdsl_b1
RMVIEW
VIEW=vdsl_b2
RMVIEW
RMVOB
MKVOB
VIEW=vdsl_main
CS="element $VOBBASE/$VOB/... CHECKEDOUT__N__element $VOBBASE/$VOB/... /main/LATEST"
MKVIEW
VIEW=vdsl_b1
CS="element $VOBBASE/$VOB/... CHECKEDOUT__N__element $VOBBASE/$VOB/... .../b1/LATEST__N__element $VOBBASE/$VOB/... /main/LATEST -mkbranch b1__N__element $VOBBASE/$VOB/... /main/0 -mkbranch b1"
MKVIEW
VIEW=vdsl_b2
CS="element $VOBBASE/$VOB/... CHECKEDOUT__N__element $VOBBASE/$VOB/... .../b2/LATEST__N__element $VOBBASE/$VOB/... /main/LATEST -mkbranch b2__N__element $VOBBASE/$VOB/... /main/0 -mkbranch b2"
MKVIEW
TITLE=BasicAdd
VIEW=vdsl_main
ACTION_ID=1A
SCRIPT:
cd $TOPDIR
cleartool co -nc .
cleartool mkdir -nc HL
cleartool mkdir -nc HL/Base
echo Source line 1 > HL/Base/Source
cleartool mkelem -nc HL/Base/Source
cleartool ci -c "ACTION $ACTION_ID: Added file HL/Base/Source." __MACRO_ALL_FILES__
RUN
ACTION_ID=1B
SCRIPT:
cd $TOPDIR
cleartool co -nc HL
cleartool mkdir -nc HL/Copy1
cd $TOPDIR/HL/Copy1
cleartool ln -nc $TOPDIR/HL/Base/Source Source
cleartool ci -c "ACTION $ACTION_ID: Added hard link in HL/Copy1 to HL/Base/Source." __MACRO_ALL_FILES__
RUN
ACTION_ID=1C
SCRIPT:
cd $TOPDIR
cleartool co -nc HL
cleartool mkdir -nc HL/Copy2
cd $TOPDIR/HL/Copy2
cleartool ln -nc $TOPDIR/HL/Copy1/Source Source
cleartool ci -c "ACTION $ACTION_ID: Added hard link in HL/Copy2 to HL/Copy1/Source. Yes, you can do this." __MACRO_ALL_FILES__
RUN
ACTION_ID=1D
SCRIPT:
cd $TOPDIR
cleartool co -nc HL
cleartool mkdir -nc HL/Copy3
cd $TOPDIR/HL/Copy3
cleartool ln -nc $TOPDIR/HL/Base/Source Source
cleartool ci -c "ACTION $ACTION_ID: Added hard link in HL/Copy3 to HL/Base/Source." __MACRO_ALL_FILES__
RUN
EXTRACT
CAPTURE=HL_A1
TITLE=BasicEditAndBranching
ACTION_ID=2A
SCRIPT:
cd $TOPDIR/HL/Copy2
cleartool co -nc Source
echo Copy2 line 1 > Source
cleartool ci -c "ACTION $ACTION_ID: Updated content of HL/Copy2/Source." Source
RUN
CAPTURE=HL_E1
VIEW=vdsl_b1
ACTION_ID=2B
SCRIPT:
cd $TOPDIR/HL/Base
cleartool mkbrtype -nc b1
cleartool co -nc Source
echo Source line 2 > Source
cleartool ci -c "ACTION $ACTION_ID: Edit HL/Base/Source on branch b1." Source
RUN
CAPTURE=HLb1_E1
VIEW=vdsl_b2
ACTION_ID=2C
SCRIPT:
cd $TOPDIR/HL/Copy3
cleartool mkbrtype -nc b2
cleartool co -nc Source
echo Copy3 line 1 > Source
cleartool ci -c "ACTION $ACTION_ID: Edit HL/Copy/Source on branch b2." Source
RUN
CAPTURE=HLb2_E1
VIEW=vdsl_main
CAPTURE=HL_E2
VIEW=vdsl_b1
CAPTURE=HLb1_E2
EXTRACT
TITLE=DeleteAndRename
ACTION_ID=3A
VIEW=vdsl_main
cd $TOPDIR/HL/Copy3
cleartool co -nc .
cleartool rm Source
cleartool ci -c "ACTION $ACTION_ID: Delete HL/Copy3/Source." .
RUN
CAPTURE=HL_DR1
VIEW=vdsl_b1
CAPTURE=HLb1_DR1
VIEW=vdsl_b2
CAPTURE=HLb2_DR1
ACTION_ID=3B
SCRIPT:
cd $TOPDIR/HL/Copy1
cleartool co -nc .
cleartool rm Source
cleartool ci -c "ACTION $ACTION_ID: Delete HL/Copy1/Source in branch b2." .
RUN
CAPTURE=HLb2_DR2
VIEW=vdsl_b1
CAPTURE=HLb1_DR2
VIEW=vdsl_main
CAPTURE=HL_DR2
VIEW=vdsl_b2
ACTION_ID=3C
SCRIPT:
cd $TOPDIR/HL/Copy2
cleartool co -nc .
cleartool mv Source Other_Copy2
cleartool ci -c "ACTION $ACTION_ID: Rename HL/Copy2/Source to HL/Copy2/Other_Copy2" .
RUN
CAPTURE=HLb2_DR3
VIEW=vdsl_b1
CAPTURE=HLb1_DR3
VIEW=vdsl_main
CAPTURE=HL_DR3
ACTION_ID=3D
SCRIPT:
cd $TOPDIR/HL/Base
cleartool co -nc .
cleartool mv Source Other_Base
cleartool ci -c "ACTION $ACTION_ID: Rename HL/Base/Source to HL/Base/Other_Base" .
RUN
CAPTURE=HL_DR4
VIEW=vdsl_b1
CAPTURE=HLb1_DR4
VIEW=vdsl_b2
CAPTURE=HLb2_DR4
EXTRACT
TITLE=Merge
VIEW=vdsl_main
ACTION_ID=4A
SCRIPT:
cd $TOPDIR
cleartool findmerge -all -ftag vdsl_b1 -nc -merge __MACRO_KEYBOARD_INPUT_YES__
cleartool ci -c "ACTION $ACTION_ID: Merge branch b1 back to main - all directories and files." __MACRO_ALL_FILES__
RUN
CAPTURE=HL_M1
VIEW=vdsl_b1
CAPTURE=HLb1_M1
VIEW=vdsl_b2
CAPTURE=HLb2_M1
VIEW=vdsl_main
ACTION_ID=4B
SCRIPT:
cd $TOPDIR
cleartool findmerge -all -ftag vdsl_b2 -nc -merge __MACRO_KEYBOARD_INPUT_YES__
cleartool ci -c "ACTION $ACTION_ID: Merge branch b2 back to main - all directories and files." __MACRO_ALL_FILES__
RUN
CAPTURE=HL_M2
VIEW=vdsl_b1
CAPTURE=HLb1_M2
VIEW=vdsl_b2
CAPTURE=HLb2_M2
EXTRACT
TITLE=DirAndHardLinks
VIEW=vdsl_main
ACTION_ID=5A
SCRIPT:
cd $TOPDIR
cleartool co -nc HL
cleartool mkdir -nc HL/DB
echo HL content > HL/DB/file1
echo HL content > HL/DB/file2
echo HL content > HL/DB/file3
echo HL content > HL/DB/file4
cleartool mkelem -nc HL/DB/file1 HL/DB/file2 HL/DB/file3 HL/DB/file4
cleartool ln -nc DB D1
cleartool ln -nc DB D2
cleartool ln -nc DB D3
cleartool ci -c "ACTION $ACTION_ID: Created HL/DB folder with files and 3 hard links." __MACRO_ALL_FILES__
RUN
CAPTURE=HL_DA1
EXTRACT
ACTION_ID=5B
SCRIPT:
cd $TOPDIR
cleartool co -nc -unreserved HL/DB/file1
echo DB change > HL/DB/file1
RUN
ACTION_ID=5C
SCRIPT:
cd $TOPDIR
echo QUESTION MARKER 1 - DOES THIS NEXT CHECKOUT COMMAND WORK
cleartool co -nc -unreserved HL/D1/file1
echo D1 change > HL/DB/file1
echo COMMENT Did an 'ct unco' not specified in ACTIONS.txt to avoid halting.
cleartool unco -rm HL/D1/file1
RUN
ACTION_ID=5D
SCRIPT:
cd $TOPDIR
cleartool co -nc HL/D1/file2
echo D1 change > HL/D1/file2
cleartool co -nc HL/D1
echo QUESTION MARKER 2 - DOES THIS NEXT RENAME COMMAND WORK
cleartool mv HL/D1/file1 HL/D1/rnfile1
cleartool mv HL/D2/file3 HL/D2/rnfile3
echo QUESTION MARKER 3 - DOES THIS NEXT DELETE COMMAND WORK
cleartool rm HL/D3/file1
cleartool rm HL/D3/file4
cleartool ci -c "ACTIONS 5B-5D: Renaming hard linked dirs, etc." __MACRO_ALL_FILES__
RUN
CAPTURE=HL_DA2
EXTRACT
ACTION_ID=5E
SCRIPT:
cd $TOPDIR
cleartool co -nc HL
cleartool mv HL/D1 HL/rnD1
cleartool co -nc HL/rnD1/file2
echo rnD1 change > HL/rnD1/file2
cleartool ci -c "ACTION $ACTION_ID: Rename files referencing hard linked parent dir." __MACRO_ALL_FILES__
RUN
CAPTURE=HL_DA3
EXTRACT
VIEW=vdsl_b1
ACTION_ID=5F
SCRIPT:
cd $TOPDIR
cleartool co -nc HL/D1/file2
echo HLb1 change > HL/D1/file2
echo HLb1 content > HL/D2/file5
cleartool co -nc HL/D2
cleartool mkelem -nc HL/D2/file5
cleartool co -nc HL
cleartool rmdir HL/D3
echo Doing a checkin even though it was not specified in ACTIONS.txt - guessing that was an oversight.
cleartool ci -c "ACTION $ACTION_ID: Deleting hard link dirs etc." __MACRO_ALL_FILES__
RUN
CAPTURE=HLb1_DA4
EXTRACT
VIEW=vdsl_main
ACTION_ID=5G
SCRIPT:
cd $TOPDIR
cleartool co -nc HL
cleartool rmdir HL/D2
echo Doing a checkin even though it was not specified in ACTIONS.txt - guessing that was an oversight.
cleartool ci -c "ACTION $ACTION_ID: Deleting a hard link dir." __MACRO_ALL_FILES__
RUN
CAPTURE=HL_DA5
EXTRACT
VIEW=vdsl_main
ACTION_ID=5H
SCRIPT:
cd $TOPDIR
cleartool findmerge -all -ftag vdsl_b1 -nc -merge __MACRO_KEYBOARD_INPUT_YES__
echo Doing a checkin even though it was not specified in ACTIONS.txt - guessing that was an oversight.
cleartool ci -c "ACTION $ACTION_ID: Merge branch b1 back to main." __MACRO_ALL_FILES__
RUN
CAPTURE=HL_DA6
EXTRACT
# Start assuming ACTIONS.cfg has already been processed,
# so we have a VOB and three views: vdsl_main, vdsl_b1, and vdsl_b2.
TITLE=EdgePrep
VIEW=vdsl_main
ACTION_ID=6
SCRIPT:
cd $TOPDIR
cleartool co -nc HL
cleartool mkdir -nc HL/EB
echo HL content > HL/EB/file1
echo HL content > HL/EB/file2
echo HL content > HL/EB/file3
echo HL content > HL/EB/file4
cleartool mkelem -nc HL/EB/file1
cleartool mkelem -nc HL/EB/file2
cleartool mkelem -nc HL/EB/file3
cleartool mkelem -nc HL/EB/file4
cd $TOPDIR/HL
cleartool ln -nc EB E1
cleartool mkdir -nc E2
echo E2/HL content > E2/fileA
echo E2/HL content > E2/fileB
echo E2/HL content > E2/fileC
echo E2/HL content > E2/fileD
cleartool mkelem -nc E2/fileA
cleartool mkelem -nc E2/fileB
cleartool mkelem -nc E2/fileC
cleartool mkelem -nc E2/fileD
cleartool mkdir -nc E3
cd $TOPDIR/HL/E3
clearool ln -nc ../E2/fileA fileA
clearool ln -nc ../E2/fileA fileB
clearool ln -nc ../E2/fileA fileC
clearool ln -nc ../E2/fileA fileD
cleartool ci -c "ACTION $ACTION_ID: Hard Link Edge Case Setup." __MACRO_ALL_FILES__
RUN
CAPTURE=HL_EC1
EXTRACT
TITLE=EdgeLinks2Links
VIEW=vdsl_main
ACTION_ID=7
SCRIPT:
cd $TOPDIR/HL/E3
cleartool co -nc .
cleartool ln -nc ../E2/fileA altA
cleartool ln -nc -s ../E2/fileB altB
cleartool ln -nc ../EB subEB
cleartool ln -nc ../E1 subE1
cleartool ci -c "ACTION $ACTION_ID: Link to Link Scenarios." __MACRO_ALL_FILES__
RUN
CAPTURE=HL_EC2
EXTRACT
TITLE=EdgeDeletesAndReplace
VIEW=vdsl_main
ACTION_ID=7
SCRIPT:
cd $TOPDIR/HL/E3
cleartool co -nc .
cleartool rm fileA
echo EC3 content > fileA
cleartool mkelem -nc fileA
cleartool rm fileB
cleartool ln -nc -s ../E2/fileB fileB
cleartool rm subEB
cleartool ln -nc -s ../EB subEB
cleartool rm subE1
cleartool mkdir -nc subE1
echo E3 new > subE1/foo1
echo E3 new > subE1/foo2
cleartool mkelem -nc subE1/foo1
cleartool mkelem -nc subE1/foo2
cleartool rm altB
echo E3 new > altB
cleartool mkelem -nc altB
cleartool ci -c "ACTION $ACTION_ID: Edge Link Delete and Replace Scenarios." __MACRO_ALL_FILES__
RUN
CAPTURE=HL_EC3
EXTRACT
END