Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line options '--p4-mappings' work weird #703

Open
dogbert911 opened this issue Feb 2, 2022 · 0 comments
Open

Command line options '--p4-mappings' work weird #703

dogbert911 opened this issue Feb 2, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@dogbert911
Copy link
Collaborator

dogbert911 commented Feb 2, 2022

Description

When using the options --p4-mappings '//my/mapping/... /mapping/...' universum return next error:

 |   2.2. Creating workspace
 |      |   2.2.1. Cleaning workspace
 |      |        |   ==> No client to delete
 |      |        └ [Success]
 |      |   
 |      |   Error: [P4#run] Errors during command execution( "p4 client -i" )
 |      |   
 |      |   	[Error]: "Error in client specification.\nMapping 'default' is not under '//WATCH_TASK/...'."
 |      |   
 |      └ [Failed]

But if this option is used as --p4-mappings='//my/mapping/... /mapping/...' all right.

Steps to reproduce

Run in terminal:

python -m universum --vcs-type p4 --p4-client MY_CLIENT --p4-port 111.111.111.111:111 --p4-user USER --p4-password PASS --p4-mappings '//my/mapping/... /mapping/...'

Expected result

 |   2.2. Creating workspace
 |      └ [Success]

Actual result

 |   2.2. Creating workspace
 |      |   2.2.1. Cleaning workspace
 |      |        |   ==> No client to delete
 |      |        └ [Success]
 |      |   
 |      |   Error: [P4#run] Errors during command execution( "p4 client -i" )
 |      |   
 |      |   	[Error]: "Error in client specification.\nMapping 'default' is not under '//WATCH_TASK/...'."
 |      |   
 |      └ [Failed]

Environment

  • Python version: 3.8.10
  • Universum version: 0.19.12

Additional context

The bug occurs because to settings.mappings list was added new element with default value:

[['//my/mapping/... /mapping/..., //my/mapping2/... /mapping2/...', 'default']]

Bug not occurs when --p4-mappings is not a last option in command line:

python -m universum --vcs-type p4 --p4-client MY_CLIENT --p4-port 111.111.111.111:111 --p4-user USER --p4-password PASS --p4-mappings '//my/mapping/... /mapping/...' --p4-force-clean

or if remove nargs='+' in parser.add_argument("--p4-mappings",... in universum code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants