At our company, we set the standard "username" attribute for our Mercurial users to be "Full Name <e-mail>" which, unfortunately, cannot be retrieved properly by TeamCity's LDAP configuration. Although our LDAP does hold a user's full name and e-mail address, it does not have any one variable that matches a user's Mercurial "username." Thus, we cannot get LDAP to syncronize with our TeamCity server correctly unless we do one of the following:
- Force a new standard on everyone such that they set their .hgrc file's "username" attribute to match one of the LDAP fields. This could be e-mail, username, or full name.
- Just manually edit everyone's vcs root name or request that they input it themselves in order to set up their notifications properly. AKA: Not even bother synchronizing.
- Request a feature that allows regex use inside TeamCity's LDAP config file, thus allowing us to pull and format LDAP's attributes to match what we get from Mercurial.
- Insert a new LDAP field that would match our .hgrc file's "username" format.
- Request a feature that would make TeamCity's Mercurial plug-in use (and display) a user's unix name instead of the "username" set in their .hgrc file.
To be honest, I'm leaning toward the last bullet point. We like keeping our current username format so that commit messages look nicer, but if it means TeamCity's front page is going to be full of long names that are all getting cut apart, it begins to look real ugly. Matching unix name would be easiest for LDAP sync and would keep us from commiting any errors related to .hgrc's settings; which are local to each user, not centralized anywhere, and thus not a very good attribute for TeamCity to keep track of!
I'd love to hear what other folks here think and any other possible solutions available that don't require my learning java just to write a plug-in to make this work better.