diff --git a/recipes/JavaScript/577013_Komodo_JS_Macro__show_svn_blame_current_editor/recipe-577013.js b/recipes/JavaScript/577013_Komodo_JS_Macro__show_svn_blame_current_editor/recipe-577013.js index 680d3c957..5f10c9565 100644 --- a/recipes/JavaScript/577013_Komodo_JS_Macro__show_svn_blame_current_editor/recipe-577013.js +++ b/recipes/JavaScript/577013_Komodo_JS_Macro__show_svn_blame_current_editor/recipe-577013.js @@ -14,5 +14,5 @@ var retval = process.wait(-1); if (retval == 0) { var stdout = process.getStdout(); var lines = stdout.split("\n"); - StatusBar_AddMessage("BLAME: " + lines[linenum], "editor", 10000, true); + ko.statusBar.AddMessage("BLAME: " + lines[linenum], "editor", 10000, true); } diff --git a/recipes/JavaScript/578537_Komodo_JS_Macro__show_git_blame_current_editor/recipe-578537.js b/recipes/JavaScript/578537_Komodo_JS_Macro__show_git_blame_current_editor/recipe-578537.js index 7e116d61b..94bcae18c 100644 --- a/recipes/JavaScript/578537_Komodo_JS_Macro__show_git_blame_current_editor/recipe-578537.js +++ b/recipes/JavaScript/578537_Komodo_JS_Macro__show_git_blame_current_editor/recipe-578537.js @@ -4,7 +4,7 @@ var linenum = scimoz.lineFromPosition(scimoz.currentPos); var basename = ko.views.manager.currentView.koDoc.file.baseName; var dirname = ko.views.manager.currentView.koDoc.file.dirName; -// Run the svn blame process. +// Run the git blame process. var runSvc = Components.classes["@activestate.com/koRunService;1"]. createInstance(Components.interfaces.koIRunService); var cmd = 'git blame ' + basename; @@ -15,9 +15,15 @@ var retval = process.wait(-1); if (retval == 0) { var stdout = process.getStdout(); var lines = stdout.split("\n"); - var re = new RegExp("[0-9a-f]* \\((.*? [12][09][0-9]{2}-[0-9]{2}-[0-9]{2}) "); + var re = new RegExp("([0-9a-f]*) \\((.*? [12][09][0-9]{2}-[0-9]{2}-[0-9]{2}) "); var match = re.exec(lines[linenum]); if (match) { - StatusBar_AddMessage("BLAME: " + match[1], "editor", 10000, true); + cmd = 'git log --format=%s -n 1 ' + match[1]; + process = runSvc.RunAndNotify(cmd, dirname, '', ''); + retval = process.wait(-1); + ko.statusBar.AddMessage("BLAME: " + match[2], "editor", 10000, true); + if (retval == 0) { + ko.statusBar.AddMessage( process.getStdout(), "editor", 10000, true); + } } }