mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
BlenderBIM fix Git error on simple merge (#3096)
Running git commit after a simple merge (that hasn't required conflict resolution) is a noop, but generates an annoying message anyway.
This commit is contained in:
@@ -373,6 +373,11 @@ class IfcGit:
|
|||||||
config_writer = IfcGitRepo.repo.config_writer()
|
config_writer = IfcGitRepo.repo.config_writer()
|
||||||
config_writer.set_value(section, "cmd", "ifcmerge $BASE $LOCAL $REMOTE $MERGED")
|
config_writer.set_value(section, "cmd", "ifcmerge $BASE $LOCAL $REMOTE $MERGED")
|
||||||
config_writer.set_value(section, "trustExitCode", True)
|
config_writer.set_value(section, "trustExitCode", True)
|
||||||
|
section = 'mergetool "ifcmerge-forward"'
|
||||||
|
if not config_reader.has_section(section):
|
||||||
|
config_writer = IfcGitRepo.repo.config_writer()
|
||||||
|
config_writer.set_value(section, "cmd", "ifcmerge $BASE $REMOTE $LOCAL $MERGED")
|
||||||
|
config_writer.set_value(section, "trustExitCode", True)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def config_info_attributes(cls, repo):
|
def config_info_attributes(cls, repo):
|
||||||
@@ -415,6 +420,11 @@ class IfcGit:
|
|||||||
|
|
||||||
operator.report({"ERROR"}, "IFC Merge failed:" + message)
|
operator.report({"ERROR"}, "IFC Merge failed:" + message)
|
||||||
return False
|
return False
|
||||||
|
else:
|
||||||
|
if os.name == "nt":
|
||||||
|
cls.dos2unix(path_ifc)
|
||||||
|
repo.index.add(path_ifc)
|
||||||
|
repo.git.commit("--no-edit")
|
||||||
except:
|
except:
|
||||||
|
|
||||||
operator.report({"ERROR"}, "Unknown IFC Merge failure")
|
operator.report({"ERROR"}, "Unknown IFC Merge failure")
|
||||||
@@ -422,10 +432,6 @@ class IfcGit:
|
|||||||
|
|
||||||
props.display_branch = repo.active_branch.name
|
props.display_branch = repo.active_branch.name
|
||||||
|
|
||||||
if os.name == "nt":
|
|
||||||
cls.dos2unix(path_ifc)
|
|
||||||
repo.index.add(path_ifc)
|
|
||||||
repo.git.commit("--no-edit")
|
|
||||||
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