mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-13 20:09:59 +00:00
VCS: adjust cvs revert to other archs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25799 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7372c4abbe
commit
3fe61ffb8f
@ -352,14 +352,16 @@ bool CVS::checkOutEnabled()
|
||||
|
||||
void CVS::revert()
|
||||
{
|
||||
// This is sensitive operation, so at lest some check before
|
||||
if (doVCCommand("cvs --help", FileName(owner_->filePath())))
|
||||
return;
|
||||
// Reverts to the version in CVS repository and
|
||||
// gets the updated version from the repository.
|
||||
string const fil = quoteName(onlyFilename(owner_->absFileName()));
|
||||
|
||||
doVCCommand("rm -f " + fil + "; cvs update " + fil,
|
||||
// This is sensitive operation, so at lest some check about
|
||||
// existence of cvs program and its file
|
||||
if (doVCCommand("cvs log "+ fil, FileName(owner_->filePath())))
|
||||
return;
|
||||
FileName f(owner_->absFileName());
|
||||
f.removeFile();
|
||||
doVCCommand("cvs update " + fil,
|
||||
FileName(owner_->filePath()));
|
||||
owner_->markClean();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user