@@ -4,7 +4,7 @@ var linenum = scimoz.lineFromPosition(scimoz.currentPos);
44var basename = ko . views . manager . currentView . koDoc . file . baseName ;
55var dirname = ko . views . manager . currentView . koDoc . file . dirName ;
66
7- // Run the svn blame process.
7+ // Run the git blame process.
88var runSvc = Components . classes [ "@activestate.com/koRunService;1" ] .
99 createInstance ( Components . interfaces . koIRunService ) ;
1010var cmd = 'git blame ' + basename ;
@@ -15,9 +15,15 @@ var retval = process.wait(-1);
1515if ( retval == 0 ) {
1616 var stdout = process . getStdout ( ) ;
1717 var lines = stdout . split ( "\n" ) ;
18- var re = new RegExp ( "[0-9a-f]* \\((.*? [12][09][0-9]{2}-[0-9]{2}-[0-9]{2}) " ) ;
18+ var re = new RegExp ( "( [0-9a-f]*) \\((.*? [12][09][0-9]{2}-[0-9]{2}-[0-9]{2}) " ) ;
1919 var match = re . exec ( lines [ linenum ] ) ;
2020 if ( match ) {
21- ko . statusBar . AddMessage ( "BLAME: " + match [ 1 ] , "editor" , 10000 , true ) ;
21+ cmd = 'git log --format=%s -n 1 ' + match [ 1 ] ;
22+ process = runSvc . RunAndNotify ( cmd , dirname , '' , '' ) ;
23+ retval = process . wait ( - 1 ) ;
24+ ko . statusBar . AddMessage ( "BLAME: " + match [ 2 ] , "editor" , 10000 , true ) ;
25+ if ( retval == 0 ) {
26+ ko . statusBar . AddMessage ( process . getStdout ( ) , "editor" , 10000 , true ) ;
27+ }
2228 }
2329}
0 commit comments