[opensuse-buildservice] osc pdiff plugin
Hi, I got tired of typing long rdiff commands for packages that are known to be links/branches, so I wrote a pdiff (parent diff) plugin. pdiff simply works this way: + look if PRJ/PKG is a link/branch, and if it is, it gets the parent from the link/branch data. + if it's not a link/branch, it tries to guess what would be a good parent. Currently, it just guesses by looking at the project name (for home:vuntz:branches:* names). If you call it from a project checkout or a package checkout, you can skip some arguments (it will take the project, or the project and package information from the checkout). So you can just do "osc pdiff" in a checkout instead of a long rdiff command, or something like "osc pdiff GNOME:Factory gnome-panel" to do a diff between gnome-panel in GNOME:Factory and openSUSE:Factory. Feedback welcome. I'm unsure where we should ship plugins like this one. Does it make sense to include them in osc? Or should I just create a osc-plugin-pdiff package and submit it to openSUSE:Tools? Vincent -- Les gens heureux ne sont pas pressés.
Vincent Untz wrote:
I got tired of typing long rdiff commands for packages that are known to be links/branches, so I wrote a pdiff (parent diff) plugin.
You probably didn't know about osc sr -d :-) cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 09/13/2010 at 11:01 AM, Ludwig Nussel
wrote: Vincent Untz wrote: I got tired of typing long rdiff commands for packages that are known to be links/branches, so I wrote a pdiff (parent diff) plugin. You probably didn't know about osc sr -d :-)
pdiff works before you create an SR... it's similar to the function on webui, in the files lsit, check the diff... Slightly different usecase. Dominique -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hi Vicent, me too, but had this workaround alias oscrdiff='osc -A obs rdiff openSUSE:Factory $(cat .osc/_package) $(cat .osc/_project) $(cat .osc/_package)' Am 10.09.2010 17:58, schrieb Vincent Untz:
Hi,
I got tired of typing long rdiff commands for packages that are known to be links/branches, so I wrote a pdiff (parent diff) plugin.
pdiff simply works this way:
+ look if PRJ/PKG is a link/branch, and if it is, it gets the parent from the link/branch data.
+ if it's not a link/branch, it tries to guess what would be a good parent. Currently, it just guesses by looking at the project name (for home:vuntz:branches:* names).
If you call it from a project checkout or a package checkout, you can skip some arguments (it will take the project, or the project and package information from the checkout).
So you can just do "osc pdiff" in a checkout instead of a long rdiff command, or something like "osc pdiff GNOME:Factory gnome-panel" to do a diff between gnome-panel in GNOME:Factory and openSUSE:Factory.
Feedback welcome.
I'm unsure where we should ship plugins like this one. Does it make sense to include them in osc? Or should I just create a osc-plugin-pdiff package and submit it to openSUSE:Tools?
Vincent
-- Christian --------------------------------------------------- Der ultimative shop für Sportbekleidung und Zubehör http://www.sc24.de --------------------------------------------------- -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hi, On 2010-09-10 17:58:33 +0200, Vincent Untz wrote: <SNIP>
I'm unsure where we should ship plugins like this one. Does it make sense to include them in osc? Or should I just create a osc-plugin-pdiff package and submit it to openSUSE:Tools?
Hmm good question:) It might make sense to merge your changes into the "rdiff" command. IMHO your "pdiff" behaviour is probably more useful than the default "rdiff" behaviour. Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Le mardi 14 septembre 2010, à 15:41 +0200, Marcus Hüwe a écrit :
Hi,
On 2010-09-10 17:58:33 +0200, Vincent Untz wrote:
<SNIP>
I'm unsure where we should ship plugins like this one. Does it make sense to include them in osc? Or should I just create a osc-plugin-pdiff package and submit it to openSUSE:Tools?
Hmm good question:) It might make sense to merge your changes into the "rdiff" command. IMHO your "pdiff" behaviour is probably more useful than the default "rdiff" behaviour.
Well, not necessarily. osc co GNOME:Factory gnome-panel cd GNOME:Factory/gnome-panel osc rdiff What should it do? Should it do a diff to the parent, or should it show me the last change in GNOME:Factory/gnome-panel? Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Am Mittwoch, 15. September 2010, 10:06:05 schrieb Vincent Untz:
Le mardi 14 septembre 2010, à 15:41 +0200, Marcus Hüwe a écrit :
Hi,
On 2010-09-10 17:58:33 +0200, Vincent Untz wrote:
<SNIP>
I'm unsure where we should ship plugins like this one. Does it make sense to include them in osc? Or should I just create a osc-plugin-pdiff package and submit it to openSUSE:Tools?
Hmm good question:) It might make sense to merge your changes into the "rdiff" command. IMHO your "pdiff" behaviour is probably more useful than the default "rdiff" behaviour.
Well, not necessarily.
osc co GNOME:Factory gnome-panel cd GNOME:Factory/gnome-panel osc rdiff
What should it do? Should it do a diff to the parent, or should it show me the last change in GNOME:Factory/gnome-panel?
The functionality of pdiff is for sure a good addition to osc :) But what is "p" refering to ? would "bdiff" or "branchdiff" not be more meaningfull ? If we merge it with rdiff it could also look like osc rdiff -b with local checkout or osc rdiff -b PROJECT PACKGE without local checkout. Is this usefull ? bye adrian -- 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
Le mercredi 15 septembre 2010, à 11:06 +0200, Adrian Schröter a écrit :
Am Mittwoch, 15. September 2010, 10:06:05 schrieb Vincent Untz:
Le mardi 14 septembre 2010, à 15:41 +0200, Marcus Hüwe a écrit :
Hi,
On 2010-09-10 17:58:33 +0200, Vincent Untz wrote:
<SNIP>
I'm unsure where we should ship plugins like this one. Does it make sense to include them in osc? Or should I just create a osc-plugin-pdiff package and submit it to openSUSE:Tools?
Hmm good question:) It might make sense to merge your changes into the "rdiff" command. IMHO your "pdiff" behaviour is probably more useful than the default "rdiff" behaviour.
Well, not necessarily.
osc co GNOME:Factory gnome-panel cd GNOME:Factory/gnome-panel osc rdiff
What should it do? Should it do a diff to the parent, or should it show me the last change in GNOME:Factory/gnome-panel?
The functionality of pdiff is for sure a good addition to osc :)
But what is "p" refering to ? would "bdiff" or "branchdiff" not be more meaningfull ?
Ah, I was thinking "parent". It's not specific to branches: it also work with old-style links, and it also tries to do the right thing if you create a new package in home:vuntz:branches:GNOME:Factory before submitting it to GNOME:Factory (ie, it will "guess" that the package would live in GNOME:Factory, and it just shows a diff with --missingok)
If we merge it with rdiff it could also look like
osc rdiff -b
with local checkout or
osc rdiff -b PROJECT PACKGE
without local checkout.
Is this usefull ?
That would work. I must admit, though, that I'm afraid we're not making the UI better this way: rdiff is already confusing (for instance "osc rdiff PRJ PKG" shows the last commit, but to see a diff between two projects, you do "osc rdiff ANOTHERPRJ PKG PRJ"). So I'm unsure if adding yet another way to call rdiff with a different behavior will help. But maybe I'm afraid for nothing :-) Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (6)
-
Adrian Schröter
-
Christian
-
Dominique Leuenberger
-
Ludwig Nussel
-
Marcus Hüwe
-
Vincent Untz