mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
implement revert and history for CVS
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1579 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fbb9a99704
commit
351c0e0e59
@ -182,7 +182,8 @@ void RCS::undoLast()
|
|||||||
{
|
{
|
||||||
lyxerr[Debug::LYXVC] << "LyXVC: undoLast" << endl;
|
lyxerr[Debug::LYXVC] << "LyXVC: undoLast" << endl;
|
||||||
doVCCommand("rcs -o" + version() + " \""
|
doVCCommand("rcs -o" + version() + " \""
|
||||||
+ OnlyFilename(owner_->fileName()) + "\"", owner_->filepath);
|
+ OnlyFilename(owner_->fileName()) + "\"",
|
||||||
|
owner_->filepath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -282,7 +283,8 @@ void CVS::registrer(string const & msg)
|
|||||||
void CVS::checkIn(string const & msg)
|
void CVS::checkIn(string const & msg)
|
||||||
{
|
{
|
||||||
doVCCommand("cvs -q commit -m \"" + msg + "\" \""
|
doVCCommand("cvs -q commit -m \"" + msg + "\" \""
|
||||||
+ OnlyFilename(owner_->fileName()) + "\"", owner_->filepath);
|
+ OnlyFilename(owner_->fileName()) + "\"",
|
||||||
|
owner_->filepath);
|
||||||
owner_->getUser()->owner()->getLyXFunc()->Dispatch("buffer-reload");
|
owner_->getUser()->owner()->getLyXFunc()->Dispatch("buffer-reload");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,10 +298,15 @@ void CVS::checkOut()
|
|||||||
|
|
||||||
void CVS::revert()
|
void CVS::revert()
|
||||||
{
|
{
|
||||||
// not sure how to do this...
|
// Reverts to the version in CVS repository and
|
||||||
// rm file
|
// gets the updated version from the repository.
|
||||||
// cvs update
|
string const fil = OnlyFilename(owner_->fileName());
|
||||||
lyxerr << "Sorry not implemented." << endl;
|
|
||||||
|
doVCCommand("rm -f \"" + fil + "\"; cvs update \"" + fil + "\"",
|
||||||
|
owner_->filepath);
|
||||||
|
owner_->markLyxClean();
|
||||||
|
owner_->getUser()->owner()
|
||||||
|
->getLyXFunc()->Dispatch("buffer-reload");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -312,7 +319,9 @@ void CVS::undoLast()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CVS::getLog(string const &)
|
void CVS::getLog(string const & tmpf)
|
||||||
{
|
{
|
||||||
lyxerr << "Sorry not implemented." << endl;
|
doVCCommand("cvs log \""
|
||||||
|
+ OnlyFilename(owner_->fileName()) + "\" > " + tmpf,
|
||||||
|
owner_->filepath);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user