anchor.diff:      rebar_api:debug("current release: ~p~n", [CurrentRelPath]),
       rebar_api:debug("target dir: ~p~n", [TargetDir]),
   
  -    {CurrentName, CurrentVer} = rebar3_appup_rel_utils:get_rel_release_info(
  -                                            Name, CurrentRelPath),
  -    rebar_api:debug("current release, name: ~p, version: ~p",
  -        [CurrentName, CurrentVer]),
  -
       %% deduce the previous version from the release path
       {PreviousName, _PreviousVer0} = rebar3_appup_rel_utils:get_rel_release_info(Name,
  -                                                                               PreviousRelPath),
  +                                                                                PreviousRelPath),
       %% if a specific one was requested use that instead
       PreviousVer = case proplists:get_value(previous_version, Opts, undefined) of
                       undefined ->
  -                        deduce_previous_version(Name, CurrentVer, PreviousRelPath);
  +                        deduce_previous_version(Name, CurrentVer,
  +                                                CurrentRelPath, PreviousRelPath);
                       V -> V
                     end,
       rebar_api:debug("previous release, name: ~p, version: ~p",
  
positive.code:                                            Name]);
                          Path -> Path
                       end,
      %% if not specified the previous version if the current rel path
      PreviousRelPath = case proplists:get_value(previous, Opts, undefined) of
                          undefined -> CurrentRelPath;
                          P -> P
  
negative.code:     Name = atom_to_list(Name0),
      rebar_api:debug("release name: ~p", [Name]),
  
      %% check for overload of the current release
      CurrentRelPath = case proplists:get_value(current, Opts, undefined) of
                          undefined ->
                              filename:join([rebar_dir:base_dir(State),
  