summaryrefslogtreecommitdiff
path: root/src/rebar_hg_resource.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_hg_resource.erl')
-rw-r--r--src/rebar_hg_resource.erl12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/rebar_hg_resource.erl b/src/rebar_hg_resource.erl
index 8139d04..5ae1ee0 100644
--- a/src/rebar_hg_resource.erl
+++ b/src/rebar_hg_resource.erl
@@ -10,6 +10,11 @@
needs_update/2,
make_vsn/2]).
+
+%% For backward compatibilty
+-export([ download/3
+ ]).
+
-include("rebar.hrl").
-spec init(atom(), rebar_state:t()) -> {ok, rebar_resource_v2:resource()}.
@@ -72,6 +77,10 @@ download(TmpDir, AppInfo, State, _) ->
{error, Error}
end.
+%% For backward compatibilty
+download(Dir, AppInfo, State) ->
+ download_(Dir, AppInfo, State).
+
download_(Dir, {hg, Url}, State) ->
?WARN("WARNING: It is recommended to use {branch, Name}, {tag, Tag} or {ref, Ref}, otherwise updating the dep may not work as expected.", []),
download_(Dir, {hg, Url, {branch, "default"}}, State);
@@ -191,7 +200,7 @@ check_type_support() ->
case get({is_supported, ?MODULE}) of
true ->
ok;
- false ->
+ _ ->
case rebar_utils:sh("hg --version", [{return_on_error, true},
{use_stdout, false}]) of
{error, _} ->
@@ -201,4 +210,3 @@ check_type_support() ->
ok
end
end.
-