[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: Oto BREZINA <otik_at_printflow.eu>
Date: Fri, 11 May 2012 21:19:28 +0200

On 2012-05-11 21:08, Stefan Küng wrote:
> 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.
How is file which exposing reported problem locked for write? I guess it
not readonly file flag.
Can I simulate that?
>
> Stefan
>

-- 
Oto BREZINA, mob: +421 903 653 470
If I toppost I do it because:
  * I don't have time to edit out irrelevant context and signatures
  * I expect you to remember the context for my email messages
  * I want you do the work to figure out what I said
  * My time is more important than your time
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2959495
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-05-11 21:19:58 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.