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

Re: Recovering an MS Word document checked in with svn:keywords Id set, but without fixed length identifier

From: Karl Fogel <kfogel_at_red-bean.com>
Date: 2007-11-26 22:48:51 CET

"Trent Nelson" <tnelson@onresolve.com> writes:
> Fixed it, sorry for the noise (and the forced HTML formatting of this e-mail,
> thanks to my only e-mail access at the moment being via Outlook web). As it
> turns out, I had an '$Id: ... $' tag with a single colon in an example from a
> config file; reverting the contents within the tag to what it was originally
> allowed me to re-open the file in Word and add another colon.

You may still have a problem waiting to happen, Trent.

MS Word format is not a "plain text" format -- it is a binary format
that Subversion cannot parse (Subversion *can* parse plain text, which
is why svn:keywords is officially supported for plain text files).

See http://en.wikipedia.org/wiki/Plain_text.

If you have an $Id$ tag working successfully in an MS Word file, it's
only a coincidence. Basically, you have told Subversion to interpret
the bytes in the file as though they were plain text. By pure
coincidence it happens that

   a) The sequence of bytest comprising the $Id$ tag is the same in
      this particular MS Word file as it would be in a plain text file
      (but this situation is not guaranteed to remain stable), and

   b) There are no other byte sequences in the file that happen to
      look like one of the keywords you've requested to be expanded
      (this situation is also not guaranteed to remain stable).

In other words: svn:keywords isn't really supported for MS Word files,
and you're running separate risks of both keyword expansion failure
and file corruption by attempting it.

-Karl

> From: Trent Nelson
> Sent: Mon 11/26/2007 8:46 AM
> To: users@subversion.tigris.org
> Subject: Recovering an MS Word document checked in with svn:keywords Id set,
> but without fixed length identifier
>
> I accidentally checked in a Word document that had svn:keywords Id set on it,
> but I seemingly typo'd the $Id$ tag and only put in one colon, not two. It's
> now garbled when I open it up in Word. Anyone got any ideas of how to recover
> it? I've tried svn cat & export, and also binary editing the file and
> replacing the '$Id: <contents>$' with whitespace, to no avail. (Kinda' wish I
> hadn't uninstalled Google Desktop a month or so ago.)
>
> Trent.
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org For additional
> commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Nov 26 22:49:23 2007

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

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