summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-03-03 09:43:26 -0600
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-03-03 09:43:26 -0600
commitf161cd90c6033bb20f04473d10a2d963c4425424 (patch)
tree445466bb1a566d86e9afc094a4b11cb7cdbecd0e /src
parent27dae6a65570811a0e15d12559cc9220784995a4 (diff)
parent3ef3a7abece87ff8b2cc9957a1242e91141a6380 (diff)
Merge pull request #205 from ferd/fix-hg-diffing
Fix hg diffing
Diffstat (limited to 'src')
-rw-r--r--src/rebar_hg_resource.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rebar_hg_resource.erl b/src/rebar_hg_resource.erl
index 1bd992e..a67abb9 100644
--- a/src/rebar_hg_resource.erl
+++ b/src/rebar_hg_resource.erl
@@ -61,7 +61,7 @@ download(Dir, {hg, Url, {branch, Branch}}, _State) ->
[{cd, filename:dirname(Dir)}]);
download(Dir, {hg, Url, {tag, Tag}}, _State) ->
ok = filelib:ensure_dir(Dir),
- rebar_utils:sh(?FMT("hg clone -q -r ~s ~s ~s",
+ rebar_utils:sh(?FMT("hg clone -q -u ~s ~s ~s",
[Tag, Url, filename:basename(Dir)]),
[{cd, filename:dirname(Dir)}]);
download(Dir, {hg, Url, {ref, Ref}}, _State) ->
@@ -115,7 +115,7 @@ get_tag_distance(Dir, Ref) ->
[{use_stdout, false}, {debug_abort_on_error, AbortMsg}]),
Log = string:strip(LogString,
both, $\n),
- [Tag, Distance] = re:split(Log, "-([0-9]+)$", [{parts,0}]),
+ [Tag, Distance] = re:split(Log, "-([0-9]+)$", [{parts,0}, {return, list}]),
{Tag, Distance}.
get_branch_ref(Dir, Branch) ->