mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Kate: add support for hg and fossil
Both VCS are supported by kate nowadays.
This commit is contained in:
committed by
Brad King
parent
4c32623f5f
commit
96389b4cd3
@@ -7,14 +7,14 @@ This cache variable is used by the Kate project generator and controls
|
||||
to what mode the ``files`` entry in the project file will be set. See
|
||||
:manual:`cmake-generators(7)`.
|
||||
|
||||
Possible values are ``AUTO``, ``SVN``, ``GIT`` and ``LIST``.
|
||||
Possible values are ``AUTO``, ``SVN``, ``GIT``, ``HG``, ``FOSSIL`` and ``LIST``.
|
||||
|
||||
When set to ``LIST``, CMake will put the list of source files known to CMake
|
||||
in the project file.
|
||||
When set to ``SVN``, CMake will put ``svn`` into the project file so that Kate
|
||||
will use svn to retrieve the list of files in the project.
|
||||
When set to ``GIT``, CMake will put ``git`` into the project file so that Kate
|
||||
will use git to retrieve the list of files in the project.
|
||||
When set to ``SVN``, ``GIT``, ``HG`` or ``FOSSIL``, CMake will set
|
||||
the generated project accordingly to Subversion, git, Mercurial
|
||||
or Fossil, and Kate will then use the respective command line tool to
|
||||
retrieve the list of files in the project.
|
||||
When unset or set to ``AUTO``, CMake will try to detect whether the
|
||||
source directory is part of a git or svn checkout or not, and put the
|
||||
respective entry into the project file.
|
||||
|
||||
@@ -225,6 +225,8 @@ std::string cmExtraKateGenerator::GenerateFilesString(
|
||||
cmSystemTools::UpperCase(mf->GetSafeDefinition("CMAKE_KATE_FILES_MODE"));
|
||||
static const std::string gitString = "\"git\": 1 ";
|
||||
static const std::string svnString = "\"svn\": 1 ";
|
||||
static const std::string hgString = "\"hg\": 1 ";
|
||||
static const std::string fossilString = "\"fossil\": 1 ";
|
||||
|
||||
if (mode == "SVN") {
|
||||
return svnString;
|
||||
@@ -232,6 +234,12 @@ std::string cmExtraKateGenerator::GenerateFilesString(
|
||||
if (mode == "GIT") {
|
||||
return gitString;
|
||||
}
|
||||
if (mode == "HG") {
|
||||
return hgString;
|
||||
}
|
||||
if (mode == "FOSSIL") {
|
||||
return fossilString;
|
||||
}
|
||||
|
||||
std::string s;
|
||||
|
||||
@@ -246,6 +254,14 @@ std::string cmExtraKateGenerator::GenerateFilesString(
|
||||
if (cmSystemTools::FileExists(s)) {
|
||||
return svnString;
|
||||
}
|
||||
s = cmStrCat(lg.GetSourceDirectory(), "/.hg");
|
||||
if (cmSystemTools::FileExists(s)) {
|
||||
return hgString;
|
||||
}
|
||||
s = cmStrCat(lg.GetSourceDirectory(), "/.fslckout");
|
||||
if (cmSystemTools::FileExists(s)) {
|
||||
return fossilString;
|
||||
}
|
||||
}
|
||||
|
||||
s = cmStrCat(lg.GetSourceDirectory(), '/');
|
||||
|
||||
Reference in New Issue
Block a user