// get locker here
if (contains(token, ';')) {
locker_ = "Unlocked";
- vcstatus = UNLOCKED;
+ vcstatus_ = UNLOCKED;
continue;
}
string tmpt;
// s2 is user, and s1 is version
if (s1 == version_) {
locker_ = s2;
- vcstatus = LOCKED;
+ vcstatus_ = LOCKED;
break;
}
} while (!contains(tmpt, ';'));
<< "'\nModification date of file: `" << mod_date << '\'');
if (file.isReadOnly()) {
// readonly checkout is unlocked
- vcstatus = UNLOCKED;
+ vcstatus_ = UNLOCKED;
} else {
FileName bdir(addPath(master_.onlyPath().absFileName(),"Base"));
FileName base(addName(bdir.absFileName(),name));
// if base version is existent "cvs edit" was used to lock
- vcstatus = base.isReadableFile() ? LOCKED : NOLOCKING;
+ vcstatus_ = base.isReadableFile() ? LOCKED : NOLOCKING;
}
} else {
- vcstatus = NOLOCKING;
+ vcstatus_ = NOLOCKING;
}
break;
}
int CVS::edit()
{
- vcstatus = LOCKED;
+ vcstatus_ = LOCKED;
return doVCCommand("cvs -q edit " + getTarget(File),
FileName(owner_->filePath()));
}
int CVS::unedit()
{
- vcstatus = UNLOCKED;
+ vcstatus_ = UNLOCKED;
return doVCCommand("cvs -q unedit " + getTarget(File),
FileName(owner_->filePath()));
}
CvsStatus status = getStatus();
switch (status) {
case UpToDate:
- if (vcstatus != NOLOCKING)
+ if (vcstatus_ != NOLOCKING)
if (unedit())
return LyXVC::ErrorCommand;
log = "CVS: Proceeded";
bool CVS::checkInEnabled()
{
- if (vcstatus != NOLOCKING)
+ if (vcstatus_ != NOLOCKING)
return isLocked();
else
return true;
string CVS::checkOut()
{
- if (vcstatus != NOLOCKING && edit())
+ if (vcstatus_ != NOLOCKING && edit())
return string();
TempFile tempfile("lyxvout");
FileName tmpf = tempfile.name();
bool CVS::checkOutEnabled()
{
- if (vcstatus != NOLOCKING)
+ if (vcstatus_ != NOLOCKING)
return !isLocked();
else
return true;
CvsStatus status = getStatus();
switch (status) {
case UpToDate:
- if (vcstatus != NOLOCKING)
+ if (vcstatus_ != NOLOCKING)
return 0 == unedit();
break;
case NeedsMerge:
{
// vcstatus code is somewhat superflous,
// until we want to implement read-only toggle for svn.
- vcstatus = NOLOCKING;
+ vcstatus_ = NOLOCKING;
if (checkLockMode()) {
if (isLocked())
- vcstatus = LOCKED;
+ vcstatus_ = LOCKED;
else
- vcstatus = UNLOCKED;
+ vcstatus_ = UNLOCKED;
}
}
{
// vcstatus code is somewhat superflous,
// until we want to implement read-only toggle for git.
- vcstatus = NOLOCKING;
+ vcstatus_ = NOLOCKING;
}
NOLOCKING,
};
- VCS(Buffer * b) : vcstatus(NOLOCKING), owner_(b) {}
+ VCS(Buffer * b) : vcstatus_(NOLOCKING), owner_(b) {}
virtual ~VCS() {}
/// the name of the vc backend
/// return the owning buffer
Buffer * owner() const { return owner_; }
/// return the lock status of this file
- VCStatus status() const { return vcstatus; }
+ VCStatus status() const { return vcstatus_; }
/// do we need special handling for read-only toggling?
/// (also used for check-out operation)
virtual bool toggleReadOnlyEnabled() = 0;
support::FileName master_;
/// The status of the VC controlled file.
- VCStatus vcstatus;
+ VCStatus vcstatus_;
/// The buffer using this VC
Buffer * const owner_;