The situation happens when the files / dirs are spread under separate branches, for example when viewing recording and it creates resume file on different branch. Maybe that could avoided with creating policies?
It handles the situation where same dir exists in both branches by doing copyup. Maybe some checking should be added that dir really exists.
#!/bin/bash
echo Renaming $1
mv $1 ${1%.rec}.del
echo touch .update
touch /video/.update
echo done