client-nodejs-svn-git-diff

Nodejs lib to convert a svn commit to a git diff.


Keywords
git, diff, svn, svn2git, diff2html, git-diff, diffsvn2git
License
ISC
Install
npm install client-nodejs-svn-git-diff@0.0.1

Documentation

diffsvn2git

Codacy Code Badge Codacy Coverage Badge Circle CI Dependency Status

Dependency Status devDependency Status

npm Stories in Ready Join the chat at https://gitter.im/diffsvn2git/Lobby npm

Nodejs lib to convert a svn commit revision to a git diff.

NPM

Distribution

Usage

  • initialization
var DiffSvn2Git = require('diffsvn2git');
var diffSvn2Git = new DiffSvn2Git({
    // these parameters will be used by the svn spawn dependency.
    cwd: '/svn/awesome-repo/awesome-repo',
    username: 'awesome-user', // optional if authentication not required or is already saved
    password: 'pass', // optional if authentication not required or is already saved
    noAuthCache: true // optional, if true, username does not become the logged in user on the machine
});
  • listRevisionsByDate (work in progress)

Lists all the revision information by date in JSON format.

diffSvn2Git.listRevisionsByDate().then((revJson) => {
    console.log(revJson);
});
  • parse

The parse method reads the repository and generates a git diff from the revision passed, or the last commit's revision. if the revision parameter is not passed to the method.

diffSvn2Git.parse().then((patch) => {
    console.log(patch);
});