Commits

Sebastian Sdorra  committed 66e6570

prepare mercurial plugin to render changeset ids with revision

  • Participants
  • Parent commits 8263b55
  • Branches issue-287

Comments (0)

Files changed (1)

File scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js

 // 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;
+  }
+  
+});