return true;
if (!CVS::findFile(fn).empty())
return true;
- if (!SVN::findFile(fn).empty())
+ if (SVN::findFile(fn))
return true;
- if (!GIT::findFile(fn).empty())
+ if (GIT::findFile(fn))
return true;
return false;
}
return true;
}
// Check if file is under SVN
- if (!(found_file = SVN::findFile(fn)).empty()) {
- vcs_.reset(new SVN(found_file, owner_));
+ if (SVN::findFile(fn)) {
+ vcs_.reset(new SVN(owner_));
return true;
}
// Check if file is under GIT
- if (!(found_file = GIT::findFile(fn)).empty()) {
- vcs_.reset(new GIT(found_file, owner_));
+ if (GIT::findFile(fn)) {
+ vcs_.reset(new GIT(owner_));
return true;
}
bool LyXVC::file_not_found_hook(FileName const & fn)
{
// Check if file is under version control.
- // This happens if we are trying to load does not exist.
- // It may yet exist in the repository and so could be
- // checked out.
+ // This happens if we are trying to load file that does not exist.
+ // It may yet exist in the repository and so could be checked out.
bool foundRCS = !RCS::findFile(fn).empty();
bool foundCVS = foundRCS ? false : !CVS::findFile(fn).empty();
- bool foundSVN = (foundRCS || foundCVS) ? false : !SVN::findFile(fn).empty();
- bool foundGIT = (foundRCS || foundCVS || foundSVN) ? false : !GIT::findFile(fn).empty();
+ bool foundSVN = (foundRCS || foundCVS) ? false : SVN::findFile(fn);
+ bool foundGIT = (foundRCS || foundCVS || foundSVN) ? false : GIT::findFile(fn);
if (foundRCS || foundCVS || foundSVN || foundGIT) {
docstring const file = makeDisplayPath(fn.absFileName(), 20);
docstring const text =
if (!found.empty()) {
LYXERR(Debug::LYXVC, "LyXVC: registering "
<< to_utf8(filename.displayName()) << " with GIT");
- vcs_.reset(new GIT(found, owner_));
+ vcs_.reset(new GIT(owner_));
} else {
found = VCS::checkParentDirs(filename, ".svn/entries");
if (!found.empty()) {
LYXERR(Debug::LYXVC, "LyXVC: registering "
<< to_utf8(filename.displayName()) << " with SVN");
- vcs_.reset(new SVN(found, owner_));
+ vcs_.reset(new SVN(owner_));
} else {
// We only need to check the current directory, since CVS meta-data
}
if (response.empty())
response = _("(no initial description)");
- // FIXME This will fail with svn if the current directory has not
- // itself been added.
vcs_->registrer(to_utf8(response));
return true;
}