git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/3] git-svn: Add --add-author-from option.

From
Sam Vilain <sam@vilain.net>
Date
Apr 16, 2008, 22:24 UTC
Message-ID
<48067C83.4020209@vilain.net>
In-Reply-To
<20080416192312.GF3133@dpotapov.dyndns.org>
Dmitry Potapov wrote:
Show 29 quoted lines
> On Wed, Apr 16, 2008 at 11:36:26AM -0700, Junio C Hamano wrote:
>   
>> It makes me wonder if there is a better way.
>>
>> For example, CVS honors LOGNAME to allow you to "lie" who the author of a
>> change was, which is the behaviour inherited from RCS.  I have to wonder
>> if SVN has a similar mechanism to tell it "Excuse me, but I am just a
>> secretary recording changes for my boss."
>>     
>
> Yes, there is such a mechanism:
> ====
> Revision Property (revprop)
>
> Just as files can have properties, so can each revision in the
> repository. Some special revprops are added automatically when the
> revision is created, namely: svn:date svn:author svn:log which represent
> the commit date/time, the committer and the log message respectively.
> These properties can be edited, but they are not versioned, so any
> change is permanent and cannot be undone. 
> ====
>
> So, it is possible not only set the real author but also date/time.
> Unfortunately, there is one problem with this approach -- by default,
> these properties are disabled from modification for security reasons.
> To enable modification of these properties, the administrator is
> required to change some hooks. Personally, I have never observed any
> SVN repository where anyone was granted the right to change them. So,
> while it is possible, it is impractical.

Yes, and in fact with most shared SVN hosting services the users are left with no option to do this.

While there doesn't seem to be a command-line way to do this, it's possible that a commit "editor" making a new commit can create revision properties without being necessarily subject to those restrictions. Possible, but I guess unlikely as it would then be inconsistent.

The usual thing is to dump the extra information in the commit message. Some projects, like Perl, were quite systematic about this and a lot of useful author information is available. In fact, it was saved in the proposed form.

While not the main thrust of this thread, the usual convention for mapping svn committers to names is a project AUTHORS file. This made me wonder whether allowing git-svn to take its author map from the repository, such as from a revision property or a directory property of the root or project would be a good idea.

Sam
Previous: Dmitry PotapovNext: Avery Pennarun
Message 10 of 12 in “git-svn: add documentation for --use-log-author option.”
  1. 1/3 git-svn: add documentation for --use-log-author option.apenwarr@gmail.com, Apr 16, 2008
  2. 2/3 git-svn: Add --add-author-from option.apenwarr@gmail.com, Apr 16, 2008
  3. 3/3 git-svn: add documentation for --add-author-from option.apenwarr@gmail.com, Apr 16, 2008
  4. Junio C HamanoApr 16, 2008
  5. Avery PennarunApr 16, 2008
  6. Junio C HamanoApr 16, 2008
  7. Avery PennarunApr 16, 2008
  8. Richard QuirkApr 16, 2008
  9. Dmitry PotapovApr 16, 2008
  10. Sam VilainApr 16, 2008
  11. Avery PennarunApr 16, 2008
  12. Eric WongApr 17, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.