Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing the download procedure for mercurial.

The current version first pulls with -U and then updates to the
given revision. The problem with this approach is that hg requires
to be in the repo to do it. This adds arguments to the port process
to switch directories in between commands in order to update successfully
  • Loading branch information...
commit b6457609d32eb9224ae1b1f84c25329c2928e210 1 parent 5e928d6
@ferd ferd authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/agner_download.erl
View
2  src/agner_download.erl
@@ -42,7 +42,7 @@ fetch_1({hg, URL, Rev}, Directory) ->
false -> %% new
PortClone = hg(["clone", "-U", URL, Directory]),
process_port(PortClone, fun () ->
- PortUpdate = hg(["update", Rev]),
+ PortUpdate = hg(["update", Rev], [{cd, Directory}]),
process_port(PortUpdate, fun () -> ok end)
end);
true -> %% existing
Please sign in to comment.
Something went wrong with that request. Please try again.