From 4a973636c7df1bd0d722d687678739521d8b6c45 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Thu, 19 Jan 2017 21:14:19 +0100 Subject: [PATCH] scm: remove has_working_copy() Signed-off-by: Tobias Ulmer --- local/scm.lua | 1 - plugins/cvs.lua | 8 -------- plugins/files.lua | 8 -------- plugins/git.lua | 8 -------- plugins/gitrepo.lua | 12 ------------ plugins/svn.lua | 8 -------- 6 files changed, 45 deletions(-) diff --git a/local/scm.lua b/local/scm.lua index 0aa8fa4..ab0171d 100644 --- a/local/scm.lua +++ b/local/scm.lua @@ -159,7 +159,6 @@ scm.register_interface("fetch_source") 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) diff --git a/plugins/cvs.lua b/plugins/cvs.lua index 136945d..5d63561 100644 --- a/plugins/cvs.lua +++ b/plugins/cvs.lua @@ -282,10 +282,6 @@ function cvs.cvs_source:display() 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. @@ -431,10 +427,6 @@ function cvs.working_copy_available(info, sourcename) 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) -- /source/.tar.gz -- /makefile diff --git a/plugins/files.lua b/plugins/files.lua index 20c6646..2b0b370 100644 --- a/plugins/files.lua +++ b/plugins/files.lua @@ -293,10 +293,6 @@ function files.files_source:display() 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] @@ -321,10 +317,6 @@ function files.working_copy_available(info, 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). diff --git a/plugins/git.lua b/plugins/git.lua index 23f5c7d..545a155 100644 --- a/plugins/git.lua +++ b/plugins/git.lua @@ -274,10 +274,6 @@ function git.git_source:display() 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. @@ -635,10 +631,6 @@ function git.working_copy_available(info, sourcename) 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 diff --git a/plugins/gitrepo.lua b/plugins/gitrepo.lua index 78ece53..f3b5042 100644 --- a/plugins/gitrepo.lua +++ b/plugins/gitrepo.lua @@ -220,10 +220,6 @@ function gitrepo_source:display() return d end -function gitrepo_source:has_working_copy() - return true -end - -------------------------------------------------------------------------------- --- Check if a working copy for a git repository is available @@ -243,14 +239,6 @@ function gitrepo.working_copy_available(info, sourcename) 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 diff --git a/plugins/svn.lua b/plugins/svn.lua index b5037b1..c5d357c 100644 --- a/plugins/svn.lua +++ b/plugins/svn.lua @@ -369,10 +369,6 @@ function svn.svn_source:display() 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) @@ -475,10 +471,6 @@ function svn.check_workingcopy(info, 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) -- /source/.tar.gz -- /makefile -- 2.39.5