merge the tree id and branch id