Bug 1293493 - Remove `mach rage` since it was unused; r?ted draft
authorGregory Szorc <gps@mozilla.com>
Mon, 24 Apr 2017 16:33:51 -0700
changeset 567435 3cdb17b854f4c2102c8e28b5e0d6e8d19cddd102
parent 567252 62a2d3693579fc77b1c510984ae471a860d03302
child 625640 5a3ca6ec961b7d93710cee487193bcf5848d524a
push id55564
push usergszorc@mozilla.com
push dateMon, 24 Apr 2017 23:34:34 +0000
reviewersted
bugs1293493
milestone55.0a1
Bug 1293493 - Remove `mach rage` since it was unused; r?ted We've had 4 submissions in 2017. jgriffin and I agreed that it was a failed experiment and we should either abandon it or figure out how to increase participation. Since nobody is available to improve it, I'm inclined to just delete it. If we want to bring it back, it is always in version control. MozReview-Commit-ID: AizkZxjQ8IJ
tools/mach_commands.py
--- a/tools/mach_commands.py
+++ b/tools/mach_commands.py
@@ -4,17 +4,16 @@
 
 from __future__ import absolute_import, unicode_literals
 
 import sys
 import os
 import stat
 import platform
 import errno
-import subprocess
 
 from mach.decorators import (
     CommandArgument,
     CommandProvider,
     Command,
 )
 
 from mozbuild.base import MachCommandBase, MozbuildObject
@@ -76,69 +75,16 @@ class UUIDProvider(object):
         if format in [None, 'cpp', 'c++']:
             u = u.hex
             print('{ 0x%s, 0x%s, 0x%s, \\' % (u[0:8], u[8:12], u[12:16]))
             pairs = tuple(map(lambda n: u[n:n+2], range(16, 32, 2)))
             print(('  { ' + '0x%s, ' * 7 + '0x%s } }') % pairs)
 
 
 @CommandProvider
-class RageProvider(MachCommandBase):
-    @Command('rage', category='misc',
-             description='Express your frustration')
-    def rage(self):
-        """Have a bad experience developing Firefox? Run this command to
-        express your frustration.
-
-        This command will open your default configured web browser to a short
-        form where you can submit feedback. Just close the tab when done.
-        """
-        import getpass
-        import urllib
-        import webbrowser
-
-        # Try to resolve the current user.
-        user = None
-        with open(os.devnull, 'wb') as null:
-            if os.path.exists(os.path.join(self.topsrcdir, '.hg')):
-                try:
-                    user = subprocess.check_output(['hg', 'config',
-                                                    'ui.username'],
-                                                   cwd=self.topsrcdir,
-                                                   stderr=null)
-
-                    i = user.find('<')
-                    if i >= 0:
-                        user = user[i + 1:-2]
-                except subprocess.CalledProcessError:
-                    pass
-            elif os.path.exists(os.path.join(self.topsrcdir, '.git')):
-                try:
-                    user = subprocess.check_output(['git', 'config', '--get',
-                                                    'user.email'],
-                                                   cwd=self.topsrcdir,
-                                                   stderr=null)
-                except subprocess.CalledProcessError:
-                    pass
-
-        if not user:
-            try:
-                user = getpass.getuser()
-            except Exception:
-                pass
-
-        url = 'https://docs.google.com/a/mozilla.com/forms/d/e/1FAIpQLSeDVC3IXJu5d33Hp_ZTCOw06xEUiYH1pBjAqJ1g_y63sO2vvA/viewform'  # noqa: E501
-        if user:
-            url += '?entry.1281044204=%s' % urllib.quote(user)
-
-        print('Please leave your feedback in the opened web form')
-        webbrowser.open_new_tab(url)
-
-
-@CommandProvider
 class PastebinProvider(object):
     @Command('pastebin', category='misc',
              description='Command line interface to pastebin.mozilla.org.')
     @CommandArgument('--language', default=None,
                      help='Language to use for syntax highlighting')
     @CommandArgument('--poster', default='',
                      help='Specify your name for use with pastebin.mozilla.org')
     @CommandArgument('--duration', default='day',