]> git.e2factory.org Git - e2factory.git/commitdiff
scm: remove has_working_copy()
authorTobias Ulmer <tu@emlix.com>
Thu, 19 Jan 2017 20:14:19 +0000 (21:14 +0100)
committerTobias Ulmer <tu@emlix.com>
Mon, 30 Jan 2017 13:33:34 +0000 (14:33 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
local/scm.lua
plugins/cvs.lua
plugins/files.lua
plugins/git.lua
plugins/gitrepo.lua
plugins/svn.lua

index 0aa8fa4e7df33949d6be022ea2692aaaf92c797e..ab0171d00884b8766843dbefbae698baa9dc48ba 100644 (file)
@@ -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)
 
index 136945dcdcabfe53dfe2723d83f892453d314c80..5d63561d57704c7edf2b05b4dd0e8df7af14ad8d 100644 (file)
@@ -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)
     -- <directory>/source/<sourcename>.tar.gz
     -- <directory>/makefile
index 20c6646e04e06aa1bfceed74d2c8c8a28068d76f..2b0b3701d7799bce1882670ed456c8e9bbeeee67 100644 (file)
@@ -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).
index 23f5c7db4a0ba0fa2a50abbbe0da7400de8a4cff..545a15544faba76fb444e4e5e2b0bb1722810bf2 100644 (file)
@@ -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
index 78ece534706118aa7948a7d0514ff97a711e6689..f3b5042aca15ab1d54385c4890a14571f36d6f35 100644 (file)
@@ -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
index b5037b1806e6b4a1aa7859abe71a91d34f4f5976..c5d357c0280d0d4a4d276b01f92604c52c526020 100644 (file)
@@ -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)
     -- <directory>/source/<sourcename>.tar.gz
     -- <directory>/makefile