https://github.com/nickrfer/diffsvn2git
Nodejs lib to convert a svn commit to a git diff.
https://github.com/nickrfer/diffsvn2git
diff diff2html diffsvn2git git git-diff svn svn2git
Last synced: 5 months ago
JSON representation
Nodejs lib to convert a svn commit to a git diff.
- Host: GitHub
- URL: https://github.com/nickrfer/diffsvn2git
- Owner: nickrfer
- License: mit
- Created: 2017-04-23T16:39:26.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-05-01T17:55:04.000Z (over 2 years ago)
- Last Synced: 2024-04-14T21:46:54.165Z (almost 2 years ago)
- Topics: diff, diff2html, diffsvn2git, git, git-diff, svn, svn2git
- Language: JavaScript
- Size: 199 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# diffsvn2git
[](https://www.codacy.com/app/diffsvn2git)
[](https://www.codacy.com/app/nickrfer/diffsvn2git)
[](https://circleci.com/gh/nickrfer/diffsvn2git)
[](https://dependencyci.com/github/nickrfer/diffsvn2git)
[](https://david-dm.org/nickrfer/diffsvn2git)
[](https://david-dm.org/nickrfer/diffsvn2git#info=devDependencies)
[](https://www.npmjs.com/package/diffsvn2git)
[](https://waffle.io/nickrfer/diffsvn2git)
[](https://gitter.im/diffsvn2git/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[]()
Nodejs lib to convert a svn commit revision to a git diff.
[](https://nodei.co/npm/diffsvn2git/)
## Distribution
* [Node Module](https://www.npmjs.org/package/diffsvn2git)
## Usage
* initialization
```javascript
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);
});
```