Modify

Opened 16 years ago

Closed 14 years ago

Last modified 14 years ago

#5351 closed defect (worksforme)

Incorrect author in timeline and log - GitPlugin shows committer instead of author

Reported by: egagnon@… Owned by: Herbert Valerio Riedel
Priority: normal Component: GitPlugin
Severity: normal Keywords:
Cc: stuge Trac Release: 0.12

Description

When the author differs from the committer, GitPlugin seems to favor the committer over the author as "Trac Author". This has impact in the timeline, log, and various other locations.

GitPlugin seems to have this concept of "Trac Author" in addition to "git-author" and "git-committer", as can be seen on: http://sablecc.org/changeset/1a3b6173986aa9cfc694acba0ecbbb7e40028f22

There might be reasons why a project would like to show the committer name, instead of the author name, in the timeline and log to show committer activity. Yet, other projects might have very few, or even a single committer in their official repository, as encouraged by Git. In such a case, it might make more sense to show the real author name in the timeline and log.

I suggest using a configuration flag to chose which of the git-author or git-committer to use as "Trac Author", so that everybody is pleased.

Attachments (3)

pass_repo.patch (3.4 KB) - added by roadrunner 15 years ago.
A small preparatory change
trac_author.patch (2.5 KB) - added by roadrunner 15 years ago.
Add trac_author config option
0001-Return-email-address-if-trac_user_rlookup-fails.patch (1.0 KB) - added by stuge 14 years ago.
Return email address if trac_user_rlookup fails

Download all attachments as: .zip

Change History (11)

comment:1 Changed 15 years ago by roadrunner

I'm attaching two patches that provide a configuration option for this. The first patch just sets up a couple things (and is identical to the first patch for #2685); the second is the main change, and provides a trac_author config option which defaults to 'committer' (i.e. the original behaviour).

Changed 15 years ago by roadrunner

Attachment: pass_repo.patch added

A small preparatory change

Changed 15 years ago by roadrunner

Attachment: trac_author.patch added

Add trac_author config option

comment:2 Changed 15 years ago by anonymous

Thanks!

How should I go about testing this? I currently use "apt-get trac-git" on Debian.

comment:3 in reply to:  2 Changed 15 years ago by roadrunner

Replying to anonymous:

How should I go about testing this? I currently use "apt-get trac-git" on Debian.

I don't know what that exactly installs (just the egg, or the expanded egg?). But you can check out the plugin from subversion or grab the zipped source for the plugin (see the links on the GitPlugin page), and then do something like

cd gitplugin/0.11
patch -p2 < .../pass_repo.patch
patch -p2 < .../trac_author.patch
easy_install .

This may overwrite the installed git-plugin files from you Debian package (and in fact you probably want to remove the Debian package first to avoid conflicts and confusion).

comment:4 Changed 15 years ago by anonymous

Could this please be integrated in the trunk?

comment:5 Changed 14 years ago by stuge

Cc: stuge added; anonymous removed

This change does look good. I would also like to see it included in the plugin.

comment:6 Changed 14 years ago by Herbert Valerio Riedel

Resolution: worksforme
Status: newclosed

fyi, a slightly different imeplementation has been implemented in 1e8a1470527d24aa23c99bd10afcfca224115943

comment:7 Changed 14 years ago by anonymous

Trac Release: 0.110.12

Changed 14 years ago by stuge

Return email address if trac_user_rlookup fails

comment:8 Changed 14 years ago by stuge

Perfect! :) I'd like to suggest also the patch I just attached, to fall back onto only the email address if no rlookup match is found.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Herbert Valerio Riedel.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.