Recent versions of vupdate have a new "-follow-continuations" flag. This allows the user to set a "continued-in" attribute on a version container such as a session directory to tell vupdate to update to versions in a different location.

A common use of this is to allow updating from a non-exclusive session to a later version which incorporates those changes. If you're using the vmerge script, you can easily detect when a newly checked-in version incorporates the changes from a non-exclusive session.

The following script is designed to run as a vcheckin post-trigger to set a "continued-in" attribute on a session directory that has been merged into the checked-in version.

# Loop over any versions merged into this checkout
for version in `vattrib -g merged-versions $VESTA_NEW_VERSION`; do
  # Check to see if it's in a non-exclusive session
  session=`dirname $version`
  if vattrib -q -i type session $session; then
    vattrib -q -G new-version $session > /dev/null 2>&1
    if [ $? -ne 0 ]; then
      echo "Setting continued-in of $session"
      vattrib -s continued-in $VESTA_NEW_VERSION $session
    fi
  fi
done

There are some obvious variations on this that could be written: