Introduce
The lib supports follow SVN operations:
- svn add
- svn rm (del, remove, delete)
- svn mkdir
- svn ps (propset, pset)
- svn pd (propdel, pdel)
- svn ci (commit)
Quick Start
-
Generate an instance:
var mysvn = new svnjs.Client(usname, passwd, basepath);
-
Then do what you can & what you want, like:
mysvn.mkdir('my_dir'); mysvn.add('test.js', 'alert("done!");'); mysvn.propset('test.js', { 'mime-type': 'text/javscript' });
-
The most important step:
mysvn.commit("Create a folder:my_dir and add a js file:test.js") .done(function () {console.log("done")}) .fail(function () {console.log("fail")});
If you do everything without this step, The request won't be sent.
API
name | param | type | description |
---|---|---|---|
add |
file content |
string string |
the file to add text write into the file |
del | path | string | a file or a directory |
propset |
file prop_json |
string json |
target file to set props props to set |
propdel |
file prop_array |
string array |
target file to del props props to del |
mkdir | dir_name | string | directory name |
commit |
summary success_callback fail_callback |
string function function |
commit summary function callback after all requests success function callback when request fail |
Future will continue to support more operation command, like move, copy, lock, unlock.