We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fd36b1 commit e4b76d2Copy full SHA for e4b76d2
lib/ohloh_scm/adapters/hg/pull.rb
@@ -10,14 +10,21 @@ def pull(from, &block)
10
unless self.exist?
11
run "mkdir -p '#{self.url}'"
12
run "rm -rf '#{self.url}'"
13
- run "hg clone -U '#{from.url}' '#{self.url}'"
+ run "hg clone '#{from.url}' '#{self.url}'"
14
else
15
branch_opts = "-r #{ from.branch_name }" if branch_name
16
run "cd '#{self.url}' && hg revert --all && hg pull #{ branch_opts } -u -y '#{from.url}'"
17
end
18
19
+ clean_up_disk
20
yield(1,1) if block_given? # Progress bar callback
21
22
23
+ private
24
+
25
+ def clean_up_disk
26
+ return unless FileTest.exist?(url)
27
+ run "cd #{url} && find . -maxdepth 1 -not -name .hg -not -name . -print0 | xargs -0 rm -rf --"
28
+ end
29
30
0 commit comments