sync-public.sh: new method to determine public rev