lib/ohloh_scm/hg/scm.rb in ohloh_scm-3.0.16 vs lib/ohloh_scm/hg/scm.rb in ohloh_scm-3.0.17
- old
+ new
@@ -16,10 +16,15 @@
def vcs_path
"#{url}/.hg"
end
+ def checkout_files(names)
+ pattern = "(#{ names.join('|') })"
+ run "cd #{url} && hg revert $(hg manifest | grep -P '#{pattern}')"
+ end
+
private
def clone_or_fetch(remote_scm, callback)
callback.update(0, 1)
@@ -40,10 +45,9 @@
run "cd '#{url}' && hg revert --all && hg pull #{branch_opts} -u -y '#{remote_scm.url}'"
end
def clean_up_disk
return unless FileTest.exist?(url)
- sleep 1
run "cd #{url} && find . -maxdepth 1 -not -name .hg -not -name . -print0"\
' | xargs -0 rm -rf --'
end
end