Am 15.10.2010 um 15:08 schrieb Pavel Sanda:

> Pavel Sanda wrote:
>> i quickly went through sources and saw also few usage of file_ outside
>> scanMaster in svn routines which looks inconsitent and owner_ would be
>> more appropriate.
> 
> no as i see it again they are part of scanMaster so the question really is 
> whether
> this routine can be called without existing buffer...

AFAICS not. scanMaster() gets called from constructors only.
The constructors are in LyXVC::registrer() which gets called from buffer
and LyXVC::file_found_hook() - called when buffer file is readable.

So I think file_ is used as internal state to transfer the constructor
parameter to scanMaster. Since it's not really broken - I'll refrain
from fixing it.

But in general owner_->fileName() should be used instead of file_.

Another question: when the working copy has no diff to repository
the check in operation isn't sensible. But it's expensive to test
this. So I'd like to test it before prompting for the log message
and then doing the noop check in. Does this sound sensible?
The proper solution would be to refactor the diff operation and
use it for that and for repoUpdate in the check for it and prompt
when a real change was made.
If you're fine with that I'll prepare a patch otherwise I have to
copy the diff test code to CVS::checkIn.

Stephan

Reply via email to