def get_revision_by_branch(self, app_name, branch_name, app_path):
        with lcd(os.path.join(os.path.abspath('.'), app_name)):
            revision_id = local(self.cmd_revision_by_branch % dict(
                branch_name=branch_name), capture=True)
            if not revision_id: