src/eric7/Plugins/VcsPlugins/vcsGit/GitLogBrowserDialog.py

branch
eric7
changeset 9421
989ee2535d59
parent 9413
80c06d472826
child 9473
3f23dbf37dbe
equal deleted inserted replaced
9420:92810aebc909 9421:989ee2535d59
155 self.vcs = vcs 155 self.vcs = vcs
156 156
157 self.__detailsTemplate = self.tr( 157 self.__detailsTemplate = self.tr(
158 "<table>" 158 "<table>"
159 "<tr><td><b>Commit ID</b></td><td>{0}</td></tr>" 159 "<tr><td><b>Commit ID</b></td><td>{0}</td></tr>"
160 "<tr><td colspan='2'>{10}</td></tr>"
160 "<tr><td><b>Date</b></td><td>{1}</td></tr>" 161 "<tr><td><b>Date</b></td><td>{1}</td></tr>"
161 "<tr><td><b>Author</b></td><td>{2} &lt;{3}&gt;</td></tr>" 162 "<tr><td><b>Author</b></td><td>{2} &lt;{3}&gt;</td></tr>"
162 "<tr><td><b>Commit Date</b></td><td>{4}</td></tr>" 163 "<tr><td><b>Commit Date</b></td><td>{4}</td></tr>"
163 "<tr><td><b>Committer</b></td><td>{5} &lt;{6}&gt;</td></tr>" 164 "<tr><td><b>Committer</b></td><td>{5} &lt;{6}&gt;</td></tr>"
164 "{7}" 165 "{7}"
177 self.__mesageTemplate = self.tr("<tr><td><b>Message</b></td><td>{0}</td></tr>") 178 self.__mesageTemplate = self.tr("<tr><td><b>Message</b></td><td>{0}</td></tr>")
178 179
179 self.__formatTemplate = ( 180 self.__formatTemplate = (
180 "format:recordstart%n" 181 "format:recordstart%n"
181 "commit|%h%n" 182 "commit|%h%n"
183 "fullcommit|%H%n"
182 "parents|%p%n" 184 "parents|%p%n"
183 "author|%an%n" 185 "author|%an%n"
184 "authormail|%ae%n" 186 "authormail|%ae%n"
185 "authordate|%ai%n" 187 "authordate|%ai%n"
186 "committer|%cn%n" 188 "committer|%cn%n"
211 self.__edgesRole = Qt.ItemDataRole.UserRole + 3 213 self.__edgesRole = Qt.ItemDataRole.UserRole + 3
212 self.__parentsRole = Qt.ItemDataRole.UserRole + 4 214 self.__parentsRole = Qt.ItemDataRole.UserRole + 4
213 self.__branchesRole = Qt.ItemDataRole.UserRole + 5 215 self.__branchesRole = Qt.ItemDataRole.UserRole + 5
214 self.__authorMailRole = Qt.ItemDataRole.UserRole + 6 216 self.__authorMailRole = Qt.ItemDataRole.UserRole + 6
215 self.__committerMailRole = Qt.ItemDataRole.UserRole + 7 217 self.__committerMailRole = Qt.ItemDataRole.UserRole + 7
218 self.__fullCommitIdRole = Qt.ItemDataRole.UserRole + 8
216 219
217 # roles used in the file tree 220 # roles used in the file tree
218 self.__diffFileLineRole = Qt.ItemDataRole.UserRole 221 self.__diffFileLineRole = Qt.ItemDataRole.UserRole
219 222
220 self.__process = EricOverrideCursorProcess() 223 self.__process = EricOverrideCursorProcess()
679 committer, 682 committer,
680 commitDate, 683 commitDate,
681 subject, 684 subject,
682 message, 685 message,
683 commitId, 686 commitId,
687 fullCommitId,
684 changedPaths, 688 changedPaths,
685 parents, 689 parents,
686 refnames, 690 refnames,
687 authorMail, 691 authorMail,
688 committerMail, 692 committerMail,
695 @param committer committer info (string) 699 @param committer committer info (string)
696 @param commitDate commit date info (string) 700 @param commitDate commit date info (string)
697 @param subject subject of the log entry (string) 701 @param subject subject of the log entry (string)
698 @param message text of the log message (list of strings) 702 @param message text of the log message (list of strings)
699 @param commitId commit id info (string) 703 @param commitId commit id info (string)
704 @param fullCommitId unabbreviated commit id info (string)
700 @param changedPaths list of dictionary objects containing 705 @param changedPaths list of dictionary objects containing
701 info about the changed files/directories 706 info about the changed files/directories
702 @param parents list of parent revisions (list of integers) 707 @param parents list of parent revisions (list of integers)
703 @param refnames tags and branches of the commit (string) 708 @param refnames tags and branches of the commit (string)
704 @param authorMail author's email address (string) 709 @param authorMail author's email address (string)
753 itm.setData(0, self.__changesRole, changedPaths) 758 itm.setData(0, self.__changesRole, changedPaths)
754 itm.setData(0, self.__edgesRole, edges) 759 itm.setData(0, self.__edgesRole, edges)
755 itm.setData(0, self.__branchesRole, allBranches) 760 itm.setData(0, self.__branchesRole, allBranches)
756 itm.setData(0, self.__authorMailRole, authorMail) 761 itm.setData(0, self.__authorMailRole, authorMail)
757 itm.setData(0, self.__committerMailRole, committerMail) 762 itm.setData(0, self.__committerMailRole, committerMail)
763 itm.setData(0, self.__fullCommitIdRole, fullCommitId)
758 if not parents: 764 if not parents:
759 itm.setData(0, self.__parentsRole, []) 765 itm.setData(0, self.__parentsRole, [])
760 else: 766 else:
761 itm.setData(0, self.__parentsRole, parents) 767 itm.setData(0, self.__parentsRole, parents)
762 for parent in parents: 768 for parent in parents:
958 logEntry["committer"], 964 logEntry["committer"],
959 logEntry["committerdate"], 965 logEntry["committerdate"],
960 logEntry["subject"], 966 logEntry["subject"],
961 logEntry["body"], 967 logEntry["body"],
962 logEntry["commit"], 968 logEntry["commit"],
969 logEntry["fullcommit"],
963 logEntry["changed_files"], 970 logEntry["changed_files"],
964 logEntry["parents"], 971 logEntry["parents"],
965 logEntry["refnames"], 972 logEntry["refnames"],
966 logEntry["authormail"], 973 logEntry["authormail"],
967 logEntry["committermail"], 974 logEntry["committermail"],
1047 except ValueError: 1054 except ValueError:
1048 key = "" 1055 key = ""
1049 value = line 1056 value = line
1050 if key in ( 1057 if key in (
1051 "commit", 1058 "commit",
1059 "fullcommit",
1052 "parents", 1060 "parents",
1053 "author", 1061 "author",
1054 "authormail", 1062 "authormail",
1055 "authordate", 1063 "authordate",
1056 "committer", 1064 "committer",
1477 itm.text(self.CommitterColumn), 1485 itm.text(self.CommitterColumn),
1478 itm.data(0, self.__committerMailRole).strip(), 1486 itm.data(0, self.__committerMailRole).strip(),
1479 parentsStr + childrenStr + branchesStr + tagsStr, 1487 parentsStr + childrenStr + branchesStr + tagsStr,
1480 itm.data(0, self.__subjectRole), 1488 itm.data(0, self.__subjectRole),
1481 messageStr, 1489 messageStr,
1490 itm.data(0, self.__fullCommitIdRole).strip(),
1482 ) 1491 )
1483 else: 1492 else:
1484 html = "" 1493 html = ""
1485 1494
1486 return html 1495 return html

eric ide

mercurial