diff --git a/src/js/intl/strings.js b/src/js/intl/strings.js index b65aae50..6eb98896 100644 --- a/src/js/intl/strings.js +++ b/src/js/intl/strings.js @@ -39,7 +39,7 @@ exports.strings = { /////////////////////////////////////////////////////////////////////////// 'hg-a-option': { '__desc__': 'warning for when using -A option', - 'en_US': 'The -A option is not needed for this app, since there is no staging of files. just commit away!' + 'en_US': 'The -A option is not needed for this app, just commit away!' }, /////////////////////////////////////////////////////////////////////////// 'hg-error-no-status': { @@ -52,6 +52,11 @@ exports.strings = { 'en_US': 'I need the option {option} for that command!' }, /////////////////////////////////////////////////////////////////////////// + 'hg-error-log-no-follow': { + '__desc__': 'hg log without -f (--follow)', + 'en_US': 'hg log without -f is currently not supported, use -f' + }, + /////////////////////////////////////////////////////////////////////////// 'git-status-detached': { '__desc__': 'One of the lines for git status output', 'en_US': 'Detached head!', diff --git a/src/js/mercurial/commands.js b/src/js/mercurial/commands.js index ea306612..666915ec 100644 --- a/src/js/mercurial/commands.js +++ b/src/js/mercurial/commands.js @@ -53,9 +53,20 @@ var commandConfig = { }, log: { - regex: /^hg +log *$/, + regex: /^hg +log($|\s)/, + options: [ + '-f' + ], dontCountForGolf: true, delegate: function(engine, command) { + var options = command.getSupportedMap(); + command.acceptNoGeneralArgs(); + + if (!options['-f']) { + throw new GitError({ + msg: intl.str('hg-error-log-no-follow') + }); + } command.mapDotToHead(); return { vcs: 'git', @@ -183,19 +194,6 @@ var commandConfig = { } }, - ammend: { - regex: /^hg +ammend *$/, - delegate: function(engine, command) { - command.setOptionMap({ - '--amend': true - }); - return { - vcs: 'hg', - name: 'commit' - }; - } - }, - summary: { regex: /^hg +(summary|sum) *$/, delegate: function(engine, command) {