Abdelrazak Younes wrote:
Pavel Sanda wrote:
Pavel Sanda wrote:
Hum, another solution would be to use propset:

svn propset svn:keywords "Rev"

see http://dev.juokaz.com/php/automatic-svn-revision-number-in-source-code
interesting idea, however i don't get how you would like to use it locally
(in the local copy you will have "Rev" not the commit number).

no i didn't read carefully, it will work.

Yep, and we can even do it right now using ert.

Even plain standard text inside a lyx document works. Problem is that you get those ugly dollar characters...

$Revision: 200 $
$Date: 2009-04-09 16:43:00 +0200 (Thu, 09 Apr 2009) $
$Author: younes $

I have some idea to have a nicer output:

1) When a document "doc.lyx" is under version control, we can check its svn properties:

svn propget svn:keywords dot.lyx

This can return one or more of the following keyword: URL Author Date Rev Id

2) For each of those keywords, we add the following line somewhere in a non visible part of the LyX document:

$keyword$

At next commit, svn will add the corresponding value ($Revision: 200 $ for example). At parsing time, we keep those information inside BufferParam.

3) We add a new 'svn' category to InsetInfo with the following possible values: URL Author Date Revision Identifier. InsetInfo will just have to retrieve the correct value from BufferParam and only that. We could also translate the field names; for example, in French we would have:

"Dernier auteur: younes" instead of the ugly "$Author: younes $"

I am not sure this idea is better than just parsing "svn status -v"...

Further ideas? Opinions?

Abdel.







Reply via email to