All Projects → ddliu → Node Svn Spawn

ddliu / Node Svn Spawn

Licence: mit
Easy way to access svn repository with node.js.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Node Svn Spawn

docker-svn-server
A Docker image running a simple Dockerised Subversion server, using `svnserve`.
Stars: ✭ 27 (-68.24%)
Mutual labels:  svn, subversion
Svn Stash
It's like git stash , but for Subversion.
Stars: ✭ 49 (-42.35%)
Mutual labels:  svn, subversion
svn2git
Tool to help and automate migration from SVN to GitLab
Stars: ✭ 34 (-60%)
Mutual labels:  svn, subversion
libvcs
⚙️ Lite, typed, pythonic utilities for git, svn, mercurial, etc.
Stars: ✭ 43 (-49.41%)
Mutual labels:  svn, subversion
proxychanger
Go tool to change system and applications proxy
Stars: ✭ 15 (-82.35%)
Mutual labels:  svn, subversion
Source Integration
Source control integration plugin framework for MantisBT, including support for Github, Gitlab, Bitbucket, Gitweb, Cgit, Subversion, Mercurial and more
Stars: ✭ 167 (+96.47%)
Mutual labels:  svn, subversion
Scm Manager
The easiest way to share and manage your Git, Mercurial and Subversion repositories over http.
Stars: ✭ 50 (-41.18%)
Mutual labels:  svn, subversion
Subclipse
Subclipse - Eclipse SVN Provider
Stars: ✭ 421 (+395.29%)
Mutual labels:  svn, subversion
ohloh scm
The Ohloh source control management library
Stars: ✭ 58 (-31.76%)
Mutual labels:  svn, subversion
Websvn
Fork from WebSVN
Stars: ✭ 66 (-22.35%)
Mutual labels:  svn, subversion
AnkhSVN
AnkhSVN provides first class Subversion support for all recent Visual Studio versions.
Stars: ✭ 54 (-36.47%)
Mutual labels:  subversion
vcs
PHP interface for version control systems
Stars: ✭ 59 (-30.59%)
Mutual labels:  svn
Svn2git.php
Subversion to Git migration tool
Stars: ✭ 6 (-92.94%)
Mutual labels:  subversion
Cpm.cmake
📦 CMake's missing package manager. A small CMake script for setup-free, cross-platform, reproducible dependency management.
Stars: ✭ 560 (+558.82%)
Mutual labels:  svn
floyer
🚀 Floyer is simple and fast deployment tool using git/svn and (S)FTP - especially useful for shared hosting.
Stars: ✭ 57 (-32.94%)
Mutual labels:  svn
Wpackagist
WordPress Packagist — manage your plugins with Composer
Stars: ✭ 558 (+556.47%)
Mutual labels:  svn
github-to-wordpress-deploy-script
Bash script to handle tagging on GitHub and deployment to WordPress SVN
Stars: ✭ 21 (-75.29%)
Mutual labels:  svn
Subversion
Mirror of Apache Subversion
Stars: ✭ 428 (+403.53%)
Mutual labels:  subversion
Subvertpy
Alternative Python bindings for Subversion
Stars: ✭ 11 (-87.06%)
Mutual labels:  subversion
Neard
🎲 Portable WAMP software stack
Stars: ✭ 296 (+248.24%)
Mutual labels:  svn

svn-spawn

npm npm Travis npm

Easy way to access svn repository with node.js.

Features

  • Easy to use
  • Fast way to add local changes
  • Query svn infomation as array or object
  • Common svn commands are all supported

Usage

Create a svn client instance

var Client = require('svn-spawn');
var client = new Client({
    cwd: '/path to your svn working directory',
    username: 'username', // optional if authentication not required or is already saved
    password: 'password', // 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
});

svn update

client.update(function(err, data) {
    console.log('updated');
});

svn info

client.getInfo(function(err, data) {
    console.log('Repository url is %s', data.url);
});

Make some changes and commit all

client.addLocal(function(err, data) {
    console.log('all local changes has been added for commit');

    client.commit('commit message here', function(err, data) {
        console.log('local changes has been committed!');
    });
});

Single file

client.add('relative/path/to/file', function(err, data) {
    client.commit(['commit message here', 'relative/path/to/file'], function(err, data) {
        console.log('committed one file!');
    });
});

Run any svn command

client.cmd(['subcommand', '--option1=xx', '--option2=xx', 'arg1', 'arg2'], function(err, data) {
    console.log('subcommand done');
});

Result Object

getXXX methods will return parsed data as object.

getInfo result example:

{
  "$": {
    "path": ".",
    "revision": "1",
    "kind": "dir"
  },
  "url": "file:///home/dong/projects/node-packages/node-svn-spawn/test/tmp/repo",
  "repository": {
    "root": "file:///home/dong/projects/node-packages/node-svn-spawn/test/tmp/repo",
    "uuid": "302eb8ee-a81a-4432-8477-1ad8fe3a9a1e"
  },
  "wc-info": {
    "wcroot-abspath": "/home/dong/projects/node-packages/node-svn-spawn/test/tmp/copy",
    "schedule": "normal",
    "depth": "infinity"
  },
  "commit": {
    "$": {
      "revision": "1"
    },
    "author": "dong",
    "date": "2013-11-08T02:07:25.884985Z"
  }
}

getLog result example:

[
    {
      "$": {
        "revision": "1"
      },
      "author": "dong",
      "date": "2013-11-08T02:10:37.656902Z",
      "msg": "init repo"
    },
    ...
]

getStatus result example:

[
  {
    "$": {
      "path": "a.txt"
    },
    "wc-status": {
      "$": {
        "props": "none",
        "item": "modified",
        "revision": "1"
      },
      "commit": {
        "$": {
          "revision": "1"
        },
        "author": "dong",
        "date": "2013-11-08T02:17:20.390152Z"
      }
    }
  }
]

Requirements

You need to have the svn command installed.

Installation

npm install svn-spawn
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].