anchor.diff:        end
     end.
   
  -% Attempt to extract the type of the vcs from the url
  +%% Attempt to extract the type of the vcs from the url
   check_type_from_the_url_string(_Str, []) -> unknown;
   check_type_from_the_url_string(Str, [H|Rest]) ->
     case string:str(Str, H) of
  
positive.code:       {ok, PidFilename, PidIo} = temp_file(),
        file:close(PidIo),
  
        CmdProcessPid = spawn(fun() ->
          {ok, ScriptFilename, ScriptIo} = temp_file(),
          file:write(ScriptIo, StartScript),
          try
            {Pid, _Ref, _Tag} =
              async_command("/bin/sh",
                            [ScriptFilename],
                            BeeDir,
                            [{pidfile, PidFilename}|to_proplist(BeeObject)],
                            From,
                            fun(Tuple) -> log_shell_output(Tuple, Name) end),
            %% Because we are spawning off into a new process, we also
            %% want to make sure we can connect to the newly spawned
            %% bee. Here we'll spawn off a connector process
            BuiltBee = bees:from_bee_object(BeeObject, App),
            Bee = BuiltBee#bee{host = bh_host:myip()},
            app_manager:spawn_update_bee_status(Bee, self(), 200),
            %% Now, let's wait to make sure that the spawn comes back
            %% with a success.  If it does come back that it can be
            %% connected to, then we know it's started, let's grab the
            %% pid file and report back to the caller that the object has
            %% started
            Continue = receive
              {updated_bee_status, ready} ->
                OPid = case read_pid_file_or_retry(PidFilename, 500) of
                  {error, _} ->
                    read_pid_file_or_retry(PidFilename, 500),
                    true;
                  PidInt -> PidInt
                end,
                RealBeeObject = BeeObject#bee_object{os_pid = OPid, template = Type},
                write_info_about_bee(RealBeeObject),
                send_to(Self, {started_bee_object, RealBeeObject}),
                RealBeeObject;
              {updated_bee_status, _otherstatus} = T ->
                send_to(Self, {stopped, {error, T}}),
                run_kill_on_pid(unused, BeeDir, BeeObject),
                false;
              X ->
                erlang:display({received, X, after_spawn}),
                false
              after ?APP_PING_TIMEOUT ->
                run_kill_on_pid(unused, BeeDir, BeeObject),
                false
            end,
            file:delete(ScriptFilename),
            file:delete(PidFilename),
            case Continue of
              #bee_object{os_pid = OsPid} = RBeeObject when is_record(RBeeObject, bee_object) ->
                ?LOG(debug, "successfully started and taking over ~p", [Name]),
                takeover_process_by_monitor(Name, Pid, OsPid, BeeDir, RBeeObject, From);
              false ->
                erlang:display({dont,continue,Continue}),
                Self ! {stopped, {error, "Timeout in starting"}},
                stopped
              end
            after
              % Just in case
              file:delete(ScriptFilename)
            end
        end),
        F = fun(This) ->
          receive
            {started_bee_object, SentRealBeeObject} -> From ! {started, SentRealBeeObject#bee_object{pid = CmdProcessPid}};
            {stopped, {error, _Reason}} = T -> From ! T;
            _X -> This(This)
          after ?APP_PING_TIMEOUT ->
            From ! {error, app_ping_timeout}
          end
        end,
        F(F)
    end.
  
  stop(Name) -> stop(Name, undefined).
  stop(#bee{pid = Pid} = Bee, From) when is_record(Bee, bee) ->
    stop(Pid, From);
  stop(#bee_object{pid = Pid} = BeeObject, From) when is_record(BeeObject, bee_object) ->
    stop(Pid, From);
  stop(Pid, From) when is_pid(Pid) ->
    send_to(Pid, {stop, self()}),
  
negative.code:   end.
  
  
  %% Run in the directory given in the proplists
  %% Action
  %% Props
  run_action_in_directory(Action,
                          #bee_object{bundle_dir = BundleDir} = BeeObject,
                          From) ->
  