6ccda3e770f1 — Steve Fink 4 years ago
Reduce component menu to minimal options
1 files changed, 3 insertions(+), 3 deletions(-)

M __init__.py
M __init__.py +3 -3
@@ 801,7 801,7 @@ def choose_prodcomponent(ui, repo, cache
     def canon(v):
         if not v or v == '<choose-from-menu>':
             return None
-        return v
+        return v.replace('<choose-from-menu> for ', '')
 
     product = canon(orig_product)
     component = canon(orig_component)

          
@@ 820,7 820,7 @@ def choose_prodcomponent(ui, repo, cache
         if '::' in component:
             product, component = component.split('::')
             product = product.rstrip()
-            component = component.lstrip()
+            orig_component = component = component.lstrip()
 
     # 'products' and 'components' will be the set of valid products/components
     # remaining after filtering by the 'product' and 'component' passed in

          
@@ 878,7 878,7 @@ def choose_prodcomponent(ui, repo, cache
                                  message="Select from these components:",
                                  usemenu=finalize)
         if component is None:
-            component = orig_component
+            component = '<choose-from-menu> for ' + orig_component
 
     return (product, component)