softwarefactory-project / rdopkg

power to the packagers
Apache License 2.0
28 stars 21 forks source link

Unclear message when there is no tag present for the package's version #106

Closed deshipu closed 6 years ago

deshipu commented 7 years ago

When the version in the spec file is set to a value that doesn't have a corresponding tag in the repositories, rdopkg will display this message:

$ rdopkg patch
## get_package_env
RHOS package detected.
## ensure_patches_branch
## get_patches_branch
git branch -f rhos-11.0-patches rhos/rhos-11.0-patches
## check_new_patches
command failed: git log --format=%h%x1f%s%x1f%b%x1e 11.0.1..rhos/rhos-11.0-patches
stderr:
fatal: ambiguous argument '11.0.1..rhos/rhos-11.0-patches': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

No new patches detected in rhos/rhos-11.0-patches.

Do you want to continue anyway? [Ny]

It would be nicer to display a more specific error message in that case, such as:

Package is at Version: 1.2.3 but 1.2.3 tag isn't present.
yac commented 7 years ago

Review underway, there are some unwanted sideeffects... https://review.rdoproject.org/r/#/c/5921/

ssbarnea commented 7 years ago

I don't think that prompting for input on non-tty would ever be attempted. That's clearly a serious bug that affects CI usage.

I added a CR for addressing this aspect of the bug https://review.rdoproject.org/r/#/c/6914/

yac commented 6 years ago

This was addressed by 74ee70e1 , nice error message is presented now.