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

RE: merge-docx.js script broken?

From: pavel_a <pavel_a_at_fastmail.fm>
Date: Tue, 6 Jan 2009 03:05:04 +0200

Hi all,

I don't have TSVN installed here, but still have that script.
I've run it with wscript and Word 2007, and this is how merge works for
me:

The file paths passed to this script must be _absolute_.
Otherwise, Word will search in a wrong place (Office or Windows dir?), even
if the
check in the script itself finds the files.

As you can see, args 3, 4 are unused, even though the script requires 4
args.
So, just try to pass absolute file paths from TSVN, and it likely will work.

Word will open with two specified files as "base" and "changed", and will
open a new
document for merge result (I couldn't find how to specify it's name thru
scripting, the
user can save it manually).

Regards,
Pavel A.

On Tue, Jan 6, 2009 at 2:03 AM, Jared Silva <jayrod_at_gmail.com> wrote:
---------- Forwarded message ----------
From: Jared Silva <jayrod_at_gmail.com>
Date: Tue, Dec 30, 2008 at 11:43 AM
Subject: Re: merge-docx.js script broken?
To: dev <dev_at_tortoisesvn.tigris.org>

First, I am out of the loop when it comes to merge-doc* development,
because I both do not merge Word documents using TortoiseSVN (I diff
often though) and because it is difficult to keep track of all the
caveats between the different versions of Word.

Is there an older version of the script that worked for you? What
tends to happen with the diff-doc* and merge-doc* scripts is people
make changes that "fix" a bug for their version of Word (I use 2003)
but breaks the script for others using a different version of Word.
You can find previous versions here:
http://tortoisesvn.tigris.org/source/browse/tortoisesvn/trunk/contrib/other/diff-scripts/

Can you please convert the error information to English?

It appears the error is occurring in this area of the code:
// Merge into the "My" document
if (parseInt(word.Version) < 12)
{
      baseDoc.Compare(sMergedDoc);
} else {
      baseDoc.Merge(sMergedDoc);
}

Please replace the code above with the code below and tell us what
happens. This will not fix your problem, but it will help us find out
exactly what the problem is.
WScript.Echo("word.Version: " + word.Version);
WScript.Echo("Number(word.Version): " + Number(word.Version));
WScript.Echo("parseInt(word.Version): " + parseInt(word.Version));
WScript.Echo("parseFloat(word.Version): " + parseFloat(word.Version));
// Merge into the "My" document
if (parseInt(word.Version) < 12)
{
  WScript.Echo("if (parseInt(word.Version) < 12) == TRUE");
      baseDoc.Compare(sMergedDoc);
} else {
  WScript.Echo("if (parseInt(word.Version) < 12) == FALSE");
      baseDoc.Merge(sMergedDoc);
}

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=1006601

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-01-06 02:57:28 CET

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.