lib/ohloh_scm/adapters/hg/pull.rb in ohloh_scm-2.1.0 vs lib/ohloh_scm/adapters/hg/pull.rb in ohloh_scm-2.2.0
- old
+ new
@@ -10,10 +10,11 @@
unless self.exist?
run "mkdir -p '#{self.url}'"
run "rm -rf '#{self.url}'"
run "hg clone -U '#{from.url}' '#{self.url}'"
else
- run "cd '#{self.url}' && hg revert --all && hg pull -u -y '#{from.url}'"
+ branch_opts = "-r #{ from.branch_name }" if branch_name
+ run "cd '#{self.url}' && hg revert --all && hg pull #{ branch_opts } -u -y '#{from.url}'"
end
yield(1,1) if block_given? # Progress bar callback
end