mercurial test coverage

This commit is contained in:
Peter Cottle 2013-08-04 13:27:33 -07:00
parent 7db6f0d38c
commit bf132f8f09
8 changed files with 122 additions and 18 deletions

View file

@ -6053,7 +6053,6 @@ var initRootEvents = function(eventBaton) {
var initDemo = function(sandbox) {
var params = util.parseQueryString(window.location.href);
console.log(params);
// being the smart programmer I am (not), I dont include a true value on demo, so
// I have to check if the key exists here
@ -10978,7 +10977,6 @@ var commandConfig = {
return;
}
console.log(generalArgs);
command.validateArgBounds(generalArgs, 1, 1);
engine.checkout(engine.crappyUnescape(generalArgs[0]));
@ -11095,6 +11093,7 @@ var commandConfig = {
'-r'
],
delegate: function(engine, command) {
command.appendOptionR();
var options = command.getSupportedMap();
if (!options['-r']) {
throw new GitError({
@ -11234,7 +11233,11 @@ var commandConfig = {
update: {
regex: /^hg +(update|up)($|\s+)/,
options: [
'-r'
],
delegate: function(engine, command) {
command.appendOptionR();
return {
vcs: 'git',
name: 'checkout'
@ -11244,7 +11247,11 @@ var commandConfig = {
backout: {
regex: /^hg +backout($|\s+)/,
options: [
'-r'
],
delegate: function(engine, command) {
command.appendOptionR();
return {
vcs: 'git',
name: 'revert'
@ -11268,9 +11275,6 @@ var commandConfig = {
}
},
// TODO rebase :OOOO need to graft? engine work
// rebase: {
pull: {
regex: /^hg +pull($|\s+)/,
delegate: function(engine, command) {
@ -14814,6 +14818,18 @@ var Command = Backbone.Model.extend({
return string.replace(/\./g, 'HEAD');
},
/**
* Since mercurial always wants revisions with
* -r, we want to just make these general
* args for git
*/
appendOptionR: function() {
var rOptions = this.getSupportedMap()['-r'] || [];
this.setGeneralArgs(
this.getGeneralArgs().concat(rOptions)
);
},
mapDotToHead: function() {
var generalArgs = this.getGeneralArgs();
var options = this.getSupportedMap();
@ -24070,7 +24086,6 @@ var initRootEvents = function(eventBaton) {
var initDemo = function(sandbox) {
var params = util.parseQueryString(window.location.href);
console.log(params);
// being the smart programmer I am (not), I dont include a true value on demo, so
// I have to check if the key exists here
@ -25294,7 +25309,6 @@ var commandConfig = {
return;
}
console.log(generalArgs);
command.validateArgBounds(generalArgs, 1, 1);
engine.checkout(engine.crappyUnescape(generalArgs[0]));
@ -31016,6 +31030,7 @@ var commandConfig = {
'-r'
],
delegate: function(engine, command) {
command.appendOptionR();
var options = command.getSupportedMap();
if (!options['-r']) {
throw new GitError({
@ -31155,7 +31170,11 @@ var commandConfig = {
update: {
regex: /^hg +(update|up)($|\s+)/,
options: [
'-r'
],
delegate: function(engine, command) {
command.appendOptionR();
return {
vcs: 'git',
name: 'checkout'
@ -31165,7 +31184,11 @@ var commandConfig = {
backout: {
regex: /^hg +backout($|\s+)/,
options: [
'-r'
],
delegate: function(engine, command) {
command.appendOptionR();
return {
vcs: 'git',
name: 'revert'
@ -31189,9 +31212,6 @@ var commandConfig = {
}
},
// TODO rebase :OOOO need to graft? engine work
// rebase: {
pull: {
regex: /^hg +pull($|\s+)/,
delegate: function(engine, command) {
@ -31409,6 +31429,18 @@ var Command = Backbone.Model.extend({
return string.replace(/\./g, 'HEAD');
},
/**
* Since mercurial always wants revisions with
* -r, we want to just make these general
* args for git
*/
appendOptionR: function() {
var rOptions = this.getSupportedMap()['-r'] || [];
this.setGeneralArgs(
this.getGeneralArgs().concat(rOptions)
);
},
mapDotToHead: function() {
var generalArgs = this.getGeneralArgs();
var options = this.getSupportedMap();