-
Notifications
You must be signed in to change notification settings - Fork 437
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
Route PUT /source/<project>/<package>/<filename> has the wrong schema documented #9706
Comments
Yet another inconsistency: if you instead use <revision rev="repository">
<srcmd5>d41d8cd98f00b204e9800998ecf8427e</srcmd5>
</revision> This does look like a revision, but does not adhere to the schema as defined in |
Repository only uploads ( |
That makes sense, but of which object do I get the md5 hash? I've tried to figure it out on a local OBS test instance, but have failed so far. (And the documentation should still explain that imho) |
I don't understand that. You can use the returned |
Let me rephrase that: is the returned |
The returned srcmd5 is a representation of the complete file set. Git calls those "tree" objects. |
Michael Schroeder <notifications@github.com> writes:
The returned srcmd5 is a representation of the complete file set. Git calls those "tree" objects.
Including the changes that were just pushed? So essentially if do a
curl -X PUT /source/${project}/${package}/${file}?rev=repository -d "$contents"
followed by a commit, then the new revision hash of the commit will
equal to the srcmd5 value that I received from the PUT?
|
On 2020-06-09 09:48:27 -0700, Dan Čermák wrote:
Michael Schroeder ***@***.***> writes:
> The returned srcmd5 is a representation of the complete file set. Git calls those "tree" objects.
Including the changes that were just pushed? So essentially if do a
curl -X PUT /source/${project}/${package}/${file}?rev=repository -d "$contents"
followed by a commit, then the new revision hash of the commit will
equal to the srcmd5 value that I received from the PUT?
No. The PUT (with rev=repository) always returns the srcmd5 of the empty
file set (it is always the same and not related to the file you PUTed (it
is just the output of "echo -n | md5sum")).
The srcmd5 returned from a commit identifies the file set that you just
committed.
|
Marcus Hüwe <notifications@github.com> writes:
On 2020-06-09 09:48:27 -0700, Dan Čermák wrote:
> Michael Schroeder ***@***.***> writes:
>
> > The returned srcmd5 is a representation of the complete file set. Git calls those "tree" objects.
>
> Including the changes that were just pushed? So essentially if do a
>
> curl -X PUT /source/${project}/${package}/${file}?rev=repository -d "$contents"
>
> followed by a commit, then the new revision hash of the commit will
> equal to the srcmd5 value that I received from the PUT?
>
No. The PUT (with rev=repository) always returns the srcmd5 of the empty
file set (it is always the same and not related to the file you PUTed (it
is just the output of "echo -n | md5sum")).
So that means that the response is *always* the same and can be very
well ignored? Why is it even send then?
|
Issue Description
The route
PUT /source/<project>/<package>/<filename>
is returning aresult.xsd
according to the documentation. This is however not true when invoking it directly viacurl --user ${CREDENTIALS} -X PUT ${OBS}/source/${project}/${package}/${filename} -d ""
, which returns a revision.Expected Result
Either the route should return a status or the documentation should state that it returns a revision.
How to Reproduce
Further Information
The text was updated successfully, but these errors were encountered: