Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Keeping content updated across branches
JackIntheBox
What is the best method for keeping 2 branches in sync?? I have one branch called Products and a sub branch called Prod_Development. I want to keep the Products branch constantly updated whenever any submission to the staging area of the Prod_Development occurs. I would be grateful if someone could provide me with a script that achieves this or at least provide me with pointers in writing one.
Find more posts tagged with
Comments
Adam Stoller
I recommend you use a workflow - basically after the submittask operates on the child branch, then perform potentially 2 updatetasks (see below) followed by another submittask on the parent branch.
You basically want to copy the files from the sub-branch to the parent-branch, but doing so means you have to put them into a workarea on the parent-branch - and basically you'd like to make sure that the workarea on the parent branch is in sync with the staging area of the parent branch before you try to get it in sync with the staging (or workarea) on the sub-branch. Got it?
So first you have an updatetask who's srcareavpath is the parent-branch's staging area, and who's areavpath is the parent-branch's workarea ("sync_wa") - and for that you'd generally want it to be set to overwrite files in the target area (*more on this below*)
You then want another updatetask who's srcareavpath is the staging area of the sub-branch (or workarea of the sub-branch) and who's areavpath is still the workarea of the parent-branch ("sync_wa")
Once that's completed - you perform a submittask with the areavpath being sync_wa.
** Caveat: You may want to institute some kind of locking / delay sequence so that you don't accidently update (with override) the sync_wa with one submission while a previous submission is still being processed. You could potentially do this with an externaltask that does some lock checking and if it can't get the lock transitions to a dummytask to wait N minutes and try again (repeatedly) - or you might use an externaltask to create a new sync_wa_**** workarea on the fly and then use CLTs or the WFtask methods to set the areavpath of the updatetask and submittask for the parent-branch appropriately.
I'd strongly reccommend drawing it all out and figuring out where the tricky parts are and then developing a solution from there.
--fish
(Interwoven, Curriculum Development)
JackIntheBox
Using the Workflow is certainly an excellent idea. I will experiment on the duration of the dummytask between updates and report back to the forum.
Using the workflow is so much simpler and flexible. Thank you very much, fish.