@@ -4,7 +4,7 @@ var linenum = scimoz.lineFromPosition(scimoz.currentPos);
4
4
var basename = ko . views . manager . currentView . koDoc . file . baseName ;
5
5
var dirname = ko . views . manager . currentView . koDoc . file . dirName ;
6
6
7
- // Run the svn blame process.
7
+ // Run the git blame process.
8
8
var runSvc = Components . classes [ "@activestate.com/koRunService;1" ] .
9
9
createInstance ( Components . interfaces . koIRunService ) ;
10
10
var cmd = 'git blame ' + basename ;
@@ -15,9 +15,15 @@ var retval = process.wait(-1);
15
15
if ( retval == 0 ) {
16
16
var stdout = process . getStdout ( ) ;
17
17
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}) " ) ;
19
19
var match = re . exec ( lines [ linenum ] ) ;
20
20
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
+ }
22
28
}
23
29
}
0 commit comments