anchor.diff:  
   %% @doc do the system preparation
   -spec populate(sin_config:matcher(), sin_state:state()) -> sin_state:state().
  -populate(_Config, State0) ->
  +populate(Config, State0) ->
       ProjectApps = sin_state:get_value(project_apps, State0),
       lists:foldl(fun(App, State1) ->
  -                        prepare_app(State1, App)
  +                        prepare_app(Config, State1, App)
                     end, State0, ProjectApps).
   
  --spec prepare_app(sin_state:state(), string()) ->
  -                         sin_config:config().
  -prepare_app(State0, #app{name=AppName, path=AppBuildDir}) ->
  -
  -    BaseDetails = populate_modules(State0, AppName),
  -
  -    DotApp = filename:join([AppBuildDir, "ebin",
  -                            erlang:atom_to_list(AppName) ++ ".app"]),
  -
  -    ok = file:write_file(DotApp,
  -                    io_lib:format("~p.\n",
  -                                  [{application, AppName,
  -                                    BaseDetails}])),
  -    State0.
  +rewrite_vsn(Config, State, AppDir, BaseDetails) ->
  +    RWVSN = fun({vsn, VsnSpec}) ->
  +                    {vsn, vcs_vsn(Config, State, VsnSpec, AppDir)};
  +               (El) -> El
  +            end,
  +    [RWVSN(Detail) || Detail <- BaseDetails].
   
   %% @doc Format an exception thrown by this module
   -spec format_exception(sin_exceptions:exception()) ->
  
positive.code:                      (Element, Acc) ->
                            [Element | Acc]
                    end, [], lists:keydelete(modules, 1, Details))).
  
negative.code: %%====================================================================
  %% Internal functions
  %%====================================================================
  -spec prepare_app(sin_config:config(), sin_state:state(), string()) ->
                           sin_config:config().
  prepare_app(_Config, State0, #app{name=AppName, path=AppBuildDir}) ->
      BaseDetails = populate_modules(State0, AppName),
      DotApp = filename:join([AppBuildDir, "ebin",
                              erlang:atom_to_list(AppName) ++ ".app"]),
  
      ok = file:write_file(DotApp,
                      io_lib:format("~p.\n",
                                    [{application, AppName, BaseDetails}])),
  
      State0.
  
  populate_modules(State, AppName) ->
      Details = sin_state:get_value({apps, AppName, base}, State),
  
  