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

[PATCH] Fix wrong read only mode in TortoiseMerge when applying patch

From: Kazutoshi Satoda <k_satoda_at_f2.dion.ne.jp>
Date: 2007-04-14 10:25:47 CEST


After I installed 1.4.x nightly (r9030), TortoiseMerge became unable to
save a patched file. I looked into diff between 1.4.3 and 1.4.x, and
found a questionable code.

The attached patch will fix the above problem. But I can't build and
test TortoiseMerge. So please test it before committing. The patch is
for trunk r9168, but it will be valid for 1.4.x branch.


Index: src/TortoiseMerge/TortoiseMerge.cpp
--- src/TortoiseMerge/TortoiseMerge.cpp (revision 9168)
+++ src/TortoiseMerge/TortoiseMerge.cpp (working copy)
@@ -333,7 +333,7 @@
         pFrame->m_bReadOnly = !!parser.HasKey(_T("readonly"));
- if (GetFileAttributes(pFrame->m_Data.m_yourFile.GetFilename()) & FILE_ATTRIBUTE_READONLY)
+ if (pFrame->m_Data.IsYourFileInUse() && (GetFileAttributes(pFrame->m_Data.m_yourFile.GetFilename()) & FILE_ATTRIBUTE_READONLY))
                 pFrame->m_bReadOnly = true;
         pFrame->m_bBlame = !!parser.HasKey(_T("blame"));
         // diffing a blame means no editing!

To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sat Apr 14 10:26:08 2007

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

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