MCPcopy Create free account
hub / github.com/git/git / extractSettingsGitLog

Function extractSettingsGitLog

git-p4.py:1018–1041  ·  view source on GitHub ↗
(log)

Source from the content-addressed store, hash-verified

1016
1017
1018def extractSettingsGitLog(log):
1019 values = {}
1020 for line in log.split("\n"):
1021 line = line.strip()
1022 m = re.search(r"^ *\[git-p4: (.*)\]$", line)
1023 if not m:
1024 continue
1025
1026 assignments = m.group(1).split(':')
1027 for a in assignments:
1028 vals = a.split('=')
1029 key = vals[0].strip()
1030 val = ('='.join(vals[1:])).strip()
1031 if val.endswith('\"') and val.startswith('"'):
1032 val = val[1:-1]
1033
1034 values[key] = val
1035
1036 paths = values.get("depot-paths")
1037 if not paths:
1038 paths = values.get("depot-path")
1039 if paths:
1040 values['depot-paths'] = paths.split(',')
1041 return values
1042
1043
1044def gitBranchExists(branch):

Callers 7

findUpstreamBranchPointFunction · 0.85
exportGitTagsMethod · 0.85
gitCommitByP4ChangeMethod · 0.85
runMethod · 0.85
findLastP4RevisionMethod · 0.85
runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected