def push(self, args):
        """
            Push is actually only a shortcut for bzr and git push commands
            that automatically takes care of using the correct repository url.

            It queries the deployment details and uses whatever is in branch.

            If deployment exists will clear the buildpack cache if
            --clear-cache flag is set.

            If no deployment exists we automatically create one.


        """
        if not check_installed_rcs('bzr') and not check_installed_rcs('git'):
            raise InputErrorException('NeitherBazaarNorGitFound')

        if args.deploy and args.ship:
            raise InputErrorException('ShipAndDeploy')

        app_name, deployment_name = self.parse_app_deployment_name(args.name)
        deployment, push_deployment_name = self._get_or_create_deployment(app_name, deployment_name, args.clear_cache)

        cmd = self._push_cmd(deployment, push_deployment_name, args.source)

        try:
            check_call(cmd)
        except CalledProcessError, e:
            print str(e)
            sys.exit(1)

        if args.deploy:
            print
            print "Deploying newest version."
            self.redeploy(deployment)

        if args.ship:
            print
            print "Deploying newest version. Press Ctrl+C to open {0} in your browser.".format(deployment['name'])
            self.redeploy(deployment)

            try:
                self.log_from_now(app_name, deployment_name, 'deploy')
            except KeyboardInterrupt:
                print
                print "Opening in browser..."
                self._open(self._get_deployment_url(deployment))
dataset/ETHPy150Open cloudControl/cctrl/cctrl/app.py/AppController.push/original