mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 07:58:34 +02:00
add an hg commands module
This commit is contained in:
parent
40ed5f6c9b
commit
e4c0b4786c
4 changed files with 73 additions and 54 deletions
|
@ -9872,12 +9872,13 @@ var intl = require('../intl');
|
|||
|
||||
var Errors = require('../util/errors');
|
||||
var GitCommands = require('../git/commands');
|
||||
var MercurialCommands = require('../mercurial/commands');
|
||||
var CommandProcessError = Errors.CommandProcessError;
|
||||
var CommandResult = Errors.CommandResult;
|
||||
|
||||
var commandConfigs = {
|
||||
'git': GitCommands.gitCommandConfig,
|
||||
'hg': GitCommands.hgCommandConfig
|
||||
'hg': MercurialCommands.hgCommandConfig
|
||||
};
|
||||
|
||||
var commands = {
|
||||
|
@ -10047,22 +10048,7 @@ var GitError = Errors.GitError;
|
|||
var Warning = Errors.Warning;
|
||||
var CommandResult = Errors.CommandResult;
|
||||
|
||||
var gitCommandConfig, hgCommandConfig;
|
||||
|
||||
hgCommandConfig = {
|
||||
commit: {
|
||||
regex: /^hg +commit($|\s)/,
|
||||
options: [
|
||||
'--amend',
|
||||
'-m'
|
||||
],
|
||||
execute: function(engine, command) {
|
||||
return gitCommandConfig.commit.execute(engine, command);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
gitCommandConfig = {
|
||||
var gitCommandConfig = {
|
||||
commit: {
|
||||
sc: /^(gc|git ci)($|\s)/,
|
||||
regex: /^git +commit($|\s)/,
|
||||
|
@ -10530,10 +10516,31 @@ var instantCommands = [
|
|||
];
|
||||
|
||||
exports.gitCommandConfig = gitCommandConfig;
|
||||
exports.hgCommandConfig = hgCommandConfig;
|
||||
exports.instantCommands = instantCommands;
|
||||
|
||||
|
||||
});
|
||||
|
||||
require.define("/src/js/mercurial/commands.js",function(require,module,exports,__dirname,__filename,process,global){var _ = require('underscore');
|
||||
var intl = require('../intl');
|
||||
|
||||
var GitCommands = require('../git/commands');
|
||||
|
||||
var hgCommandConfig = {
|
||||
commit: {
|
||||
regex: /^hg +commit($|\s)/,
|
||||
options: [
|
||||
'--amend',
|
||||
'-m'
|
||||
],
|
||||
execute: function(engine, command) {
|
||||
return GitCommands.gitCommandConfig.commit.execute(engine, command);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
exports.hgCommandConfig = hgCommandConfig;
|
||||
|
||||
});
|
||||
|
||||
require.define("/src/js/util/eventBaton.js",function(require,module,exports,__dirname,__filename,process,global){var _ = require('underscore');
|
||||
|
@ -23343,12 +23350,13 @@ var intl = require('../intl');
|
|||
|
||||
var Errors = require('../util/errors');
|
||||
var GitCommands = require('../git/commands');
|
||||
var MercurialCommands = require('../mercurial/commands');
|
||||
var CommandProcessError = Errors.CommandProcessError;
|
||||
var CommandResult = Errors.CommandResult;
|
||||
|
||||
var commandConfigs = {
|
||||
'git': GitCommands.gitCommandConfig,
|
||||
'hg': GitCommands.hgCommandConfig
|
||||
'hg': MercurialCommands.hgCommandConfig
|
||||
};
|
||||
|
||||
var commands = {
|
||||
|
@ -23960,22 +23968,7 @@ var GitError = Errors.GitError;
|
|||
var Warning = Errors.Warning;
|
||||
var CommandResult = Errors.CommandResult;
|
||||
|
||||
var gitCommandConfig, hgCommandConfig;
|
||||
|
||||
hgCommandConfig = {
|
||||
commit: {
|
||||
regex: /^hg +commit($|\s)/,
|
||||
options: [
|
||||
'--amend',
|
||||
'-m'
|
||||
],
|
||||
execute: function(engine, command) {
|
||||
return gitCommandConfig.commit.execute(engine, command);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
gitCommandConfig = {
|
||||
var gitCommandConfig = {
|
||||
commit: {
|
||||
sc: /^(gc|git ci)($|\s)/,
|
||||
regex: /^git +commit($|\s)/,
|
||||
|
@ -24443,7 +24436,6 @@ var instantCommands = [
|
|||
];
|
||||
|
||||
exports.gitCommandConfig = gitCommandConfig;
|
||||
exports.hgCommandConfig = hgCommandConfig;
|
||||
exports.instantCommands = instantCommands;
|
||||
|
||||
|
||||
|
@ -29645,6 +29637,29 @@ exports.commandEntered = function(value) {
|
|||
});
|
||||
require("/src/js/log/index.js");
|
||||
|
||||
require.define("/src/js/mercurial/commands.js",function(require,module,exports,__dirname,__filename,process,global){var _ = require('underscore');
|
||||
var intl = require('../intl');
|
||||
|
||||
var GitCommands = require('../git/commands');
|
||||
|
||||
var hgCommandConfig = {
|
||||
commit: {
|
||||
regex: /^hg +commit($|\s)/,
|
||||
options: [
|
||||
'--amend',
|
||||
'-m'
|
||||
],
|
||||
execute: function(engine, command) {
|
||||
return GitCommands.gitCommandConfig.commit.execute(engine, command);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
exports.hgCommandConfig = hgCommandConfig;
|
||||
|
||||
});
|
||||
require("/src/js/mercurial/commands.js");
|
||||
|
||||
require.define("/src/js/models/collections.js",function(require,module,exports,__dirname,__filename,process,global){var _ = require('underscore');
|
||||
var Q = require('q');
|
||||
// horrible hack to get localStorage Backbone plugin
|
||||
|
|
|
@ -3,12 +3,13 @@ var intl = require('../intl');
|
|||
|
||||
var Errors = require('../util/errors');
|
||||
var GitCommands = require('../git/commands');
|
||||
var MercurialCommands = require('../mercurial/commands');
|
||||
var CommandProcessError = Errors.CommandProcessError;
|
||||
var CommandResult = Errors.CommandResult;
|
||||
|
||||
var commandConfigs = {
|
||||
'git': GitCommands.gitCommandConfig,
|
||||
'hg': GitCommands.hgCommandConfig
|
||||
'hg': MercurialCommands.hgCommandConfig
|
||||
};
|
||||
|
||||
var commands = {
|
||||
|
|
|
@ -7,22 +7,7 @@ var GitError = Errors.GitError;
|
|||
var Warning = Errors.Warning;
|
||||
var CommandResult = Errors.CommandResult;
|
||||
|
||||
var gitCommandConfig, hgCommandConfig;
|
||||
|
||||
hgCommandConfig = {
|
||||
commit: {
|
||||
regex: /^hg +commit($|\s)/,
|
||||
options: [
|
||||
'--amend',
|
||||
'-m'
|
||||
],
|
||||
execute: function(engine, command) {
|
||||
return gitCommandConfig.commit.execute(engine, command);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
gitCommandConfig = {
|
||||
var gitCommandConfig = {
|
||||
commit: {
|
||||
sc: /^(gc|git ci)($|\s)/,
|
||||
regex: /^git +commit($|\s)/,
|
||||
|
@ -490,6 +475,5 @@ var instantCommands = [
|
|||
];
|
||||
|
||||
exports.gitCommandConfig = gitCommandConfig;
|
||||
exports.hgCommandConfig = hgCommandConfig;
|
||||
exports.instantCommands = instantCommands;
|
||||
|
||||
|
|
19
src/js/mercurial/commands.js
Normal file
19
src/js/mercurial/commands.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
var _ = require('underscore');
|
||||
var intl = require('../intl');
|
||||
|
||||
var GitCommands = require('../git/commands');
|
||||
|
||||
var hgCommandConfig = {
|
||||
commit: {
|
||||
regex: /^hg +commit($|\s)/,
|
||||
options: [
|
||||
'--amend',
|
||||
'-m'
|
||||
],
|
||||
execute: function(engine, command) {
|
||||
return GitCommands.gitCommandConfig.commit.execute(engine, command);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
exports.hgCommandConfig = hgCommandConfig;
|
Loading…
Add table
Add a link
Reference in a new issue