Jump to content

Git Sync Email Mapping Not Working


AaronKOG
 Share

Recommended Posts

How do I know that the gitsync.conf is in effect and debug it if I've made a mistake in placement/format etc? Also curious about getting full details of options and placement of the file. I have my email mapped in the file like so

[email-mapping]
aaronm = aaron@xxxxxxxx.co

I put the file in "C:\Users\username\AppData\Local\plastic4" and "C:\Program Files\PlasticSCM5\client".

But when I sync (this is a fresh sync of a remote git repository, previously I tried adding a gitsync.conf then rerunning gitsync for an existing repo and it didn't seem to do anything either) the changesets author isn't aaronm like I would expect:

image.png.5e5323629dcc997a54ef92e08f3360f6.png

This is the info of the commit from git:

image.png.270eb247c759ceba64492f15eeede7af.png

"Aaron M" also seems to be taking up a license for some reason which I'm trying to resolve by mapping. Any help with fixing this would be appreciated.

Thanks,

Aaron

Link to comment
Share on other sites

Also, not sure if it is related, but for the last month or so when I make a commit on Plastic and sync to plastic on git I get aaron@xxxx.co as the email for the commit:

image.png.57c55a652f8ddb56c6029b21970a10c9.png

Prior to that the email was left out:

image.png.068874d4b8acd23764d491dc8271d687.png

Wonder if the mapping is the cause or maybe a plastic update?

Would like to also sort that out so that I can not have both aaronm+noemail and aaronm+aaron@xxx.co in the history.

Thanks,

Aaron

Link to comment
Share on other sites

Hi,

Quote

 I put the file in "C:\Users\username\AppData\Local\plastic4" and "C:\Program Files\PlasticSCM5\client".

- The Plastic client binaries folder has more priority than the user folder. Please just use one of them to keep it simpler. You need to restart the Plastic GUi after editing it.

- The format is: https://www.plasticscm.com/documentation/gitsync/plastic-scm-version-control-gitsync-guide

plastic_user = git_email_address

- You can directly deactive the license for the user created via GitSync. You don't need it in your Plastic server.

http://blog.plasticscm.com/2016/01/how-to-manage-plastic-scm-licenses.html

Quote

Also, not sure if it is related, but for the last month or so when I make a commit on Plastic and sync to plastic on git I get aaron@xxxx.co as the email for the commit:

- This is what you actually configured in the "gitsync.conf" so it makes sense, right? It's working as expected.

- For the previous repo history where the "gitsync.conf" was not still there, you won't have email-mapping working. The old commits with a different author/email cannot be rewritten.

For the full repo history to have this email-mapping working, you would need to create a new git empty repo and sync the Plastic repo from scratch (while the email-mapping configuration is enabled).

Regards,

Carlos.

Link to comment
Share on other sites

Okay so my impression of how the email mapping worked was incorrect then. I thought that it would convert the author of matching email to the plastic username. So by having that mapping I expected that when I got a author with the email aaron@xxxx.co its username would be changed to aaronm when the changelist pulls into plastic (converted from "Aaron Mxxxx"). Was mainly trying to use the mapping to lower the license usage.

That's fine. The described intended effects sounds good to me.

So I need to deactivate the git user by running:

cm deactivateuser "Aaron Mxxxx"

Correct? Is it also good to assume that it won't get reactivated as I pull new CLs from git?

Thanks,

Aaron

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...