# svn-info

> Parse svn info.

Latest version **1.2.0** (published 2023-10-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install svn-info
pnpm add svn-info
yarn add svn-info
bun add svn-info
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2023-10-28 |
| First published | 2013-12-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 1 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | jtrussell |
| Maintainers | jtrussell |

## Links

- npm: https://www.npmjs.com/package/svn-info
- Repository: https://github.com/jtrussell/node-svn-info
- Issues: https://github.com/jtrussell/node-svn-info/issues
- npm.io page: https://npm.io/package/svn-info

## Dependencies (1)

- [shelljs](https://npm.io/package/shelljs.md) ~0.8.5

## Recent versions

- 1.2.0 (latest) — 2023-10-28
- 1.1.0 — 2019-12-15
- 1.0.0 — 2017-10-03
- 0.2.2 — 2017-01-27
- 0.2.1 — 2014-09-04
- 0.2.0 — 2014-07-11
- 0.1.4 — 2014-07-10
- 0.1.3 — 2014-03-03
- 0.1.2 — 2013-12-15
- 0.1.1 — 2013-12-15
- 0.1.0 — 2013-12-15

## README

# svn-info

Parse svn info.

## Getting Started
Install the module with: `npm install svn-info`

## Documentation
This module exports itself as a method you may use to asynchronously get `svn
info` for a given path and revision:

```javascript
require('svn-info')('path/to/folder/under/svn', 'HEAD', function(err, info) {
  if(err) {
    throw err;
  }
  do_something_with(info);
});
```

The first argument, the repo path, is optional and will default to the current
working directory.

The second argument, the revision, is optional will default to `'HEAD'`. Note
that if you specify a revision you must also specify a path.

There's also an synchronous flavor:

```javascript
var info = require('svn-info').sync('my/repo/path', 194);
do_something_with(info);
```

As with the async version you can optionally leave off the path and revision
arguments.

**NOTE**: You must have the `svn` command line tool in your path.

**NOTE** The info object is in camelCased. So this:

```
'path': '...',
'workingCopyRootPath': '...',
'url': '...',
'relativeUrl': '...',
'repositoryRoot': '...',
'repositoryUuid': '...',
'revision': '...',
'nodeKind': '...',
'schedule': '...',
'lastChangedAuthor': '...',
'lastChangedRev': '...',
'lastChangedDate': '...'
```

Instead of this:

```
'Path': '...',
'Working Copy Root Path': '...',
'URL': '...',
'Relative URL': '...',
'Repository Root': '...',
'Repository UUID': '...',
'Revision': '...',
'Node Kind': '...',
'Schedule': '...',
'Last Changed Author': '...',
'Last Changed Rev': '...',
'Last Changed Date': '...'
```

### Git

If you use svn via `git svn` the modules exports a method `git`
you may use to asynchronously get `git svn info` for a given path and revision:


```javascript
require('svn-info').git('path/to/folder/under/svn', 'HEAD', function (err, info) {
  if (err) {
    throw err
  }
  do_something_with(info)
})
```

There's also an synchronous flavor:

```javascript
var info = require('svn-info').git.sync('my/repo/path', 194)
do_something_with(info)
```


## Release History
- v0.2.0 2014-07-11 Allow users to specify revision

## License
Copyright (c) 2013 jtrussell  
Licensed under the MIT license.

---
_Source: https://npm.io/package/svn-info · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
