anchor.diff: -
   %% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
   %% ex: ts=4 sw=4 et
   %% -------------------------------------------------------------------
  
positive.code:     _ = [delete_dep(D) || D <- AvailableDeps,
  			  lists:prefix(DepsDir, D#dep.dir) == true],
      ok.
  
  
  
  %% ===================================================================
  
negative.code:                         [Rev, Url, filename:basename(AppDir)]), [],
                     filename:dirname(AppDir)).
  
  update_source(Dep) ->
      ?CONSOLE("Updating ~p from ~p\n", [Dep#dep.app, Dep#dep.source]),
      require_source_engine(Dep#dep.source),
      update_source(filename:join(get_deps_dir(), Dep#dep.app),
                    Dep#dep.source),
      Dep.
  
  update_source(AppDir, {git, _Url, {Type, Refspec}})
    when Type =:= branch orelse
         Type =:= tag ->
      rebar_utils:sh(?FMT("git pull origin ~s", [Refspec]), [], AppDir);
  update_source(AppDir, {git, Url, Refspec}) ->
      update_source(AppDir, {git, Url, {branch, Refspec}});
  update_source(AppDir, {svn, _Url, Rev}) ->
      rebar_utils:sh(?FMT("svn up -r ~s", [Rev]), [], AppDir);
  update_source(AppDir, {hg, _Url, Rev}) ->
      rebar_utils:sh(?FMT("hg pull -u -r ~s", [Rev]), [], AppDir);
  update_source(AppDir, {bzr, _Url, Rev}) ->
      rebar_utils:sh(?FMT("bzr update -r ~s", [Rev]), [], AppDir).
  
  
  
  %% ===================================================================
  %% Source helper functions
  