[opensuse-buildservice] Re: Novell ID's for OSC Plugins
Hi, how about discussing this on the public opensuse-buildservice list? I'm sending my reply there. On Thu, Nov 29, 2007 at 01:12:33PM +0100, Adrian Schröter wrote:
Regarding the current status of the diff functionality, what you asked for, from https://api.opensuse.org/apidocs
POST /source/<project>/<package>?cmd=diff Arguments: project - Project name package - Package name Create a source diff rev: revision of new package, optional oproject: old project, optional opackage: old package, optional orev: old revision, optional Result: diff as text/plain
So you can do this via the api:
curl -X POST -H "Content-Length: 0" -0 -n \ "https://api.opensuse.org/source/openSUSE:Tools/build?cmd=diff&oproject=openS..."
An osc equivalent of this command would be osc req -m POST "/source/openSUSE:Tools/build?cmd=diff&oproject=openSUSE:Factory"
to diff the new "build" package in openSUSE:Tools project against the version in openSUSE:Factory .
osc has IMHO not yet a nice interface for this (something like cvs rdiff). Right Peter ?
bye adrian
osc has no support for requesting a diff between *two* arbitrary packages. So far, "osc diff" can create diffs of different revisions of *one* package. It should be possible to implement an osc subcommand for this with a few lines. To integrate the functionality into the existing osc diff subcommand might be a little more work (it needs some consideration to come up with a sane user interface). Peter -- "WARNING: This bug is visible to non-employees. Please be respectful!" SUSE LINUX Products GmbH Research & Development
On Thursday 29 November 2007 13:24:12 wrote Dr. Peter Poeml: ...
On Thu, Nov 29, 2007 at 01:12:33PM +0100, Adrian Schröter wrote:
Regarding the current status of the diff functionality, what you asked for, from https://api.opensuse.org/apidocs
POST /source/<project>/<package>?cmd=diff Arguments: project - Project name package - Package name Create a source diff rev: revision of new package, optional oproject: old project, optional opackage: old package, optional orev: old revision, optional Result: diff as text/plain
So you can do this via the api:
curl -X POST -H "Content-Length: 0" -0 -n \
"https://api.opensuse.org/source/openSUSE:Tools/build?cmd=diff&oproject=o penSUSE:Factory"
An osc equivalent of this command would be osc req -m POST "/source/openSUSE:Tools/build?cmd=diff&oproject=openSUSE:Factory"
sure, but this is not really intuitive to use ;) Esp. not when you use this more often. cvs has a rdiff command what similar to this functionality, doing the diff on the server side.
to diff the new "build" package in openSUSE:Tools project against the version in openSUSE:Factory .
osc has IMHO not yet a nice interface for this (something like cvs rdiff). Right Peter ?
bye adrian
osc has no support for requesting a diff between *two* arbitrary packages. So far, "osc diff" can create diffs of different revisions of *one* package.
It should be possible to implement an osc subcommand for this with a few lines.
To integrate the functionality into the existing osc diff subcommand might be a little more work (it needs some consideration to come up with a sane user interface).
osc diff is just for a checked out package, right ? an equivalent for cvs rdiff would work without any checked out sources, just osc rdiff <TO_PROJECT> <TO_PACKAGE> [--package <FROM_PACKAGE>] [--project <FROM_PROJECT>] hm, maybe even default to "--project openSUSE:Factory" if no argument is given ... -- Adrian Schroeter SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) email: adrian@suse.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Thu, Nov 29, 2007 at 01:33:47PM +0100, Adrian Schröter wrote:
On Thursday 29 November 2007 13:24:12 wrote Dr. Peter Poeml:
So you can do this via the api:
curl -X POST -H "Content-Length: 0" -0 -n \
"https://api.opensuse.org/source/openSUSE:Tools/build?cmd=diff&oproject=o penSUSE:Factory"
An osc equivalent of this command would be osc req -m POST "/source/openSUSE:Tools/build?cmd=diff&oproject=openSUSE:Factory"
sure, but this is not really intuitive to use ;)
I posted this just because it is *easier* to use than the curl command, IMO.
osc has no support for requesting a diff between *two* arbitrary packages. So far, "osc diff" can create diffs of different revisions of *one* package.
It should be possible to implement an osc subcommand for this with a few lines.
To integrate the functionality into the existing osc diff subcommand might be a little more work (it needs some consideration to come up with a sane user interface).
osc diff is just for a checked out package, right ?
Yes.
an equivalent for cvs rdiff would work without any checked out sources, just
osc rdiff <TO_PROJECT> <TO_PACKAGE> [--package <FROM_PACKAGE>] [--project <FROM_PROJECT>]
It'd also need options for revision and orevision. How about osc rdiff [-rN[:M]] [[--oldprj OLD_PROJECT] --oldpkg OLD_PACKAGE]] NEW_PROJECT NEW_PACKAGE One should note that the result is a "pretty diff", which goes into tar balls and is handy for reviews -- not a normal diff which yields an appliable patch.
hm, maybe even default to "--project openSUSE:Factory" if no argument is given ...
Maybe a good idea... Peter -- "WARNING: This bug is visible to non-employees. Please be respectful!" SUSE LINUX Products GmbH Research & Development
On Thursday 29 November 2007 17:21:43 wrote Dr. Peter Poeml:
On Thu, Nov 29, 2007 at 01:33:47PM +0100, Adrian Schröter wrote:
...
an equivalent for cvs rdiff would work without any checked out sources, just
osc rdiff <TO_PROJECT> <TO_PACKAGE> [--package <FROM_PACKAGE>] [--project <FROM_PROJECT>]
It'd also need options for revision and orevision.
How about
osc rdiff [-rN[:M]] [[--oldprj OLD_PROJECT] --oldpkg OLD_PACKAGE]] NEW_PROJECT NEW_PACKAGE
looks even better to me :)
One should note that the result is a "pretty diff", which goes into tar balls and is handy for reviews -- not a normal diff which yields an appliable patch.
hm, maybe even default to "--project openSUSE:Factory" if no argument is given ...
Maybe a good idea...
Peter
-- Adrian Schroeter SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) email: adrian@suse.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Thu, Nov 29, 2007 at 05:39:21PM +0100, Adrian Schröter wrote:
On Thursday 29 November 2007 17:21:43 wrote Dr. Peter Poeml:
On Thu, Nov 29, 2007 at 01:33:47PM +0100, Adrian Schröter wrote:
...
an equivalent for cvs rdiff would work without any checked out sources, just
osc rdiff <TO_PROJECT> <TO_PACKAGE> [--package <FROM_PACKAGE>] [--project <FROM_PROJECT>]
It'd also need options for revision and orevision.
How about
osc rdiff [-rN[:M]] [[--oldprj OLD_PROJECT] --oldpkg OLD_PACKAGE]] NEW_PROJECT NEW_PACKAGE
looks even better to me :)
One should note that the result is a "pretty diff", which goes into tar balls and is handy for reviews -- not a normal diff which yields an appliable patch.
hm, maybe even default to "--project openSUSE:Factory" if no argument is given ...
Maybe a good idea...
While experimenting, I noticed that https://api.opensuse.org/source/home:poeml/initviocons?cmd=diff&oproject=hom... returns a non-empty diff, even though package=opackage and project=oproject. Is this a diff to the last revision? It looks like that. Peter -- "WARNING: This bug is visible to non-employees. Please be respectful!" SUSE LINUX Products GmbH Research & Development
On Thu, Nov 29, 2007 at 05:52:24PM +0100, Dr. Peter Poeml wrote:
On Thu, Nov 29, 2007 at 05:39:21PM +0100, Adrian Schröter wrote:
On Thursday 29 November 2007 17:21:43 wrote Dr. Peter Poeml:
On Thu, Nov 29, 2007 at 01:33:47PM +0100, Adrian Schröter wrote:
...
an equivalent for cvs rdiff would work without any checked out sources, just
osc rdiff <TO_PROJECT> <TO_PACKAGE> [--package <FROM_PACKAGE>] [--project <FROM_PROJECT>]
It'd also need options for revision and orevision.
How about
osc rdiff [-rN[:M]] [[--oldprj OLD_PROJECT] --oldpkg OLD_PACKAGE]] NEW_PROJECT NEW_PACKAGE
looks even better to me :)
One should note that the result is a "pretty diff", which goes into tar balls and is handy for reviews -- not a normal diff which yields an appliable patch.
hm, maybe even default to "--project openSUSE:Factory" if no argument is given ...
Maybe a good idea...
While experimenting, I noticed that https://api.opensuse.org/source/home:poeml/initviocons?cmd=diff&oproject=hom... returns a non-empty diff, even though package=opackage and project=oproject.
Is this a diff to the last revision? It looks like that.
I hacked up an rdiff command, and committed it to svn. I hope it works as expected. The default behaviour, if opackage and oproject are not specified, is a diff against the last revision -- not against Factory. So it behaves similar like the backend. The patch is also applied to the package tracking branch. Peter -- "WARNING: This bug is visible to non-employees. Please be respectful!" SUSE LINUX Products GmbH Research & Development
On Thursday 29 November 2007 18:25:45 wrote Dr. Peter Poeml:
On Thu, Nov 29, 2007 at 05:52:24PM +0100, Dr. Peter Poeml wrote:
On Thu, Nov 29, 2007 at 05:39:21PM +0100, Adrian Schröter wrote:
On Thursday 29 November 2007 17:21:43 wrote Dr. Peter Poeml:
On Thu, Nov 29, 2007 at 01:33:47PM +0100, Adrian Schröter wrote:
...
an equivalent for cvs rdiff would work without any checked out sources, just
osc rdiff <TO_PROJECT> <TO_PACKAGE> [--package <FROM_PACKAGE>] [--project <FROM_PROJECT>]
It'd also need options for revision and orevision.
How about
osc rdiff [-rN[:M]] [[--oldprj OLD_PROJECT] --oldpkg OLD_PACKAGE]] NEW_PROJECT NEW_PACKAGE
looks even better to me :)
One should note that the result is a "pretty diff", which goes into tar balls and is handy for reviews -- not a normal diff which yields an appliable patch.
hm, maybe even default to "--project openSUSE:Factory" if no argument is given ...
Maybe a good idea...
While experimenting, I noticed that https://api.opensuse.org/source/home:poeml/initviocons?cmd=diff&oproject= home%3Apoeml&opackage=initviocons returns a non-empty diff, even though package=opackage and project=oproject.
Is this a diff to the last revision? It looks like that.
yes
I hacked up an rdiff command, and committed it to svn.
cool thing :)
I hope it works as expected.
The default behaviour, if opackage and oproject are not specified, is a diff against the last revision -- not against Factory. So it behaves similar like the backend.
k, maybe we can reconsider this behaviour later, when we have merge request mechanism and know where the package is intended to be submitted ...
The patch is also applied to the package tracking branch.
Peter
-- Adrian Schroeter SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) email: adrian@suse.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2007-11-29 13:24:12 +0100, Dr. Peter Poeml wrote:
Hi,
how about discussing this on the public opensuse-buildservice list?
I'm sending my reply there.
On Thu, Nov 29, 2007 at 01:12:33PM +0100, Adrian Schröter wrote:
Regarding the current status of the diff functionality, what you asked for, from https://api.opensuse.org/apidocs
POST /source/<project>/<package>?cmd=diff Arguments: project - Project name package - Package name Create a source diff rev: revision of new package, optional oproject: old project, optional opackage: old package, optional orev: old revision, optional Result: diff as text/plain
So you can do this via the api:
curl -X POST -H "Content-Length: 0" -0 -n \ "https://api.opensuse.org/source/openSUSE:Tools/build?cmd=diff&oproject=openS..."
An osc equivalent of this command would be osc req -m POST "/source/openSUSE:Tools/build?cmd=diff&oproject=openSUSE:Factory"
What does the "/source/project/build?cmd=diff" command do? I just tried it but I get: <?xml version="1.0" encoding="UTF-8"?> <status code="cmd_execution_no_permission"> <summary>no permission to execute command 'diff'</summary> <details></details> </status> I couldn't find anything about it in the apidocs.
to diff the new "build" package in openSUSE:Tools project against the version in openSUSE:Factory .
osc has IMHO not yet a nice interface for this (something like cvs rdiff). Right Peter ?
bye adrian
osc has no support for requesting a diff between *two* arbitrary packages. So far, "osc diff" can create diffs of different revisions of *one* package.
At the moment osc supports only doing a diff between the working copy and a specified revision. But adding support for comparing two different revisions (e.g. "osc diff -r1:r3") shouldn't be too difficult as this can be done by the api. Marcus --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (3)
-
Adrian Schröter
-
Dr. Peter Poeml
-
Marcus Hüwe