mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-29 01:10:04 +02:00
mercurial test coverage
This commit is contained in:
parent
7db6f0d38c
commit
bf132f8f09
8 changed files with 122 additions and 18 deletions
|
@ -58,6 +58,7 @@ var commandConfig = {
|
|||
'-r'
|
||||
],
|
||||
delegate: function(engine, command) {
|
||||
command.appendOptionR();
|
||||
var options = command.getSupportedMap();
|
||||
if (!options['-r']) {
|
||||
throw new GitError({
|
||||
|
@ -197,7 +198,11 @@ var commandConfig = {
|
|||
|
||||
update: {
|
||||
regex: /^hg +(update|up)($|\s+)/,
|
||||
options: [
|
||||
'-r'
|
||||
],
|
||||
delegate: function(engine, command) {
|
||||
command.appendOptionR();
|
||||
return {
|
||||
vcs: 'git',
|
||||
name: 'checkout'
|
||||
|
@ -207,7 +212,11 @@ var commandConfig = {
|
|||
|
||||
backout: {
|
||||
regex: /^hg +backout($|\s+)/,
|
||||
options: [
|
||||
'-r'
|
||||
],
|
||||
delegate: function(engine, command) {
|
||||
command.appendOptionR();
|
||||
return {
|
||||
vcs: 'git',
|
||||
name: 'revert'
|
||||
|
@ -231,9 +240,6 @@ var commandConfig = {
|
|||
}
|
||||
},
|
||||
|
||||
// TODO rebase :OOOO need to graft? engine work
|
||||
// rebase: {
|
||||
|
||||
pull: {
|
||||
regex: /^hg +pull($|\s+)/,
|
||||
delegate: function(engine, command) {
|
||||
|
|
|
@ -55,6 +55,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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue