aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2016-06-15 08:49:43 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2016-06-15 08:49:43 -0400
commitf703dfca25b1235455a484313ac1005df8eb571b (patch)
tree61649ca9a4de1911a86dde44d4006779f84c1eae
parentfc20fd1a9b74c1059775446baf921181433801aa (diff)
Removed CVS project recognition and assume Subversion v1.8+.
-rw-r--r--core/file_io.lua11
-rw-r--r--core/lfs_ext.lua2
2 files changed, 5 insertions, 8 deletions
diff --git a/core/file_io.lua b/core/file_io.lua
index 46a537a4..167ab420 100644
--- a/core/file_io.lua
+++ b/core/file_io.lua
@@ -331,33 +331,30 @@ function io.open_recent_file()
end
-- List of version control directories.
-local vcs = {'.bzr', '.git', '.hg', '.svn', 'CVS'}
+local vcs = {'.bzr', '.git', '.hg', '.svn'}
---
-- Returns the root directory of the project that contains filesystem path
-- *path*.
-- In order to be recognized, projects must be under version control. Recognized
--- VCSes are Bazaar, Git, Mercurial, SVN, and CVS.
+-- VCSes are Bazaar, Git, Mercurial, and SVN.
-- @param path Optional filesystem path to a project or a file contained within
-- a project. The default value is the buffer's filename or the current
-- working directory.
-- @return string root or nil
-- @name get_project_root
function io.get_project_root(path)
- local root
local lfs_attributes = lfs.attributes
local dir = path or (buffer.filename or lfs.currentdir()):match('^(.+)[/\\]')
while dir do
for i = 1, #vcs do
if lfs_attributes(dir..'/'..vcs[i], 'mode') == 'directory' then
- if vcs[i] ~= '.svn' and vcs[i] ~= 'CVS' then return dir end
- root = dir
- break
+ return dir
end
end
dir = dir:match('^(.+)[/\\]')
end
- return root
+ return nil
end
---
diff --git a/core/lfs_ext.lua b/core/lfs_ext.lua
index b2b89a88..4bf641e3 100644
--- a/core/lfs_ext.lua
+++ b/core/lfs_ext.lua
@@ -18,7 +18,7 @@ lfs.FILTER = {
'a', 'bmp', 'bz2', 'class', 'dll', 'exe', 'gif', 'gz', 'jar', 'jpeg', 'jpg',
'o', 'png', 'so', 'tar', 'tgz', 'tif', 'tiff', 'zip'
},
- folders = {'%.bzr$', '%.git$', '%.hg$', '%.svn$', 'CVS$'}
+ folders = {'%.bzr$', '%.git$', '%.hg$', '%.svn$'}
}
local lfs_symlinkattributes = lfs.symlinkattributes