From 677e822f7b850cb7d894f086072bfcb47514e416 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Tue, 4 Dec 2012 21:38:43 +0100 Subject: [PATCH] prepare mercurial plugin to render changeset ids with revision --- .../src/main/resources/sonia/scm/hg.config.js | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js b/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js index 62549df4eb..9947ce7e18 100644 --- a/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js +++ b/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js @@ -245,3 +245,28 @@ registerConfigPanel({ // register type icon Sonia.repository.typeIcons['hg'] = 'resources/images/icons/16x16/mercurial.png'; + +// override ChangesetViewerGrid to render changeset id's with revisions + +Ext.override(Sonia.repository.ChangesetViewerGrid, { + + isMercurialRepository: function(){ + return this.repository.type == 'hg'; + }, + + getChangesetId: function(id, record){ + if ( this.isMercurialRepository() ){ + // TODO implement + } + return id; + }, + + getParentIds: function(id, record){ + var parents = record.get('parents'); + if ( this.isMercurialRepository() ){ + // TODO implement + } + return parents; + } + +}); \ No newline at end of file