Branch: refs/heads/master
Home: https://github.com/openSUSE/osc
Commit: 2cb308105a2a387e0400ac75153c3779b74ab521
https://github.com/openSUSE/osc/commit/2cb308105a2a387e0400ac75153c3779b74ab...
Author: Marcus Huewe
Date: 2021-08-25 (Wed, 25 Aug 2021)
Changed paths:
M osc/core.py
Log Message:
-----------
Offer a force ("f") choice in metafile.edit's error handling code path
Offer a force ("f") choice if, for instance, "osc meta prj foobar -e"
fails due to a HTTPError in metafile.edit. If the force choice is
selected, a new url is constructed by invoking the metafile._URLFactory
instance with a "force='1'" argument (this adds a "force=1" to the
original url's query string (*)) and the corresponding file is PUTed
to the new url. If this PUT fails again and now the "y" choice is
selected, the file is PUTed to the original url (*).
(*): Stricly speaking, from metafile.edit's POV, the concrete url
depends on the passed in metafile._URLFactory instance, though.
Note: the metafile._URLFactory class and its is_force_supported method
is a gross hack. That's why this class is marked as private (that is,
we can remove it at any point in time again without breaking the
API/3rd party applications). An alternative to the metafile._URLFactory
approach would be manual URL parsing and manual URL construction
(adding "force=1" to the query string)... but this is also pretty
awkward (if done properly).
Fixes: #916 ("for osc meta edit change y/n to y/n/f")
Fixes: #942 ("Offer -f when prjmeta change leads to repo_dependency")
Commit: 2d43ea59ddb28b541d6b5682bd5d87673e24281a
https://github.com/openSUSE/osc/commit/2d43ea59ddb28b541d6b5682bd5d87673e242...
Author: Marcus Huewe
Date: 2021-09-02 (Thu, 02 Sep 2021)
Changed paths:
M osc/core.py
Log Message:
-----------
Merge branch 'metafile_edit_support_force' of https://github.com/marcus-h/osc
Offer a force ("f") choice in metafile.edit's error handling code path.
Compare: https://github.com/openSUSE/osc/compare/9b6b39801650...2d43ea59ddb2