scm.register_interface("update")
scm.register_interface("check_workingcopy")
scm.register_interface("working_copy_available")
-scm.register_interface("has_working_copy")
return strict.lock(scm)
return d
end
-function cvs.cvs_source:has_working_copy()
- return true
-end
-
--- Build the cvsroot string.
-- @param info Info table.
-- @param sourcename Source name.
return true
end
-function cvs.has_working_copy(info, sourcename)
- return source.sources[sourcename]:has_working_copy()
-end
-
function cvs.toresult(info, sourcename, sourceset, directory)
-- <directory>/source/<sourcename>.tar.gz
-- <directory>/makefile
return d
end
-function files.files_source:has_working_copy()
- return false
-end
-
function files.fetch_source(info, sourcename)
local rc, re
local src = source.sources[sourcename]
return false, err.new("source %s doesn't require a working copy", sourcename)
end
-function files.has_working_copy(info, sourcename)
- return source.sources[sourcename]:has_working_copy()
-end
-
--- Handle file:copy() in a way that appears intuitive to the user. Returns
-- a directory and filename that can be passed to eg. mkdir -p and cp.
-- @param buildpath Base build path (string).
return d
end
-function git.git_source:has_working_copy()
- return true
-end
-
--- Return the git commit ID of the specified source configuration. Specific to
-- sources of type git, useful for writing plugins.
-- @param info Info table.
return true
end
-function git.has_working_copy(info, sourcename)
- return source.sources[sourcename]:has_working_copy()
-end
-
--- turn server:location into a git-style url
-- @param c table: a cache
-- @param server string: server name
return d
end
-function gitrepo_source:has_working_copy()
- return true
-end
-
--------------------------------------------------------------------------------
--- Check if a working copy for a git repository is available
return true
end
---- Sources of type gitrepo always have a working copy
--- @return True
-function gitrepo.has_working_copy(info, sourcename)
- assertIsTable(info)
- assertIsStringN(sourcename)
- return source.sources[sourcename]:has_working_copy()
-end
-
--- Fetch a gitrepo source. Adapted from git plugin.
-- @param info the info structure
-- @param sourcename string
return d
end
-function svn.svn_source:has_working_copy()
- return true
-end
-
function svn.fetch_source(info, sourcename)
local rc, re
local e = err.new("fetching source failed: %s", sourcename)
return true
end
-function svn.has_working_copy(info, sourcename)
- return source.sources[sourcename]:has_working_copy()
-end
-
function svn.toresult(info, sourcename, sourceset, directory)
-- <directory>/source/<sourcename>.tar.gz
-- <directory>/makefile