[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: history of a file as a comment in the file

From: Benjamin Smith-Mannschott <bsmith.occs_at_gmail.com>
Date: Tue, 18 Mar 2008 20:02:46 +0100

On Mar 18, 2008, at 16:31, Matt imMute Sickler wrote:
> Schroeder, Hartmut wrote:
>> Hi,
>> is there a possibility in subversion to include the history of a
>> file as
>> a comment in the file?
>> (in PVCS that can be done via the keyword $log$)
>> thanks.
>> hartmut
>
> Simply, no.
>
> Slightly more complicated, svn doesnt do that because it would be
> difficult to keep track of what text was part of the log and which
> parts are not.

No. That's not the problem. This is:

     [FAQ: http://subversion.tigris.org/faq.html#log-in-source]

     Does Subversion have a keyword which behaves like $Log$ in CVS?
     No. There is no equivalent for the $Log$ keyword in CVS. If you
     want to retrieve a log for a specific file, you can run 'svn log
     your-file-name' or 'svn log url-to-your-file'. From the mailing
     list some explanations why $Log$ is bad:

         "$Log$ is a total horror the moment you start merging changes
         between branches. You're practically guaranteed to get
conflicts
         there, which -- because of the nature of this keyword -- simply
         cannot be resolved automatically."

     And:

         Subversion log messages are mutable, they can be changed by
         setting the svn:log revision property. So the expansion of
         $Log:$ in any given file could be out of date. Update may well
         need to retrieve the appropriate log message for each
occurrence
         of the $Log:$ keyword, even if the file that contained it was
         not otherwise updated.

     [/FAQ]

> If you write a patch that implements this, I am sure the dev team
> would welcome it.

Doubtful.

     [FAQ: http://subversion.tigris.org/faq.html#log-in-source]

     I don't care about that. I want to use it anyway. Will you
     implement it?

     No. There are no plans to implement it ourselves or accept
     patches which implement this feature. If you want to distribute
     your files with some kind of changelog included, you might be
     able to work around this limitation in your build system.

     [/FAQ]

// Ben Smith-Mannschott

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-03-18 20:03:24 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.