You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Fabien COELHO <fa...@coelho.net> on 2005/10/07 09:33:32 UTC

new keyword for repos meta-data (last revision...) ?

Dear developers,

We have the following small but annoying issue with svn. We're exporting 
on a regular basis part of a repository, and we would like to be able to 
know afterwards what revision was exported.

However, as the export does not include any meta information, there is no 
"svn info" available to do so. We don't want to use a checkout, and we do 
not want to change the directory name for the export so as to keep tract 
of the information. Our current hack is to look at the creation date of 
the files and directory inside the export. We can also have a look at 
$xxx$ keywords within various files, but they are per object and refer to 
the last modification of that file only.

A new keyword or set of keyword used in a file, say $Info$, would help 
solve our small issue by providing information about the current status of 
the repository (URL, last revision...) when the export, update, switch 
or checkout... is performed.

- Would this seem appropriate?
- What keywords and contents would be useful?

If it is appropriate, I may try to submit a patch in the near future.
If not, I won't bother and we'll stay with our issue and our bad hack.

Thanks in advance,

-- 
Fabien COELHO   _____   fabien@coelho.net   _____   http://www.coelho.net

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

Re: new keyword for repos meta-data (last revision...) ?

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Fri, Oct 07, 2005 at 11:33:32AM +0200, Fabien COELHO wrote:
> We have the following small but annoying issue with svn. We're exporting 
> on a regular basis part of a repository, and we would like to be able to 
> know afterwards what revision was exported.
> 
> [...]
> 
> A new keyword or set of keyword used in a file, say $Info$, would help 
> solve our small issue by providing information about the current status of 
> the repository (URL, last revision...) when the export, update, switch 
> or checkout... is performed.

Keywords are per-file, while what you're proposing is per-working-copy.
This conceptual mismatch would causes several problems for any
implementation, and, as it happens, have just recently been discussed. See
the thread titled "Re: Proposal for $Revision$ keyword amendment",
http://svn.haxx.se/dev/archive-2005-10/0087.shtml.


However, in your case, why not solve the problem by capturing or fixing
the revision number _before_ the export? In other words: run 'svn info'
on the target URL, extract the revision number (along with any other
information you want to keep), and use that as an argument to svn export.

Alternatively, you could create a temporary tag and export from it,
but you might want to avoid the extra commit noise that that solution
would generate.

Regards,
Malcolm

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

Re: new keyword for repos meta-data (last revision...) ?

Posted by Fabien COELHO <fa...@coelho.net>.
Dear Philipp,

>> We have the following small but annoying issue with svn. We're exporting
>> on a regular basis part of a repository, and we would like to be able to
>> know afterwards what revision was exported.
> ...
>>
>> If it is appropriate, I may try to submit a patch in the near future.
>> If not, I won't bother and we'll stay with our issue and our bad hack.
>
> How about looking for the HEAD revision (svnlook or svn info URL), exporting
> this (svn export -r $REV) and doing some "echo $REV > file" ?

Yes, we also thought about that kind of manual approach, and that may be 
what we're going to do in the mean time anyway.

However, ISTM that having such repository meta information accessible 
through keywords looks useful in more that one case, hence my suggestion
to have that as a feature.

For instance, I have another need to mark LaTeX-generated documents where 
relying on $Id$ just gives the revision of one file, although the final 
document depends on other files such as images or include files that do 
not appear.

Thanks or your idea and your answer,

-- 
Fabien.

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