implement local cache for mercurial remote repositories
git-svn-id: http://redmine.rubyforge.org/svn/branches/nbc@1908 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -199,6 +199,18 @@ module Redmine
|
||||
return nil if $? && $?.exitstatus != 0
|
||||
blame
|
||||
end
|
||||
|
||||
def create_cache
|
||||
cmd = "#{HG_BIN} clone #{@orig_url} #{@root_url}"
|
||||
shellout(cmd) { |io| io.read }
|
||||
end
|
||||
|
||||
def synchronize
|
||||
return unless File.directory?(@url)
|
||||
cmd = "#{HG_BIN} -R #{@url} pull"
|
||||
shellout(cmd)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user