Page MenuHomePhabricator

Scap's error message when prepping a non-existent branch is unhelpful
Closed, DeclinedPublic

Description

$ scap prep 1.36.0-wmf.3
...
3:57:16 Fetching core to /srv/mediawiki-staging/php-1.36.0-wmf.3
23:59:42 Checkout wmf/1.36.0-wmf.3 in
/srv/mediawiki-staging/php-1.36.0-wmf.3
23:59:42 Unhandled error:
Traceback (most recent call last):
 File "/usr/lib/python2.7/dist-packages/scap/cli.py", line 341, in run
   exit_status = app.main(app.extra_arguments)
 File "/srv/mediawiki-staging/scap/plugins/prep.py", line 143, in main
   git.checkout(dest_dir, checkout_version)
 File "/usr/lib/python2.7/dist-packages/scap/git.py", line 393, in checkout
   git.checkout('--force', '--quiet', rev)
 File "/usr/lib/python2.7/dist-packages/scap/sh.py", line 1428, in __call__
   return RunningCommand(cmd, call_args, stdin, stdout, stderr)
 File "/usr/lib/python2.7/dist-packages/scap/sh.py", line 775, in __init__
   self.wait()
 File "/usr/lib/python2.7/dist-packages/scap/sh.py", line 793, in wait
   self.handle_command_exit_code(exit_code)
 File "/usr/lib/python2.7/dist-packages/scap/sh.py", line 816, in
handle_command_exit_code
   raise exc
ErrorReturnCode_1:

 RAN: /usr/bin/git checkout --force --quiet wmf/1.36.0-wmf.3

 STDOUT:


 STDERR:
error: pathspec 'wmf/1.36.0-wmf.3' did not match any file(s) known to git

23:59:42 prep failed: <ErrorReturnCode_1>

 RAN: /usr/bin/git checkout --force --quiet wmf/1.36.0-wmf.3

 STDOUT:


 STDERR:
error: pathspec 'wmf/1.36.0-wmf.3' did not match any file(s) known to git

A better error message would say "branch doesn't exist" or something like that. I realise it may be hard to deduce the reason why git failed from its output. However, the Python stack trace really doesn't help, either, and that's on Scap.

Event Timeline

dancy renamed this task from Scap's error message when preppping a non-existent branch is unhelpful to Scap's error message when prepping a non-existent branch is unhelpful.Aug 11 2020, 3:13 PM