You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Derek Hoyle <de...@embeduk.com> on 2005/07/14 10:15:14 UTC

Fixed-width keyword expansion

Hi, 
 
There is often a need for revision numbers to be added to binary files,
especially documents written in MS Word, Open Office, etc. This is possible
(with some compromise) using other version control tools. Using Visual
Source Safe (yuk!) a fixed-width field can be entered in the form:
 
$Revision::             $
 
The :: tells VSS to expand within the $...$ without changing the number of
characters, so the file length and layout is unchanged. This works for all
keywords. 
 
This also helps keep source file header blocks tidy, for those who like that
sort of thing. The down side is that the data may be truncated, but that's
up to the user to leave enough space. 
 
This is a really useful feature that allows nasty binary documents to become
version controlled, and I propose that something similar be included in SVN.
It would make a big difference to a lot of document management tasks that
presently rely on manual versioning. 
 
Is there any more support for this? Is there another way to version MS Word
or OO files?
 
Keep up the excellent work...
 
Best Regards, 
 
 
Derek Hoyle
embed limited
HYPERLINK "http://www.embeduk.com/"http://www.embeduk.com
Registered in England & Wales No. 5441254

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.14/48 - Release Date: 13/07/2005
 

RE: Fixed-width keyword expansion

Posted by Duncan Booth <du...@suttoncourtenay.org.uk>.
Derek Hoyle wrote:

> I had hoped that the new office XML file formats would help, but they
> are compressed XML files so the contents are obscured from SVN. If
> anyone knows otherwise, please let me know. 
> 
I would guess that compression would make it impossible for SVN to 
calculate useful deltas. Perhaps Subversion should be enhanced to be able 
to detect a compressed file and calculate deltas/expand keywords on the 
uncompressed version of the file?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Fixed-width keyword expansion

Posted by Jani Averbach <ja...@jaa.iki.fi>.
On 2005-07-14 14:00+0100, Derek Hoyle wrote:
> 
> I couldn't find any references to it anywhere. Could you direct me to it or
> describe how to use fixed-with keywords here for the benefit of the mailing
> list please. 

Here we go:

  /* Check for fixed-length expansion.
   * The format of fixed length keyword and its data is
   * Unexpanded keyword:         "$keyword::       $"
   * Expanded keyword:           "$keyword:: value $"
   * Expanded kw with filling:   "$keyword:: value   $"
   * Truncated keyword:          "$keyword:: longval#$"
   */

BR, Jani

-- 
Jani Averbach 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Fixed-width keyword expansion

Posted by Greg Thomas <th...@omc.bt.co.uk>.
On Thu, 14 Jul 2005 07:51:06 -0500, Ben Collins-Sussman
<su...@collab.net> wrote:

>Greg Thomas wrote:
>> 
>> That said, the idea of a fixed-length keyword expansion certainly
>> sounds like a good one to me. 
>
>Um... fixed-width keyword expansion is a new feature in svn 1.2.  We 
>just haven't put it in the nightly-build svnbook yet.  :-)

See, said it was a good idea ;-)

Greg
-- 
This post represents the views of the author and does
not necessarily accurately represent the views of BT.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Fixed-width keyword expansion

Posted by Derek Hoyle <de...@embeduk.com>.
Greg Thomas wrote:
> On Thu, 14 Jul 2005 11:15:14 +0100, "Derek Hoyle" 
> <de...@embeduk.com> wrote:
> 
> 
>>Is there another way to version MS Word
>>or OO files?
> 
> 
> Subversion will quite happily version control MS Word or OO files. 
> I've absolutley no idea what the effect would be of enabling keyword 
> expansion on those particular file formats would be, it may be the 
> current variable-length expansion will corrupt the file.
> 
> That said, the idea of a fixed-length keyword expansion certainly 
> sounds like a good one to me.
> 
> Greg

>
> Um... fixed-width keyword expansion is a new feature in svn 1.2.  We 
> just haven't put it in the nightly-build svnbook yet.  :-)


Ben, 

Now that's what I call excellent service. 3hr turnaround on new features ;-)

I couldn't find any references to it anywhere. Could you direct me to it or
describe how to use fixed-with keywords here for the benefit of the mailing
list please. 

Thanks in advance, 

Derek


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.14/48 - Release Date: 13/07/2005
 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Fixed-width keyword expansion

Posted by Ben Collins-Sussman <su...@collab.net>.
Greg Thomas wrote:
> On Thu, 14 Jul 2005 11:15:14 +0100, "Derek Hoyle"
> <de...@embeduk.com> wrote:
> 
> 
>>Is there another way to version MS Word
>>or OO files?
> 
> 
> Subversion will quite happily version control MS Word or OO files.
> I've absolutley no idea what the effect would be of enabling keyword
> expansion on those particular file formats would be, it may be the
> current variable-length expansion will corrupt the file. 
> 
> That said, the idea of a fixed-length keyword expansion certainly
> sounds like a good one to me. 
> 
> Greg


Um... fixed-width keyword expansion is a new feature in svn 1.2.  We 
just haven't put it in the nightly-build svnbook yet.  :-)



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Fixed-width keyword expansion

Posted by Derek Hoyle <de...@embeduk.com>.
Greg, All, 

Thanks for the support. Some more information...

Keywords are expanded in MS Word and OO no problem, but both file formats
rely on relative pointers within the file. This means that any movement
within the file caused by keyword expansion invalidates the pointers and
therefore corrupts the file. 

I had hoped that the new office XML file formats would help, but they are
compressed XML files so the contents are obscured from SVN. If anyone knows
otherwise, please let me know. 

For now we are manually adding major revision numbers (1.0, 1.1, etc.) to
the documents, but they are stored under SVN and therefore traceable,
recoverable, etc. This feature just saves us that extra hassle and gives us
consistant revision numbers on all documents & source files. 

There was a request last year for this, but there are no responses in the
mailing list so I guess it was overlooked. 

Cheers, 

Derek

-----Original Message-----
From: Greg Thomas [mailto:thomasgd@omc.bt.co.uk] 
Sent: 14 July 2005 12:38
To: derek.hoyle@embeduk.com
Cc: users@subversion.tigris.org
Subject: Re: Fixed-width keyword expansion


On Thu, 14 Jul 2005 11:15:14 +0100, "Derek Hoyle" <de...@embeduk.com>
wrote:

>Is there another way to version MS Word
>or OO files?

Subversion will quite happily version control MS Word or OO files. I've
absolutley no idea what the effect would be of enabling keyword expansion on
those particular file formats would be, it may be the current
variable-length expansion will corrupt the file. 

That said, the idea of a fixed-length keyword expansion certainly sounds
like a good one to me. 

Greg
-- 
This post represents the views of the author and does
not necessarily accurately represent the views of BT.

-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.14/48 - Release Date: 13/07/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.14/48 - Release Date: 13/07/2005
 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Fixed-width keyword expansion

Posted by Greg Thomas <th...@omc.bt.co.uk>.
On Thu, 14 Jul 2005 11:15:14 +0100, "Derek Hoyle"
<de...@embeduk.com> wrote:

>Is there another way to version MS Word
>or OO files?

Subversion will quite happily version control MS Word or OO files.
I've absolutley no idea what the effect would be of enabling keyword
expansion on those particular file formats would be, it may be the
current variable-length expansion will corrupt the file. 

That said, the idea of a fixed-length keyword expansion certainly
sounds like a good one to me. 

Greg
-- 
This post represents the views of the author and does
not necessarily accurately represent the views of BT.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Fixed-width keyword expansion

Posted by Xevious <xe...@heavyphoton.com>.
Derek Hoyle wrote:
> Hi,
>  
> There is often a need for revision numbers to be added to binary files, 
> especially documents written in MS Word, Open Office, etc. This is 
> possible (with some compromise) using other version control tools. Using 
> Visual Source Safe (yuk!) a fixed-width field can be entered in the form:

I am a coming into this thread a bit late (and a bit OT) - however,
we solved this problem by continuing to use Word but saving everything 
in RTF.

Now we don't even use Word, but use DocBook instead. (IMO, a superior
solution)

xev





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org