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


From: Rick Yorgason <rick_at_ldagames.com>
Date: 2007-01-10 05:00:29 CET

Hi, I'm new to these lists, so I hope I'm sending this to the right
list. Please excuse any poor netiquette on my part.

I was having trouble with diffing OpenOffice files, because TortoiseSVN
marks all its temporary files as read-only when preparing them for a
diff, and OpenOffice will refuse to compare any file that is marked

So, I've hacked together a little patch to the diff script to unset the
read-only bit. I suppose it would be better to modify OpenOffice to
diff against read-only files, but that would be much, much harder.

Anyway, the patch is attached.



Index: diff-odt.vbs
--- diff-odt.vbs (revision 8467)
+++ diff-odt.vbs (working copy)
@@ -32,6 +32,16 @@
 End If
 On Error Goto 0
+'Because this is a diff, TortoiseSVN marks the files as read-only.
+'However, OpenOffice will not compare any file with that flag set.
+'Make sure we un-set that flag.
+Set objFSO = CreateObject("Scripting.FileSystemObject")
+Set objFile = objFSO.GetFile(sNewDoc)
+If objFile.Attributes = objFile.Attributes AND 1 Then
+ objFile.Attributes = objFile.Attributes XOR 1
+End If
 'Create the DesktopSet
 Set objDesktop = objServiceManager.createInstance("com.sun.star.frame.Desktop")
 Set objUriTranslator = objServiceManager.createInstance("com.sun.star.uri.ExternalUriReferenceTranslator")

To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Jan 10 05:00:41 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.