Merge branch 'ls/p4-map-user'
"git p4" now allows P4 author names to be mapped to Git author names. * ls/p4-map-user: git-p4: map a P4 user to Git author name and email address
This commit is contained in:
@ -1160,6 +1160,15 @@ class P4UserMap:
|
||||
self.users[output["User"]] = output["FullName"] + " <" + output["Email"] + ">"
|
||||
self.emails[output["Email"]] = output["User"]
|
||||
|
||||
mapUserConfigRegex = re.compile(r"^\s*(\S+)\s*=\s*(.+)\s*<(\S+)>\s*$", re.VERBOSE)
|
||||
for mapUserConfig in gitConfigList("git-p4.mapUser"):
|
||||
mapUser = mapUserConfigRegex.findall(mapUserConfig)
|
||||
if mapUser and len(mapUser[0]) == 3:
|
||||
user = mapUser[0][0]
|
||||
fullname = mapUser[0][1]
|
||||
email = mapUser[0][2]
|
||||
self.users[user] = fullname + " <" + email + ">"
|
||||
self.emails[email] = user
|
||||
|
||||
s = ''
|
||||
for (key, val) in self.users.items():
|
||||
|
||||
Reference in New Issue
Block a user