1.0.9 • Published 6 years ago

log-collector v1.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

log-collector

This library can get revisions that specific range of local source file from git or svn.

installation

npm install log-collector

usage

var Log = require("log-collector");
var gitorsvn = new Log.LogCollector({ username:"name", password:"pw", kind: "git or svn"});

gitorsvn.getLogWithRange("localpath", { startLine: 51, endLine: 57 }, 100, function (err, revs) {
    var diffStr = revs[0].diff;
    var message = revs[0].message;
    var author = revs[0].author;
    var revisionNumber = revs[0].name;
    var date = revs[0].date;
});

gitorsvn.getNextLogWithRange(50, function(err, rev) {
    
});


var res1 = Log.getSCMKind("git localfilePath"); // return "git"
var res2 = Log.getSCMKind("svn localfilePath"); // return "svn"

var res = Log.checkSvnAccount("url", "name", "password") // return true if svn account is valid
apidescription
.getLogWithRange(localPath, {startLine, endLine}, number, callback )From the last revision to the log of given length, get revision list collected when changed at given line of localPath
.getNextLogWithRange(localPath, callback )Get revision list collected when changed at given line of localPath. The path and range are the last parameter values the function executed. The starting point of the revision to collect is the revision plus the length of the last function executed in the current revision.
getSCMKind(localPath)Returns which scm the local file is linked to.
checkSvnAccountReturn true if svn account is valid
1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago