anchor.diff:      require_app(App, VsnRegex),
       process_deps(Rest, Acc, Dir);
   process_deps([{App, VsnRegex, Source} | Rest], Acc, Dir) ->
  -    ?DEBUG("Process deps: ~p\n", [Rest]),
       case is_app_available(App, VsnRegex) of
           true ->
               process_deps(Rest, Acc, Dir);
  
positive.code: 
  -include("rebar.hrl").
  
  -export([preprocess/2]).
  
  %% ===================================================================
  %% Public API
  %% ===================================================================
  
  preprocess(Config, _) ->
      %% Get the directory where we will place downloaded deps
      DepsDir = rebar_config:get(Config, deps_dir, "deps"),
  
      %% Process the list of deps from the configuration
      case catch(process_deps(rebar_config:get(Config, deps, []), [], DepsDir)) of
          Dirs when is_list(Dirs) ->
              %% Filter out deps from config so sub-dirs don't wind up trying to d/l deps again
              Config2 = rebar_config:delete(Config, deps),
              {ok, Config2, Dirs};
          {'EXIT', Reason} ->
              ?ABORT("Error while processing dependencies: ~p\n", [Reason])
      end.
  
  
  %% ===================================================================
  %% Internal functions
  
negative.code: process_deps([Other | _Rest], _Acc, _Dir) ->
      ?ABORT("Invalid dependency specification ~p in ~s\n",
             [Other, rebar_utils:get_cwd()]).
  
  
  delete_deps([], _DepsDir) ->
      ok;
  delete_deps([{App, _VsnRegex, _Source} | Rest], DepsDir) ->
      AppDir = filename:join(DepsDir, App),
      case filelib:is_dir(AppDir) of
          true ->
              ?INFO("Delete dependency dir ~s\n", [AppDir]),
              rebar_file_utils:rm_rf(AppDir);
          false ->
              ok
      end,
      delete_deps(Rest, DepsDir);
  delete_deps([_Other | Rest], DepsDir) ->
      delete_deps(Rest, DepsDir).
  
  
  
  