mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 10:23:41 +00:00
BlenderBIM use git shortlog to summarise merge log
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import time
|
|
||||||
|
|
||||||
# allows git import even if git executable isn't found
|
# allows git import even if git executable isn't found
|
||||||
os.environ["GIT_PYTHON_REFRESH"] = "quiet"
|
os.environ["GIT_PYTHON_REFRESH"] = "quiet"
|
||||||
@@ -423,18 +422,13 @@ class IfcGit:
|
|||||||
|
|
||||||
repo.index.add(path_ifc)
|
repo.index.add(path_ifc)
|
||||||
|
|
||||||
message_summary = ""
|
message_summary = repo.git.shortlog(repo.active_branch.name + ".." + props.display_branch)
|
||||||
branch_commits = repo.iter_commits(rev=repo.active_branch.name + ".." + props.display_branch)
|
|
||||||
for commit in branch_commits:
|
|
||||||
message_summary += "\n\n" + commit.author.name + " <" + commit.author.email + ">\n"
|
|
||||||
message_summary += time.strftime("%c", time.localtime(commit.committed_date)) + "\n"
|
|
||||||
message_summary += commit.message
|
|
||||||
|
|
||||||
props.commit_message = (
|
props.commit_message = (
|
||||||
"Merge branch '" + props.display_branch + "' into " + repo.active_branch.name + message_summary
|
"Merge branch '" + props.display_branch + "' into " + repo.active_branch.name + "\n\n" + message_summary
|
||||||
)
|
)
|
||||||
props.display_branch = repo.active_branch.name
|
props.display_branch = repo.active_branch.name
|
||||||
|
|
||||||
|
cls.git_commit(path_ifc)
|
||||||
cls.load_project(path_ifc)
|
cls.load_project(path_ifc)
|
||||||
cls.refresh_revision_list(path_ifc)
|
cls.refresh_revision_list(path_ifc)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user