mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-04 11:20:53 +01:00
merge with branch issue-474
This commit is contained in:
@@ -83,7 +83,6 @@ public class GitChangesetConverter implements Closeable
|
||||
*
|
||||
*
|
||||
* @param repository
|
||||
* @param idLength
|
||||
*/
|
||||
public GitChangesetConverter(org.eclipse.jgit.lib.Repository repository)
|
||||
{
|
||||
@@ -96,7 +95,6 @@ public class GitChangesetConverter implements Closeable
|
||||
*
|
||||
* @param repository
|
||||
* @param revWalk
|
||||
* @param idLength
|
||||
*/
|
||||
public GitChangesetConverter(org.eclipse.jgit.lib.Repository repository,
|
||||
RevWalk revWalk)
|
||||
@@ -195,7 +193,13 @@ public class GitChangesetConverter implements Closeable
|
||||
PersonIdent authorIndent = commit.getAuthorIdent();
|
||||
Person author = new Person(authorIndent.getName(),
|
||||
authorIndent.getEmailAddress());
|
||||
String message = commit.getShortMessage();
|
||||
String message = commit.getFullMessage();
|
||||
|
||||
if (message != null)
|
||||
{
|
||||
message = message.trim();
|
||||
}
|
||||
|
||||
Changeset changeset = new Changeset(id, date, author, message);
|
||||
|
||||
if (parentList != null)
|
||||
@@ -214,6 +218,7 @@ public class GitChangesetConverter implements Closeable
|
||||
|
||||
if (Util.isNotEmpty(tagCollection))
|
||||
{
|
||||
|
||||
// create a copy of the tag collection to reduce memory on caching
|
||||
changeset.getTags().addAll(Lists.newArrayList(tagCollection));
|
||||
}
|
||||
|
||||
@@ -54,6 +54,13 @@ Ext.apply(Ext.util.Format, {
|
||||
|
||||
id: function(value){
|
||||
return this.substr(value, 0, 12);
|
||||
},
|
||||
|
||||
convertLineBreaks: function(value){
|
||||
if (value){
|
||||
value = value.replace(/(\r\n|\n|\r)/gm, "<br />");
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -174,9 +174,13 @@ Sonia.repository.ChangesetViewerGrid = Ext.extend(Ext.grid.GridPanel, {
|
||||
}
|
||||
}
|
||||
var description = record.data.description;
|
||||
// if ( description ){
|
||||
// description = Ext.util.Format.htmlEncode(description);
|
||||
// }
|
||||
if ( description ){
|
||||
// description = Ext.util.Format.htmlEncode(description);
|
||||
var index = description.indexOf('\n');
|
||||
if ( index > 0 ){
|
||||
description = description.substring(0, index) + " ...";
|
||||
}
|
||||
}
|
||||
var date = record.data.date;
|
||||
if ( date ){
|
||||
date = Ext.util.Format.formatTimestamp(date);
|
||||
|
||||
@@ -45,7 +45,7 @@ Sonia.repository.CommitPanel = Ext.extend(Ext.Panel, {
|
||||
</div>\n\
|
||||
<div class="left-content left-side">\n\
|
||||
<h1>Commit {id}</h1>\n\
|
||||
<p>{description}</p>\n\
|
||||
<p>{description:convertLineBreaks}</p>\n\
|
||||
<p>\n\
|
||||
<tpl for="author">\n\
|
||||
{name}<tpl if="mail"> <<a href="mailto:{mail}">{mail}</a>></tpl>\n\
|
||||
|
||||
Reference in New Issue
Block a user