Re: Print $Rev$ property on file docx and xlsx

2023-01-11 Thread TortoiseSVN
Thanks a lot

Il giorno lun 9 gen 2023 alle ore 10:18 TortoiseSVN on behalf of lorenznl <
tortoisesvn@googlegroups.com> ha scritto:

> TortoiseSVN on behalf of lorenznl wrote:
> >[...]
> >Cell formulars in excel (for example string manipulation) need
> >(explicit) recalculation to update the derived cells.
> >[...]
>
> dang, forgot to mention that formulars base on the cells with the
> keywords  need something like "(NOW();"")" to force updating on
> recalculation.
> --
>
> Lorenz
>
> --
> You received this message because you are subscribed to the Google Groups
> "TortoiseSVN" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tortoisesvn+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tortoisesvn/lmmnrh5gf33pblc5jkhau09l65f10rp303%404ax.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tortoisesvn+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tortoisesvn/CACb4D9%3DsvVPbZa7aqdKSg5jvybutMTXP8a6Ji8oM%3D_rq8KDm1g%40mail.gmail.com.


Re: Print $Rev$ property on file docx and xlsx

2023-01-09 Thread TortoiseSVN on behalf of lorenznl
TortoiseSVN on behalf of lorenznl wrote:
>[...]
>Cell formulars in excel (for example string manipulation) need
>(explicit) recalculation to update the derived cells.
>[...]

dang, forgot to mention that formulars base on the cells with the
keywords  need something like "(NOW();"")" to force updating on
recalculation.
-- 

Lorenz

-- 
You received this message because you are subscribed to the Google Groups 
"TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tortoisesvn+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tortoisesvn/lmmnrh5gf33pblc5jkhau09l65f10rp303%404ax.com.


Re: Print $Rev$ property on file docx and xlsx

2023-01-09 Thread TortoiseSVN on behalf of lorenznl
Valentina Marziali tramite TortoiseSVN wrote:

>I would like to print the value of the Revision property into a docx and 
>xlsx file. 
>[...]

as Daniel points out othertread, docx and xlsx are zip-archives.

But using the uncompressed formats doc/xls and fixed-lenght keyword
expansion works for me ... 

... sort off 8-)
Cell formulars in excel (for example string manipulation) needs
(explicit) recalculation to update the derived cells.

After that the file shows up as modified.
Don't save it when there are no other changes.
-- 

Lorenz

-- 
You received this message because you are subscribed to the Google Groups 
"TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tortoisesvn+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tortoisesvn/dlinrhtrr8un0tnd3gqlfam06buj2ukoe8%404ax.com.


Re: Print $Rev$ property on file docx and xlsx

2023-01-05 Thread Stefan via TortoiseSVN
you could use the COM object of SubWCRev to get the revision in your office 
documents:
https://insights.oetiker.ch/windows/SvnProperties4MSOffice/

-- 
You received this message because you are subscribed to the Google Groups 
"TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tortoisesvn+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tortoisesvn/2bb3450b-acf9-4079-bcb8-bee02b839d21n%40googlegroups.com.


Re: Print $Rev$ property on file docx and xlsx

2023-01-05 Thread TortoiseSVN
Thank you Daniel for your fast and exaustive reply.
Regards
Valentina

Il giorno gio 5 gen 2023 alle ore 15:47 Daniel Sahlberg via TortoiseSVN <
tortoisesvn@googlegroups.com> ha scritto:

> torsdag 5 januari 2023 kl. 15:33:02 UTC+1 skrev
> valentina.marz...@gmail.com:
>
>> I would like to print the value of the Revision property into a docx and
>> xlsx file.
>> I added the property form windows context menu properties --> subversion
>> --> properties --> new --> keyword --> revision .
>> I wrote into the file/cell  $Rev$
>> but, after a commit,  I can't see the value of the revision.
>> This process is fine for txt file.
>>
>> Could you help me?
>> Thank you
>>
>
> docx and xlsx are binary file formats (zipped XML files to be more
> precise). Subversion is looking for "$Rev$" within the file but it is very
> unlikely you will find it in clear in the file. And in either case if
> Subversion would replace it, chances are that the ZIP file will be corrupt
> afterwards. Don't set the svn:keywords property on binary files!
>
> I can't see an easy way to add the revision number within a document.
>
> One way would be to add a pre-commit script using the COM interfaces of
> Word and Excel to open the file and Search/replace the $Rev$ identifier.
> But that will only add the latest known revision to the document, which is
> not the same as the revision you will get after commit. (It is not even
> assured you will get "latest known + 1" since another commit might be going
> on in the background and the one finishing first will get the next rev
> number).
>
> Another way would be to do a post-update and/or post-commit script that
> does the same (this is similar to what Subversion is doing with the
> automatic keyword expansion), but you will end up with locally modified
> files which might be a showstopper in case someone else modifies the file
> in the repository. (Subversion handles this on text files since it
> translates/detranslates the $Rev$ keyword before talking to the repository).
>
> Kind regards,
> Daniel
>
> --
> You received this message because you are subscribed to the Google Groups
> "TortoiseSVN" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tortoisesvn+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tortoisesvn/2815657c-d0dd-40a3-bd91-7a02daa4ee23n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tortoisesvn+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tortoisesvn/CACb4D9mMFmQEv%3DJv0KrNHvB4qQtXH0rAGPzJo6znEwx-%3Dr0yMQ%40mail.gmail.com.


Re: Print $Rev$ property on file docx and xlsx

2023-01-05 Thread Daniel Sahlberg via TortoiseSVN
torsdag 5 januari 2023 kl. 15:33:02 UTC+1 skrev valentina.marz...@gmail.com:

> I would like to print the value of the Revision property into a docx and 
> xlsx file. 
> I added the property form windows context menu properties --> subversion 
> --> properties --> new --> keyword --> revision .
> I wrote into the file/cell  $Rev$
> but, after a commit,  I can't see the value of the revision.
> This process is fine for txt file.
>
> Could you help me?
> Thank you
>

docx and xlsx are binary file formats (zipped XML files to be more 
precise). Subversion is looking for "$Rev$" within the file but it is very 
unlikely you will find it in clear in the file. And in either case if 
Subversion would replace it, chances are that the ZIP file will be corrupt 
afterwards. Don't set the svn:keywords property on binary files! 

I can't see an easy way to add the revision number within a document.

One way would be to add a pre-commit script using the COM interfaces of 
Word and Excel to open the file and Search/replace the $Rev$ identifier. 
But that will only add the latest known revision to the document, which is 
not the same as the revision you will get after commit. (It is not even 
assured you will get "latest known + 1" since another commit might be going 
on in the background and the one finishing first will get the next rev 
number).

Another way would be to do a post-update and/or post-commit script that 
does the same (this is similar to what Subversion is doing with the 
automatic keyword expansion), but you will end up with locally modified 
files which might be a showstopper in case someone else modifies the file 
in the repository. (Subversion handles this on text files since it 
translates/detranslates the $Rev$ keyword before talking to the repository).

Kind regards,
Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tortoisesvn+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tortoisesvn/2815657c-d0dd-40a3-bd91-7a02daa4ee23n%40googlegroups.com.


Print $Rev$ property on file docx and xlsx

2023-01-05 Thread Valentina Marziali tramite TortoiseSVN
I would like to print the value of the Revision property into a docx and 
xlsx file. 
I added the property form windows context menu properties --> subversion 
--> properties --> new --> keyword --> revision .
I wrote into the file/cell  $Rev$
but, after a commit,  I can't see the value of the revision.
This process is fine for txt file.

Could you help me?
Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tortoisesvn+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tortoisesvn/29983f7b-ed3b-4de7-a0d0-59602afad14bn%40googlegroups.com.