[opensuse-buildservice] request diff in a linked project
Hi, When submitting a change against a package in a linked project, where the package does not exist physically, the diff does not work and only "New package" is returned. It would be nice to have the diff generated against the original package in the project link source instead if no package exists in the linked project, comments? Anas-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Am Montag, 7. Februar 2011, 21:22:15 schrieb Anas Nashif:
Hi,
When submitting a change against a package in a linked project, where the package does not exist physically, the diff does not work and only "New package" is returned. It would be nice to have the diff generated against the original package in the project link source instead if no package exists in the linked project, comments?
Makes sense. Detecting if it is a new package can be done in different ways. -- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de
I now resolved this with this patch: --- a/src/api/app/controllers/request_controller.rb +++ b/src/api/app/controllers/request_controller.rb @@ -418,7 +418,8 @@ class RequestController < ApplicationController end # for requests not yet accepted or accepted with OBS 2.0 and before - if tpkg + is_link = Suse::Backend.get("/source/#{CGI.escape(action.target.project)}/#{CGI.escape(action.target.package)}") + if tpkg or is_link 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'] Anas On 8 Feb 2011, at 08:15, Adrian Schröter wrote:
Am Montag, 7. Februar 2011, 21:22:15 schrieb Anas Nashif:
Hi,
When submitting a change against a package in a linked project, where the package does not exist physically, the diff does not work and only "New package" is returned. It would be nice to have the diff generated against the original package in the project link source instead if no package exists in the linked project, comments?
Makes sense. Detecting if it is a new package can be done in different ways.
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Note that I am not happy about this yet, but it serves as a quick fix, since we depend on it :) Anas On 11 Feb 2011, at 13:51, Anas Nashif wrote:
I now resolved this with this patch:
--- a/src/api/app/controllers/request_controller.rb +++ b/src/api/app/controllers/request_controller.rb @@ -418,7 +418,8 @@ class RequestController < ApplicationController end
# for requests not yet accepted or accepted with OBS 2.0 and before - if tpkg + is_link = Suse::Backend.get("/source/#{CGI.escape(action.target.project)}/#{CGI.escape(action.target.package)}") + if tpkg or is_link 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']
Anas
On 8 Feb 2011, at 08:15, Adrian Schröter wrote:
Am Montag, 7. Februar 2011, 21:22:15 schrieb Anas Nashif:
Hi,
When submitting a change against a package in a linked project, where the package does not exist physically, the diff does not work and only "New package" is returned. It would be nice to have the diff generated against the original package in the project link source instead if no package exists in the linked project, comments?
Makes sense. Detecting if it is a new package can be done in different ways.
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Am Freitag, 11. Februar 2011, 13:53:33 schrieb Anas Nashif:
Note that I am not happy about this yet, but it serves as a quick fix, since we depend on it :)
I have pushed a different version to git master, making a difference in the message if a package exists via project link + adding the diff. Hope that is okay with you. adrian
Anas
On 11 Feb 2011, at 13:51, Anas Nashif wrote:
I now resolved this with this patch:
--- a/src/api/app/controllers/request_controller.rb +++ b/src/api/app/controllers/request_controller.rb @@ -418,7 +418,8 @@ class RequestController < ApplicationController end
# for requests not yet accepted or accepted with OBS 2.0 and before - if tpkg + is_link = Suse::Backend.get("/source/#{CGI.escape(action.target.project)}/#{CGI.escape(action.target.package)}") + if tpkg or is_link 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']
Anas
On 8 Feb 2011, at 08:15, Adrian Schröter wrote:
Am Montag, 7. Februar 2011, 21:22:15 schrieb Anas Nashif:
Hi,
When submitting a change against a package in a linked project, where the package does not exist physically, the diff does not work and only "New package" is returned. It would be nice to have the diff generated against the original package in the project link source instead if no package exists in the linked project, comments?
Makes sense. Detecting if it is a new package can be done in different ways.
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 11 Feb 2011, at 14:23, Adrian Schröter wrote:
Am Freitag, 11. Februar 2011, 13:53:33 schrieb Anas Nashif:
Note that I am not happy about this yet, but it serves as a quick fix, since we depend on it :)
I have pushed a different version to git master, making a difference in the message if a package exists via project link + adding the diff.
Hope that is okay with you.
Thanks, that is great as it is. Anas
adrian
Anas
On 11 Feb 2011, at 13:51, Anas Nashif wrote:
I now resolved this with this patch:
--- a/src/api/app/controllers/request_controller.rb +++ b/src/api/app/controllers/request_controller.rb @@ -418,7 +418,8 @@ class RequestController < ApplicationController end
# for requests not yet accepted or accepted with OBS 2.0 and before - if tpkg + is_link = Suse::Backend.get("/source/#{CGI.escape(action.target.project)}/#{CGI.escape(action.target.package)}") + if tpkg or is_link 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']
Anas
On 8 Feb 2011, at 08:15, Adrian Schröter wrote:
Am Montag, 7. Februar 2011, 21:22:15 schrieb Anas Nashif:
Hi,
When submitting a change against a package in a linked project, where the package does not exist physically, the diff does not work and only "New package" is returned. It would be nice to have the diff generated against the original package in the project link source instead if no package exists in the linked project, comments?
Makes sense. Detecting if it is a new package can be done in different ways.
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
-- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (2)
-
Adrian Schröter
-
Anas Nashif