Can IntelliJ map user ids to names when annotating the Subversion view of the code

intellij-idea, java, svn

Solution

If we're to take the original question and specifically solve this with IDE SVN tooling then I wasn't able to solve this either.

If we're to take the original question as wanting useful IDE annotations with just a centralised SVN VCS and are a little git savvy then we can cheat.

- Create a mailmap file ` My Name <myname@example.com> useless1 <useless1@example.com> Your Name <yourname@example.com> useless2 <useless2@example.com> `

install git on your client machine if it's not already installed. This is probably a simpler prospect than getting new centralised tools approved.

Configure the mailmap file

`git config --global mailmap.file [PATH_TO_FILE]`

Alternatively (The choice I made)

Simply commit the mailmap file as .mailmap to the root of your svn repository on trunk and other branches if needed. The advantage of this of course is that it's in source control and can be project specific where others can contribute vs. a client specific map all just for you. You do not need to configure the mailmap.file property in this case as this is the default mailmap for the repository and seems to be loaded first in any case.

make `git-log`, `git-show`, and `git-whatchanged` assume `--use-mailmap` with the following command

`git config --global log.mailmap true`

do a `git-svn` clone of your remote SVN repository (be prepared to wait if you want ALL the histroy for big repositories)

`git svn clone [SVN-URL] --stdlayout`

If your svn repo is not standard then you may need to specifically configure trunk, branch, tag options and potentially username if your logged in user is different.

reimport the now `git-svn` cloned project into your IDE and now your dealing with a local git repository where your remote is a SVN repository.

Voila. Your IDE now has the much more useful names in your annotations and in your CLI git logs. In this case we've got git feeding the IDE the annotations you're wanting to see. It's better than nothing, but it's not all clear sailing though.

Note: Jetbrains IDE's appear to have a couple of defects where:

- the log appears to ignore the git config and the mailmap IDEA-160677

- the annotations seem to randomly use the mapping. A restart of the IDE also helps if you really need them now. Very odd. IDEA-121066

If this is still useful to you after 2 years then I suggest you up-vote the jetbrains bugs.

References:

- git-svn

- git-config

Problem

I can user VCS -> Subversion -> annotate, to tell IntelliJ (12) to annotate lines of code with the user that last checked in a particular line. Where I work currently, these user ids are just numbers and letters. Does anyone know if there is a way for me to input a mapping from ids to more user friendly developer names? A plugin perhaps? I know there are code review tools out there to help me, either JetBrains or Atlassian ones, or something else, but we don't have those here, and getting new tools approved is a long process here. If I could just do the above it would help me a lot.

Original source