You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by greg milich <gm...@optonline.net> on 2004/07/20 02:48:23 UTC

using $Header $ and $Log $

Using CVS we put this at the top of our java files ...
We migrated to svn and this does not seem to do the trick,
I assume svn has a similar capability ...what are we missing.
Also old file which have header and log histories from cvs are
not updated with log info from svn.

We can't seem to find this documented ... Please shed some light on this ... thanks.

Greg


** $Header: $
**
\****************************************************************************/
/****************************************************************************\
**
** $Log:  $
**
\****************************************************************************/

Re: using $Header $ and $Log $

Posted by "C. Michael Pilato" <cm...@collab.net>.
greg milich <gm...@optonline.net> writes:

> Using CVS we put this at the top of our java files ...
> We migrated to svn and this does not seem to do the trick,
> I assume svn has a similar capability ...what are we missing.
> Also old file which have header and log histories from cvs are
> not updated with log info from svn.

Subversion doesn't support these keywords.  Sorry about that.  See the
following URL for information about what keywords *are* supported:

   http://svnbook.red-bean.com/svnbook/ch07s02.html#svn-ch-7-sect-2.3.4

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

Re: using $Header $ and $Log $

Posted by John Peacock <jp...@rowman.com>.
Stuart Arnold wrote:

> My script actually uses that field(filepath) to open the repository for the
> file
> It then retrieves the revision info(history/log) between an old build of a
> program and the newest one.
> It then generates reports from these results so we can confirm what went
> into a build.

Since you didn't state what portion of $Header$ you were using, I 
couldn't speculate about what to suggest as an alternative.  You will 
need to rewrite any reports to hit the appropriate URL's for the 
Subversion repository.

However, since Subversion is not file-based like CVS, your reports can 
probably be more easily generated by using:

	svn log \
	http://server/path/to/old/release \
	http://server/path/to/new/release

(beware linewraps).  In other words, if you are following the suggested 
repository layout for Subversion, instead of trying to use your CVS 
model, you can get a log between two tags directly, rather than querying 
each file individually.

> 
> I guess what I'm getting to is that $Header$ keeps some "path" to its
> location in the repository and
> that it be consistent,eg, $HeadURL$ should be used for the "file" portion.

$HeadURL$ is the only way to the the path information for a given file. 
  It is more consistent than the equivalent RCS information presented 
from CVS since it is the actual URL needed to retrieve the log 
information, as opposed to the relative pathname within the RCS/CVS 
repository.

HTH

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

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

RE: using $Header $ and $Log $

Posted by Stuart Arnold <sj...@mdtsoft.com>.
John,
Thanks for getting back on this subject, but there is some clarification on
it:

$Header$ is not the same as $Id$.
$Id$ does not have the path. $Header$ does (I just checked with the CVS docs
on this) and that's the only diff.

My script actually uses that field(filepath) to open the repository for the
file
It then retrieves the revision info(history/log) between an old build of a
program and the newest one.
It then generates reports from these results so we can confirm what went
into a build.

I guess what I'm getting to is that $Header$ keeps some "path" to its
location in the repository and
that it be consistent,eg, $HeadURL$ should be used for the "file" portion.

thanks for looking into this.
--


It is MDT, Inc's policy to delete mail containing unsolicited file
attachments. Please be sure to contact the MDT staff member BEFORE sending
an e-mail with any file attachments; they will be able to arrange for the
files to be received. This email, and any files transmitted with it, is
confidential and intended solely for the use of the individual or entity to
whom they are addressed. If you have received this email in error, please
advise mailto:postmaster@mdtsoft.com.

- Stuart Arnold
MDT Software
Alpharetta, GA
W: 678.297.1027
Email(W): sja@mdtsoft.com <ma...@mdtsoft.com>




-----Original Message-----
From: John Peacock [mailto:jpeacock@rowman.com]
Sent: Tuesday, July 20, 2004 9:15 AM
To: sja@mdtsoft.com
Cc: greg milich; dev@subversion.tigris.org
Subject: Re: using $Header $ and $Log $


Stuart Arnold wrote:
> We are very new to SVN (official start date is next week) and are
> looking at any possible problems.
> This will be a high one. So, how/who can implement putting in this
keyword?

I'm working on a patch to Subversion which will allow for site specific
custom keywords, but it will not support any multiline keyword
(specifically $Log$).  The $Header$ keyword in CVS is equivalent to $Id$
in Subversion (if you really need the full file path, use $HeadURL in
addition).

HTH

John

--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748


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

Re: using $Header $ and $Log $

Posted by John Peacock <jp...@rowman.com>.
Stuart Arnold wrote:
> We are very new to SVN (official start date is next week) and are 
> looking at any possible problems.
> This will be a high one. So, how/who can implement putting in this keyword?

I'm working on a patch to Subversion which will allow for site specific 
custom keywords, but it will not support any multiline keyword 
(specifically $Log$).  The $Header$ keyword in CVS is equivalent to $Id$ 
in Subversion (if you really need the full file path, use $HeadURL in 
addition).

HTH

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

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

RE: using $Header $ and $Log $

Posted by Stuart Arnold <sj...@mdtsoft.com>.
We use the $Header: $ and $History: $ as well (currently under VSS, migrating to SVN).
We do NOT use the $Id:$ because of the various interpretations of it in different RCS systems (file name only, no path).
All systems I've seen have supported "$Header: $"

We also USE this tag by running "ident" on the .exe/.dll and have a perl script
that grabs the embedded id and makes a report on the differences (it gets the history from vss).
This helps to see what actually got in our builds.

We are very new to SVN (official start date is next week) and are looking at any possible problems.
This will be a high one. So, how/who can implement putting in this keyword?

BTW-
Don't put this vital keyword in comments. It doesn't do any good. Use this (for C)
    static char rcsid_my_filename_cpp[] = "$Header: $";
You want to be able to get this tag out of any compiled code (exe/dll). Be careful on "included" files to make them "safe named".


--

It is MDT, Inc's policy to delete mail containing unsolicited file attachments. Please be sure to contact the MDT staff member
BEFORE sending an e-mail with any file attachments; they will be able to arrange for the files to be received. This email, and any
files transmitted with it, is confidential and intended solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error, please advise postmaster@mdtsoft.com.

- Stuart Arnold
MDT Software
Alpharetta, GA
W: 678.297.1027
Email(W): sja@mdtsoft.com


  -----Original Message-----
  From: greg milich [mailto:gmilich@optonline.net]
  Sent: Monday, July 19, 2004 10:48 PM
  To: dev@subversion.tigris.org
  Subject: using $Header $ and $Log $


  Using CVS we put this at the top of our java files ...
  We migrated to svn and this does not seem to do the trick,
  I assume svn has a similar capability ...what are we missing.
  Also old file which have header and log histories from cvs are
  not updated with log info from svn.

  We can't seem to find this documented ... Please shed some light on this ... thanks.

  Greg


  ** $Header: $
  **
  \****************************************************************************/
  /****************************************************************************\
  **
  ** $Log:  $
  **
  \****************************************************************************/