'Check the revision options before checkout to compensate that tags
and branches may need origin/ as a prefix.
Returns the SHA1 of the branch or tag if found.'

def check_rev_options(self, rev, dest, rev_options):

    revisions = self.get_short_refs(dest)
    origin_rev = ('origin/%s' % rev)
    if (origin_rev in revisions):
        return [revisions[origin_rev]]
    elif (rev in revisions):
        return [revisions[rev]]
    else:
        logger.warning("Could    not    find    a    tag    or    branch    '%s',    assuming    commit.", rev)
        return rev_options
