mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-10 23:45:07 +00:00
scm run -> _run
This commit is contained in:
parent
a7840fc219
commit
f721de039d
@ -33,7 +33,7 @@ exports.Scm = Scm;
|
||||
|
||||
inherits(Scm, EventEmitter);
|
||||
|
||||
Scm.prototype.run = function(params, callback) {
|
||||
Scm.prototype._run = function(params, callback) {
|
||||
if (this.cwd) {
|
||||
params.options = params.options || {};
|
||||
params.options.cwd = this.cwd;
|
||||
|
@ -60,14 +60,14 @@ Scm.prototype.clone = function(dst, rev, callback) {
|
||||
function() {
|
||||
// git can't clearly clone specified rev but can clone branch
|
||||
// possible solution to change clone params to (dst, branch, callback)
|
||||
self.run({
|
||||
self._run({
|
||||
cmd: 'git',
|
||||
args: ['clone', '--recursive', self.repository, dst]
|
||||
}, this.slot());
|
||||
self.cwd = dst;
|
||||
},
|
||||
function() {
|
||||
self.run({cmd: 'git', args: ['checkout', '-f', rev]}, this.slot());
|
||||
self._run({cmd: 'git', args: ['checkout', '-f', rev]}, this.slot());
|
||||
},
|
||||
callback
|
||||
);
|
||||
@ -82,7 +82,7 @@ Scm.prototype.pull = function(rev, callback) {
|
||||
},
|
||||
function(err, currentRev) {
|
||||
this.pass(currentRev);
|
||||
self.run({cmd: 'git', args: ['pull']}, this.slot());
|
||||
self._run({cmd: 'git', args: ['pull']}, this.slot());
|
||||
},
|
||||
function(err, currentRev) {
|
||||
self.update(currentRev.id, this.slot());
|
||||
@ -104,7 +104,7 @@ Scm.prototype.getRev = function(rev, callback) {
|
||||
var self = this;
|
||||
Steppy(
|
||||
function() {
|
||||
self.run({cmd: 'git', args: [
|
||||
self._run({cmd: 'git', args: [
|
||||
'show', rev,
|
||||
'--pretty=' + self._revTemplate
|
||||
]}, this.slot());
|
||||
@ -146,7 +146,7 @@ Scm.prototype.getChanges = function(rev1, rev2, callback) {
|
||||
function(err, currentRev) {
|
||||
this.pass(currentRev);
|
||||
|
||||
self.run({cmd: 'git', args: [
|
||||
self._run({cmd: 'git', args: [
|
||||
'log', rev1 ? rev1 + '..' + rev2 : rev2,
|
||||
'--pretty=' + self._revTemplate + self._linesSeparator
|
||||
]}, this.slot());
|
||||
@ -172,5 +172,5 @@ Scm.prototype.getChanges = function(rev1, rev2, callback) {
|
||||
};
|
||||
|
||||
Scm.prototype.update = function(rev, callback) {
|
||||
this.run({cmd: 'git', args: ['checkout', '-f', rev]}, callback);
|
||||
this._run({cmd: 'git', args: ['checkout', '-f', rev]}, callback);
|
||||
};
|
||||
|
@ -55,7 +55,7 @@ Scm.prototype.clone = function(dst, rev, callback) {
|
||||
var self = this;
|
||||
Steppy(
|
||||
function() {
|
||||
self.run({
|
||||
self._run({
|
||||
cmd: 'hg',
|
||||
args: ['clone', '--rev', rev, self.repository, dst]
|
||||
}, this.slot());
|
||||
@ -66,14 +66,14 @@ Scm.prototype.clone = function(dst, rev, callback) {
|
||||
};
|
||||
|
||||
Scm.prototype.pull = function(rev, callback) {
|
||||
this.run({cmd: 'hg', args: ['pull', '--rev', rev]}, callback);
|
||||
this._run({cmd: 'hg', args: ['pull', '--rev', rev]}, callback);
|
||||
};
|
||||
|
||||
Scm.prototype.getCurrent = function(callback) {
|
||||
var self = this;
|
||||
Steppy(
|
||||
function() {
|
||||
self.run({cmd: 'hg', args: [
|
||||
self._run({cmd: 'hg', args: [
|
||||
'parent', '--template', self._revTemplate
|
||||
]}, this.slot());
|
||||
},
|
||||
@ -88,7 +88,7 @@ Scm.prototype.getChanges = function(rev1, rev2, callback) {
|
||||
var self = this;
|
||||
Steppy(
|
||||
function() {
|
||||
self.run({cmd: 'hg', args: [
|
||||
self._run({cmd: 'hg', args: [
|
||||
'log', '--rev', rev2 + ':' + rev1,
|
||||
'--template', self._revTemplate + self._linesSeparator
|
||||
]}, this.slot());
|
||||
@ -111,5 +111,5 @@ Scm.prototype.getChanges = function(rev1, rev2, callback) {
|
||||
};
|
||||
|
||||
Scm.prototype.update = function(rev, callback) {
|
||||
this.run({cmd: 'hg', args: ['up', '-C', rev]}, callback);
|
||||
this._run({cmd: 'hg', args: ['up', '-C', rev]}, callback);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user