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...
1 parent 5e928d6 commit b6457609d32eb9224ae1b1f84c25329c2928e210 @ferd ferd committed Feb 22, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 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)
true -> %% existing

0 comments on commit b645760

Please sign in to comment.