Question

My current project asks us to follow a certain format for our commit messages. (The project uses SVN.)

In Mylyn format, it would translate to something like this:

${USER_INITIALS}: ${task.key} [(${connector.task.prefix}) "${task.description}"] -

The ${USER_INITIALS} variable is "pseudo-code", while the rest are working Mylyn commit variables.

It would be slick if I could use an environment variable, and save the template down to .settings/org.eclipse.mylyn.team.ui.prefs. Then, everyone on the project could use it.

I have tried the actual pseudo-code above (and also the already-existing PATH and USER environment variables). None of these resolves, apparently, because upon commit, they are replaced with an empty string.

Is there a solution?


P.S. Why not just rely on the SVN username, which is already a property of every SVN commit? Because we have integrated SVN with our LDAP server, and it returns our (numeric) EMPLID, which nobody could attribute without manual lookup. Therefore, it's not terribly useful for at-a-glance attribution (which is what is desired).

Was it helpful?

Solution

I agree that Mylyn should be able to pull environment variables into a commit message but I don't think it's currently possible.

I looked at the Mylyn source and docs and couldn't figure out a way to accomplish this within Mylyn directly, I think you're only option is to create a SVN hook/trigger that would either expand the environment variables for you or inject them at specific location within all commit log messages.

For reference I checked out a copy of the code base from here: http://wiki.eclipse.org/index.php/Mylyn/Contributor_Reference#Active_branches

OTHER TIPS

Could you use ${task.assignee}? For me that returns the initials of the relevant user.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top