anchor.diff:  %%--------------------------------------------------------------------
   handle_call({can_pull_new_app}, _From, State) ->
     {reply, true, State};
  -  
  -% pull a repos url
  -handle_call({pull_repos, AppName, Caller}, _From, State) ->
  -  case handle_repos_lookup(AppName) of
  -    {ok, ReposUrl} -> 
  -      App = apps:find_by_name(AppName), % YES, I know this needs to be optminized
  -      TempName = lists:append([handle_find_application_location(App, State), "/home/app"]),
  -      {Proplists, _Status} = ?TEMPLATE_SHELL_SCRIPT_PARSED("pull-git-repos", [
  -        {"[[GIT_REPOS]]", ReposUrl},
  -        {"[[DESTINATION]]", TempName}
  -      ]),
  -      io:format("Proplists: ~p~n", [Proplists]),
  -      Reply = case proplists:is_defined(sha, Proplists) of
  -        true -> {pulled, Proplists};
  -        false -> {error, "Could not pull git repos"}
  -      end,
  -      Caller ! Reply,
  -      {reply, Reply, State};
  -    _Else ->
  -      Reply = {error, "Not git url specified"},
  -      Caller ! Reply,
  -      {reply, Reply, State}
  -  end;
  -
  -handle_call({build_bee, AppName, Caller}, _From, #state{scratch_disk = ScratchDisk} = State) ->
  -  App = apps:find_by_name(AppName),
  -  {ok, ReposUrl} = handle_repos_lookup(AppName),
  -  OutFile = lists:append([handle_find_application_location(App, State), ".squashfs"]),
  -  
  -  {Proplists, _Status} = ?TEMPLATE_SHELL_SCRIPT_PARSED("create-bee", [
  -    {"[[GIT_REPOS]]", ReposUrl},
  -    {"[[WORKING_DIRECTORY]]", ScratchDisk},
  -    {"[[APP_NAME]]", apps:build_on_disk_app_name(App)},
  -    {"[[OUTFILE]]", OutFile}
  -  ]),
  -  Reply = case proplists:is_defined(bee_size, Proplists) of
  -    true -> 
  -      Path = proplists:get_value(outdir, Proplists),
  -      ets:insert(?TAB_NAME_TO_PATH, {AppName, Path}),
  -      {bee_built, Proplists};
  -    false -> 
  -      {error, "Could not create bee"}
  -  end,
  -  Caller ! Reply,
  -  {reply, Reply, State};
  -
   handle_call({locate_git_repo, App}, _From, State) ->
     Reply = handle_repos_lookup(App),
     {reply, Reply, State};
  
positive.code:       {error, not_found}
    end.
  
  handle_offsite_repos_lookup(App) when is_record(App, app) ->
    App#app.url;
  handle_offsite_repos_lookup(AppName) ->
    handle_offsite_repos_lookup(apps:find_by_name(AppName)).
  
  handle_lookup_squashed_repos(Name) ->
    case ets:lookup(?TAB_NAME_TO_PATH, Name) of
      [{_Key, Path}] -> Path;
      _ -> []
    end.  
  
  handle_find_application_location(App, #state{scratch_disk = ScratchDisk} = _State) ->
  
negative.code:          terminate/2, code_change/3]).
  
  -record(state, {
    scratch_disk,
    squashed_disk
  }).
  
  -define(SERVER, ?MODULE).
  