Gource icon indicating copy to clipboard operation
Gource copied to clipboard

Feature Request: Aliases for users

Open nchutchind opened this issue 6 years ago • 7 comments
trafficstars

Sometimes the same user might have committed to the same source under multiple usernames. Maybe the username changed (got bored, got married, etc), or maybe they accidentally committed using the wrong account. Who knows? But it's possible.

It would be nice to be able to provide a username and a list of aliases that can all be grouped under that one username when displaying the video.

A user may be doing the work of two developers, but it's still off putting to actually see two developers show up. :)

nchutchind avatar Oct 17 '19 14:10 nchutchind

Or, committing from different machines to the same repo. Or company got bought up and renamed. I like this idea! (Aliases, that is)

Ryuno-Ki avatar Oct 17 '19 18:10 Ryuno-Ki

I found a workable solution for now.

gource --output-custom-log repo-activity.txt

Now, you can manually CTRL+H find and replace all of the "wrong" names with the right ones. Or, if you're in *nix, you can probably gawk the replacements in the command line pretty easily.

Combine those replacements with using user images, and the visualiztion shapes up pretty nicely.

nchutchind avatar Oct 17 '19 18:10 nchutchind

Or you can make a script do it for you:

(IFS="|"
while read wrong_name name; do
  sed -i "s/|$wrong_name|/|$name|/g" gource.txt
done < name_replacements.txt)

And then in the name_replacements.txt file you entries like this

Peeter|Peter
Old stupid Nickname|N3w b3tt3r c00l N1CkNaM3

BrainStone avatar Nov 05 '19 10:11 BrainStone

Another case:

  • at my local machine I named as "Wohlstand"
  • at my GitHub, I named "Vitaly Novichkov"
  • when I commit locally, that shown as "Wohlstand"
  • when I edited by web on GitHub, that shown as "Vitaly Novichkov"
  • both usernames has the same email

Wohlstand avatar Jul 12 '21 10:07 Wohlstand

@Wohlstand: I did not test is but I assume in your case, adding a .mailmap file to your repository could fix the issue by already standardizing the name in the git log output parsed by Gource.

mschilli87 avatar Jul 14 '21 05:07 mschilli87

I found a workable solution for now.

gource --output-custom-log repo-activity.txt

Now, you can manually CTRL+H find and replace all of the "wrong" names with the right ones. Or, if you're in *nix, you can probably gawk the replacements in the command line pretty easily.

Combine those replacements with using user images, and the visualiztion shapes up pretty nicely.

i did this and replaced all wrong usernames with the right one.. now i have this repo-activity.txt.. but what i do with this file?

SvenBudak avatar Feb 06 '24 23:02 SvenBudak

@SvenBudak:

... now i have this repo-activity.txt.. but what i do with this file?

You pass it back to gource via the --path argument.

mschilli87 avatar Feb 07 '24 07:02 mschilli87