nci/lib/scm/base.js

48 lines
919 B
JavaScript
Raw Normal View History

'use strict';
2014-05-10 10:19:47 +00:00
var ParentCommand = require('../command/spawn').SpawnCommand,
inherits = require('util').inherits;
2014-05-10 10:19:47 +00:00
function Scm(params) {
ParentCommand.call(this, params);
2014-05-10 09:36:07 +00:00
this.repository = params.repository;
if (!this.repository && !this.cwd) throw new Error(
'`repository` or `cwd` must be set'
);
}
2014-05-10 10:19:47 +00:00
exports.BaseScm = Scm;
2014-05-10 10:19:47 +00:00
inherits(Scm, ParentCommand);
/**
* Clone repository to the `dst` update to `rev` and set `this.cwd` to `dst`
*/
2014-05-10 10:19:47 +00:00
Scm.prototype.clone = function(dst, rev, callback) {
};
/**
* Pull changes from remote repository without update
*/
2014-05-10 10:19:47 +00:00
Scm.prototype.pull = function(rev, callback) {
};
/**
* Returns string id of current revision
*/
2014-05-10 10:19:47 +00:00
Scm.prototype.getId = function(callback) {
};
/**
* Returns array of changes between revisions
*/
2014-05-10 10:19:47 +00:00
Scm.prototype.getChanges = function(rev1, rev2, callback) {
};
/**
* Updates to revision
*/
2014-05-10 10:19:47 +00:00
Scm.prototype.update = function(rev, callback) {
};