Bug 1285484 - Remove "mach mxr" command. r?gps draft
authorTing-Yu Lin <aethanyc@gmail.com>
Fri, 08 Jul 2016 16:31:30 +0800
changeset 385383 b2b753b9f6aba0139a72f126529d97583821511b
parent 385258 23dc78b7b57e9f91798ea44c242a04e112c37db0
child 524923 38678f8a8561dfa8e0b95a09aea9f7315e368efa
push id22497
push userbmo:tlin@mozilla.com
push dateFri, 08 Jul 2016 08:43:47 +0000
reviewersgps
bugs1285484
milestone50.0a1
Bug 1285484 - Remove "mach mxr" command. r?gps Remove it due to the announcement "MXR permanently offline". https://groups.google.com/forum/#!topic/mozilla.dev.platform/_k-ditFrne4 MozReview-Commit-ID: HvQ18uABGec
tools/mach_commands.py
--- a/tools/mach_commands.py
+++ b/tools/mach_commands.py
@@ -16,25 +16,16 @@ from mach.decorators import (
     Command,
 )
 
 from mozbuild.base import MachCommandBase, MozbuildObject
 
 
 @CommandProvider
 class SearchProvider(object):
-    @Command('mxr', category='misc',
-        description='Search for something in MXR.')
-    @CommandArgument('term', nargs='+', help='Term(s) to search for.')
-    def mxr(self, term):
-        import webbrowser
-        term = ' '.join(term)
-        uri = 'https://mxr.mozilla.org/mozilla-central/search?string=%s' % term
-        webbrowser.open_new_tab(uri)
-
     @Command('dxr', category='misc',
         description='Search for something in DXR.')
     @CommandArgument('term', nargs='+', help='Term(s) to search for.')
     def dxr(self, term):
         import webbrowser
         term = ' '.join(term)
         uri = 'http://dxr.mozilla.org/mozilla-central/search?q=%s&redirect=true' % term
         webbrowser.open_new_tab(uri)
@@ -55,22 +46,22 @@ class SearchProvider(object):
         import webbrowser
         term = ' '.join(term)
         uri = 'https://www.google.com/search?q=%s' % term
         webbrowser.open_new_tab(uri)
 
     @Command('search', category='misc',
         description='Search for something on the Internets. '
         'This will open 3 new browser tabs and search for the term on Google, '
-        'MDN, and MXR.')
+        'MDN, and DXR.')
     @CommandArgument('term', nargs='+', help='Term(s) to search for.')
     def search(self, term):
         self.google(term)
         self.mdn(term)
-        self.mxr(term)
+        self.dxr(term)
 
 
 @CommandProvider
 class UUIDProvider(object):
     @Command('uuid', category='misc',
         description='Generate a uuid.')
     @CommandArgument('--format', '-f', choices=['idl', 'cpp', 'c++'],
                      help='Output format for the generated uuid.')