diff --git a/build/bundle.js b/build/bundle.js index 505a3207..48fe4f5f 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -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 diff --git a/src/js/commands/index.js b/src/js/commands/index.js index 4777bf69..e5f16803 100644 --- a/src/js/commands/index.js +++ b/src/js/commands/index.js @@ -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 = { diff --git a/src/js/git/commands.js b/src/js/git/commands.js index 942a2b76..491c201c 100644 --- a/src/js/git/commands.js +++ b/src/js/git/commands.js @@ -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; diff --git a/src/js/mercurial/commands.js b/src/js/mercurial/commands.js new file mode 100644 index 00000000..efad00ce --- /dev/null +++ b/src/js/mercurial/commands.js @@ -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;