diff --git a/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hgbrowse.py b/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hgbrowse.py index 84cf7c12b6..1c55af0917 100644 --- a/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hgbrowse.py +++ b/plugins/scm-hg-plugin/src/main/resources/sonia/scm/hgbrowse.py @@ -71,13 +71,15 @@ for dir in directories: print ' ' for file in files: + time = file.date()[0] + desc = repo[file.linkrev()].description() print ' ' print ' ' + getName(file.path()) + '' print ' ' + file.path() + '' print ' false' print ' ' + str(file.size()) + '' - time = file.date()[0] print ' ' + str(time).split('.')[0] + '' + print ' ' + desc + '' print ' ' print ' ' print ' ' diff --git a/scm-core/src/main/java/sonia/scm/repository/FileObject.java b/scm-core/src/main/java/sonia/scm/repository/FileObject.java index 10da857886..cef6b7e372 100644 --- a/scm-core/src/main/java/sonia/scm/repository/FileObject.java +++ b/scm-core/src/main/java/sonia/scm/repository/FileObject.java @@ -90,6 +90,17 @@ public class FileObject implements LastModifiedAware, Iterable return children; } + /** + * Method description + * + * + * @return + */ + public String getDescription() + { + return description; + } + /** * Method description * @@ -159,6 +170,17 @@ public class FileObject implements LastModifiedAware, Iterable this.children = children; } + /** + * Method description + * + * + * @param description + */ + public void setDescription(String description) + { + this.description = description; + } + /** * Method description * @@ -221,6 +243,9 @@ public class FileObject implements LastModifiedAware, Iterable @XmlElementWrapper(name = "children") private List children; + /** Field description */ + private String description; + /** Field description */ private boolean directory; diff --git a/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.repositorybrowser.js b/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.repositorybrowser.js index 029cc88099..0092f1046c 100644 --- a/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.repositorybrowser.js +++ b/scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.repositorybrowser.js @@ -46,7 +46,7 @@ Sonia.repository.RepositoryBrowser = Ext.extend(Ext.grid.GridPanel, { url: restUrl + 'repositories/' + this.repository.id + '/browse.json', method: 'GET' }), - fields: ['path', 'name', 'length', 'lastModified', 'directory'], + fields: ['path', 'name', 'length', 'lastModified', 'directory', 'description'], root: 'file.children', idProperty: 'path', autoLoad: true, @@ -80,10 +80,15 @@ Sonia.repository.RepositoryBrowser = Ext.extend(Ext.grid.GridPanel, { dataIndex: 'lastModified', header: 'LastModified', renderer: Ext.util.Format.formatTimestamp + },{ + id: 'description', + dataIndex: 'description', + header: 'Description' }] }); var config = { + autoExpandColumn: 'description', title: String.format(this.repositoryBrowserTitleText, this.repository.name), store: browserStore, colModel: browserColModel,