[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: TortoiseMerge cannot diff when files are locked for write

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Fri, 11 May 2012 21:08:21 +0200

On 11.05.2012 21:05, Oto BREZINA wrote:
> On 2012-05-11 20:59, Stefan Küng wrote:
>> On 11.05.2012 02:07, Josh Green wrote:
>>> Hi There,
>>>
>>> I'm trying to use TortoiseMerge to diff files while they are locked for write. I can easily open the files in notepad for read, but tortoiseMerge quits and says the files could not be accessed.
>>>
>>> Is it possible for tortoiseMerge to detect this then attempt to open them for read access instead?
>>>
>>> Is it already possible?
>>> Perhaps I could do this myself somehow I guess?
>> TMerge tries to open the files with GENERIC_READ access. If that fails,
>> then you see the error message.
> If we are talking about FileTextLines
> CAutoFile hFile = CreateFile(sFilePath, GENERIC_READ, FILE_SHARE_READ, ...
> MAYBE adding FILE_SHARE_WRITE would help?

That would mean allowing others to write to the same file we want to
read from. That could lead to inconsistent data read from the file and
then to a completely wrong diff.

Not sure if that would be ok since I don't know of any way to detect that.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2959492
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-05-11 21:08:33 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.