[Notes] [Git][BuildStream/buildstream][jennis/migrate_pull_push_commands] 4 commits: FIXUP: Clean up comment



Title: GitLab

James Ennis pushed to branch jennis/migrate_pull_push_commands at BuildStream / buildstream

Commits:

2 changed files:

Changes:

  • buildstream/_frontend/cli.py
    ... ... @@ -936,7 +936,6 @@ def _classify_artifacts(names, cas, project_directory):
    936 936
     @cli.group(short_help="Manipulate cached artifacts")
    
    937 937
     def artifact():
    
    938 938
         """Manipulate cached artifacts"""
    
    939
    -    pass
    
    940 939
     
    
    941 940
     
    
    942 941
     ################################################################
    
    ... ... @@ -966,11 +965,16 @@ def pull(app, elements, deps, remote):
    966 965
         """
    
    967 966
     
    
    968 967
         with app.initialized(session_name="Pull"):
    
    968
    +        if not elements:
    
    969
    +            guessed_target = app.context.guess_element()
    
    970
    +            if guessed_target:
    
    971
    +                elements = (guessed_target,)
    
    972
    +
    
    969 973
             app.stream.pull(elements, selection=deps, remote=remote)
    
    970 974
     
    
    971 975
     
    
    972 976
     ##################################################################
    
    973
    -#                           Push Command                         #
    
    977
    +#                     Artifact Push Command                      #
    
    974 978
     ##################################################################
    
    975 979
     @artifact.command(name="push", short_help="Push a built artifact")
    
    976 980
     @click.option('--deps', '-d', default='none',
    
    ... ... @@ -998,6 +1002,11 @@ def push(app, elements, deps, remote):
    998 1002
             all:   All dependencies
    
    999 1003
         """
    
    1000 1004
         with app.initialized(session_name="Push"):
    
    1005
    +        if not elements:
    
    1006
    +            guessed_target = app.context.guess_element()
    
    1007
    +            if guessed_target:
    
    1008
    +                elements = (guessed_target,)
    
    1009
    +
    
    1001 1010
             app.stream.push(elements, selection=deps, remote=remote)
    
    1002 1011
     
    
    1003 1012
     
    
    ... ... @@ -1112,7 +1121,7 @@ def track(app, elements, deps, except_, cross_junctions):
    1112 1121
     ################################################################
    
    1113 1122
     #                          Pull Command                        #
    
    1114 1123
     ################################################################
    
    1115
    -@cli.command(short_help="Pull a built artifact")
    
    1124
    +@cli.command(short_help="Pull a built artifact", hidden=True)
    
    1116 1125
     @click.option('--deps', '-d', default='none',
    
    1117 1126
                   type=click.Choice(['none', 'all']),
    
    1118 1127
                   help='The dependency artifacts to pull (default: none)')
    
    ... ... @@ -1129,7 +1138,7 @@ def pull(app, elements, deps, remote):
    1129 1138
     ##################################################################
    
    1130 1139
     #                           Push Command                         #
    
    1131 1140
     ##################################################################
    
    1132
    -@cli.command(short_help="Push a built artifact")
    
    1141
    +@cli.command(short_help="Push a built artifact", hidden=True)
    
    1133 1142
     @click.option('--deps', '-d', default='none',
    
    1134 1143
                   type=click.Choice(['none', 'all']),
    
    1135 1144
                   help='The dependencies to push (default: none)')
    

  • tests/completions/completions.py
    ... ... @@ -121,7 +121,7 @@ def assert_completion_failed(cli, cmd, word_idx, expected, cwd=None):
    121 121
     @pytest.mark.parametrize("cmd,word_idx,expected", [
    
    122 122
         ('bst', 0, []),
    
    123 123
         ('bst ', 1, MAIN_COMMANDS),
    
    124
    -    ('bst artifact', 2, ARTIFACT_COMMANDS),
    
    124
    +    ('bst artifact ', 2, ARTIFACT_COMMANDS),
    
    125 125
         ('bst source ', 2, SOURCE_COMMANDS),
    
    126 126
         ('bst w ', 1, ['workspace ']),
    
    127 127
         ('bst workspace ', 2, WORKSPACE_COMMANDS),
    
    ... ... @@ -275,7 +275,7 @@ def test_argument_element_invalid(datafiles, cli, project, cmd, word_idx, expect
    275 275
     @pytest.mark.parametrize("cmd,word_idx,expected", [
    
    276 276
         ('bst he', 1, ['help ']),
    
    277 277
         ('bst help ', 2, MAIN_COMMANDS),
    
    278
    -    ('bst help artifact', 2, ARTIFACT_COMMANDS),
    
    278
    +    ('bst help artifact ', 3, ARTIFACT_COMMANDS),
    
    279 279
         ('bst help in', 2, ['init ']),
    
    280 280
         ('bst help source ', 3, SOURCE_COMMANDS),
    
    281 281
         ('bst help w', 2, ['workspace ']),
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]