Mailinglist Archive: opensuse-buildservice (251 mails)
| < Previous | Next > |
Re: [opensuse-buildservice] Re: [PATCH] [api] Don't fail on diffing request which submit new packages
- From: Marcus Hüwe <suse-tux@xxxxxx>
- Date: Tue, 7 Sep 2010 10:20:28 +0200
- Message-id: <20100907082028.GB4274@xxxxxxxxxxxxx>
On 2010-09-07 10:10:16 +0200, Adrian Schröter wrote:
a "unified=1" query parameter it sends back a unified diff (even for
new packages). Without this parameter the current format is used.
Marcus
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx
On Tuesday 07 September 2010 10:02:44 Marcus Hüwe wrote:Yep.
On 2010-09-06 20:24:01 +0200, OBS build-service wrote:...
- # for requests accepted with OBS 2.0 and before, this can notHmm there's no need for this check. If we pass the "missingok=1"
work in all cases
- path =
"/source/%s/%s?oproject=%s&opackage=%s&cmd=diff&expand=1" %
- [CGI.escape(action.source.project),
CGI.escape(action.source.package), CGI.escape(action.target.project),
CGI.escape(action.target.package)]
- if action.source.data['rev']
- path += "&rev=#{action.source.rev}"
+ # for requests not yet accepted or accepted with OBS 2.0 and
before
+ if DbPackage.find_by_project_and_name( action.target.project,
action.target.package )
+ path =
"/source/%s/%s?oproject=%s&opackage=%s&cmd=diff&expand=1" %
+ [CGI.escape(action.source.project),
CGI.escape(action.source.package), CGI.escape(action.target.project),
CGI.escape(action.target.package)]
+ if action.source.data['rev']
+ path += "&rev=#{action.source.rev}"
+ end
+ else
+ diff_text = "New package: " + action.target.project + "/" +
action.target.package + "\n" + diff_text
query parameter to the backend we should be able to diff against
a "missing"/non-existent package.
hm, good point, but that would lead to a full diff of the new packages, right
?
In this way the new packages would mentioned on top of the diff to make itHmm what about if we do it this way: if "command_diff" is called with
obvious.
It is not important for the webui though, because it has an extra handling.
a "unified=1" query parameter it sends back a unified diff (even for
new packages). Without this parameter the current format is used.
Is osc showing new packages also explicit somehow ?No it simply prints a unified diff.
Marcus
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx
| < Previous | Next > |