throw away workspace changes on repository update

This commit is contained in:
oleg 2015-11-22 14:08:24 +03:00
parent 673c2bf2dd
commit 037b79a0c6
4 changed files with 4 additions and 3 deletions

View File

@ -24,6 +24,7 @@ work in progress...
* ~~Compile client for production~~
* Semantic versioning and plugins
* ~~Complete uncompleted builds on server start~~
* ~~Throw away workspace changes on repository update~~
Ui fixes

View File

@ -52,7 +52,7 @@ Scm.prototype.getRev = function(rev, callback) {
};
/**
* Updates to revision
* Updates to revision and throw away all local changes
*/
Scm.prototype.update = function(rev, callback) {
};

View File

@ -154,5 +154,5 @@ Scm.prototype.getChanges = function(rev1, rev2, callback) {
};
Scm.prototype.update = function(rev, callback) {
this.run({cmd: 'git', args: ['checkout', rev]}, callback);
this.run({cmd: 'git', args: ['checkout', '-f', rev]}, callback);
};

View File

@ -113,5 +113,5 @@ Scm.prototype.getChanges = function(rev1, rev2, callback) {
};
Scm.prototype.update = function(rev, callback) {
this.run({cmd: 'hg', args: ['up', rev]}, callback);
this.run({cmd: 'hg', args: ['up', '-C', rev]}, callback);
};