Page MenuHomePhabricator

Allow users to set their VCS names
Closed, DuplicatePublic

Description

When users select names that are too different from the VCS names, phab doesn't detect them correctly. In that case, it would be nice if the user had a simple way to say "that's me".

Event Timeline

Probably a good candidate for building on {T1703}.

This problem potentially has very large scope -- at Facebook, many users (particularly ezra and mcslee) had dozens of VCS aliases (primarily from manual "Reviewed By" over a long period of time) and it would have been unreasonable to get a high-quality association between commits and authors by having users manually pick VCS names. Even I had a dozen or so because my last name is hard to spell / easy to typo. Phabricator can also track multiple repositories, and the same user might have different names in different repositories (and different users might have the same name in separate repositories, for that matter).

I think these hard cases are already well-handled by the PhabricatorEventType::TYPE_DIFFUSION_LOOKUPUSER event (which gives you all the information you need to go look up the answer in an external datasource), and I think we do the best job we can in the easy cases where users have given us enough information that we can plausibly guess who is who. But the cases in between, where there are a smaller number of more consistent usernames and no one wants to build an event listener and manually build/curate the alias list aren't well served right now.

Another other problem is that commits are associated with authors at parse/import time, so setting a VCS name will work going forward but not retroactively. Administrators can fix retroactive commits with ./scripts/repository/reparse.php --all --message X, where X is the callsign, but this is bound to cause some confusion (similar to how people show up somewhat regularly with confusion about Differential caches after enabling Pygments). I don't think we necessarily need to make this "just work", but should provide messaging so expectations are clear.

If you actually meant to claim this let me know; I assume you were just testing.

D7801 is only slightly related, but moves the infrastructure here closer.

This is getting more and more of an issue - now the reverse case happened - we had a user set up a phabricator user name that (by chance) matched the subversion user name of a different user.

We hit the issue too.

And we workaround it by change VCS name to user name and keep it as a rule for all team members. But anyway, if we can provide a field in profile to create mapping, that will be great.

epriestley changed the visibility from "All Users" to "Public (No Login Required)".Oct 24 2014, 1:05 PM

This extension will help with the mapping of old vcs aliases: https://github.com/make-all/libphalias

It was made for parsing svn aliases files, but any file parsable by parse_ini_file should work.

I'm going to merge this into T12164, which I think is a more powerful approach on this.

I anticipate the workflow after that being:

  • find a commit you authored that isn't correctly associated with your account;
  • click the author name (like evan <ejp@dogewow.com>) or some button nearby;
  • click "this is me";
  • all past and future commits using that string are immediately associated with your account.

This solves existing issues with retroactive association, and should be easier to use in most cases than having to go into Settings and manually add a bunch of alternate names, and easier to build UI for than dealing with cases where two users claim they're both jsmith.