[Bug 538782] New: [PATCH] Allow providing a log message for changes done using the webclient
http://bugzilla.novell.com/show_bug.cgi?id=538782 Summary: [PATCH] Allow providing a log message for changes done using the webclient Classification: openSUSE Product: openSUSE.org Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: BuildService AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: srinidhi@novell.com QAContact: adrian@novell.com Found By: --- Created an attachment (id=317987) --> (http://bugzilla.novell.com/attachment.cgi?id=317987) Add support for providing an optional comment when changing files through webclient Hi, I've seen that most users use the webclient to edit / change source files in a package. It becomes difficult to track the changes in a package because there is no commit log message associated to all those revisions of the package. The hermes notifications are also not so helpful, since they only inform the maintainers about a change in a package and which sources have undergone a change - but do not mention why / what has changed. I came up with this patch that allows a user to add an optional comment / log message to both "Add Files" and "Edit File" forms. The same message shows up in both "osc log" as well as the generated Hermes notifications. I don't know if there are any other forms where such a comment is possible or should be provided. If I've missed out any other place, then please do let me know. Please review and provide feedback. Srinidhi. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=538782
User srinidhi@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=538782#c2
--- Comment #2 from Srinidhi B S
(In reply to comment #0)
Please review and provide feedback.
From what I see so far your patch looks good!
First of all, thanks a lot for reviewing the patch! :)
Just a small remark: lib/frontend_compat.rb: You should add the comment to the PUT request otherwise it'll result in 2 commits (and the first commit has no comment).
According to the apidocs, PUT does not support "cmd=commit&comment=". I just looked at how osc does it, and there too, the comment is sent through a POST. Regarding your concern about "2 commits", if you look at that POST request, there's a "rev=upload" - that ensures that the comment is included into the "upload" revision instead of a new commit / revision. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=538782
User suse-tux@gmx.de added comment
http://bugzilla.novell.com/show_bug.cgi?id=538782#c3
--- Comment #3 from Marcus Hüwe
According to the apidocs, PUT does not support "cmd=commit&comment=". I just looked at how osc does it, and there too, the comment is sent through a POST.
Hmm the apidocs seem to be out of date then:/ - PUT also supports a "comment" parameter. The "trick" with osc is the following: when osc does a PUT request it also adds "?rev=upload" to the request which tells the backend not to commit the change. Instead it waits for other files and if the client issues a POST "...?cmd=commit..." request the backend commits all files which are in the "upload" revision. If you omit the "?rev=upload" parameter in the PUT request the backend directly commit your change (without a comment if you don't specify the "comment" parameter).
Regarding your concern about "2 commits", if you look at that POST request, there's a "rev=upload" - that ensures that the comment is included into the "upload" revision instead of a new commit / revision. See above - this only works if you upload your files with PUT "...?rev=upload...".
-- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=538782
zhu rensheng
http://bugzilla.novell.com/show_bug.cgi?id=538782
http://bugzilla.novell.com/show_bug.cgi?id=538782#c4
Thomas Schmidt
http://bugzilla.novell.com/show_bug.cgi?id=538782
http://bugzilla.novell.com/show_bug.cgi?id=538782#c5
Thomas Schmidt
http://bugzilla.novell.com/show_bug.cgi?id=538782
http://bugzilla.novell.com/show_bug.cgi?id=538782#c6
--- Comment #6 from Srinidhi B S
participants (1)
-
bugzilla_noreply@novell.com