anchor.diff:  
   -spec handle_deps(atom(), rebar_state:t(), list(), list() | boolean()) ->
                            {ok, [rebar_app_info:t()], rebar_state:t()} | {error, string()}.
  -handle_deps(Profile, State, Deps, Update) when is_boolean(Update) ->
  -    handle_deps(Profile, State, Deps, Update, []);
  +handle_deps(Profile, State, Deps, Upgrade) when is_boolean(Upgrade) ->
  +    handle_deps(Profile, State, Deps, Upgrade, []);
   handle_deps(Profile, State, Deps, Locks) when is_list(Locks) ->
  -    Update = rebar_state:get(State, upgrade, false),
  -    handle_deps(Profile, State, Deps, Update, Locks).
  +    Upgrade = rebar_state:get(State, upgrade, false),
  +    handle_deps(Profile, State, Deps, Upgrade, Locks).
   
   -spec handle_deps(atom(), rebar_state:t(), list(), boolean() | {true, binary(), integer()}, list())
                    -> {ok, [rebar_app_info:t()], rebar_state:t()} | {error, string()}.
   handle_deps(_Profile, State, [], _, _) ->
       {ok, [], State};
  -handle_deps(Profile, State, Deps, Update, Locks) ->
  +handle_deps(Profile, State, Deps, Upgrade, Locks) ->
       %% Read in package index and dep graph
       {Packages, Graph} = rebar_packages:get_packages(State),
       %% Split source deps from pkg deps, needed to keep backwards compatibility
  
positive.code:         {[], NewPkgDeps, NewSrcApps, State1, Seen1, _NewLocks} ->
              {State1, NewSrcApps, NewPkgDeps, Seen1};
          {NewSrcDeps, NewPkgDeps, NewSrcApps, State1, Seen1, NewLocks} ->
              update_src_deps(Profile, Level+1, NewSrcDeps, NewPkgDeps, NewSrcApps, State1, Update, Seen1, NewLocks)
      end.
  
  handle_update(AppInfo, SrcDeps, PkgDeps, SrcApps, Level, State, Locks) ->
      Name = rebar_app_info:name(AppInfo),
      case lists:keyfind(Name, 1, Locks) of
          false ->
  
negative.code:     AppInfo1 = rebar_app_info:state(AppInfo, S3),
  
      Deps = rebar_state:get(S3, deps, []),
      %% Upgrade lock level to be the level the dep will have in this dep tree
      NewLocks = [{DepName, Source, LockLevel+Level} ||
                     {DepName, Source, LockLevel} <- rebar_state:get(S3, {locks, default}, [])],
      AppInfo2 = rebar_app_info:deps(AppInfo1, rebar_state:deps_names(Deps)),
  