select branch after tag or revision, fix #3242
update #3195, update #3201