Hi!

Ralph Glasstetter wrote:

> Different issue... I looked for a way to have the dvbcut revision number in 
> the code rsp. binary
>  (without editing it by hand).
> 
> Could you please add  '$Id$' somewhere in the header comment of each source 
> file?
> 
> subversion expands this to a string containing revision,date&author and we 
> could use
> it for versioning the binary with for instance svnrev (a small c-program: 
> http://www.compuphase.com/svnrev.htm), 
> which writes a header file with the most recent revision number and date 
> among all secified files.  

I know that feature from RCS/CVS. There you can define a set of static C
strings:

        static const char rcsid[] = "$Id$";

and retrieve them later (from both source and binaries) with a command
called "ident". Similarly in SCCS, except that the command is called
"what" there.

> For instance in dvbcut.cpp we could then use SVN_REV in your new setCaption 
> call 
> to identify the binary.

That would require that svnrev is available when you build the binary.

Keywords are substituted when a revision is checked out or updated (or,
in my case, checked in). That is, you can not check in the result from
svnrev at the same time because you must run the program afterwards. And
I don't want to run "svn ci" twice. Not because I'm lazy but because the
revision will change again when you do so - therefore, the stored
results from svnrev would always be slightly out of date.

But I guess I'll find another mechanism.

> Unfortunately subversion does not know a global revision keyword which could 
> be used 
> easlily for this purpose and the 'svnversion'  command works only for the svn 
> command 
> line client...  
> 
> What do you think? 

I've always been using keywords with my own (CVS based) projects, and
found them very convenient.

> PS: For easy keyword expansion you have to uncomment:
> 
> [miscellany]
> enable-auto-props = yes
> [auto-props]
> *.c = svn:eol-style=native;svn:keywords=Author Rev Id Date
> *.cpp = svn:eol-style=native;svn:keywords=Author Rev Id Date
> *.h = svn:eol-style=native;svn:keywords=Author Rev Id Date
> 
> in your ~/.subversion/config file if you don't want to enable it for every 
> single file by hand.

According to the comment in the config file, this must be set before you
add or import a file. Since dvbcut is already imported, changing the
props manually seems to be the only way. Fortunately, you can process
all files with a single file, using "-R". :-)

-- 
Michael "Tired" Riepe <[EMAIL PROTECTED]>
X-Tired: Each morning I get up I die a little

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
DVBCUT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dvbcut-user

Reply via email to