Today is osc plugin day ;-)
I just rewrote my osc-classify-link shellscript (see below) as a proper osc plugin:
(Try by installing into ~/.osc-plugins or /var/lib/osc-plugins)
It's now MUCH faster, and also supports a new -s / --server option which enables server-side checks for greater accuracy where required. Sample usage:
$ cd ~/OBS/home/aspiers/branches/devel/languages/ruby/ $ osc classify ruby-common branch of or linkpac -> devel:languages:ruby/ruby-common $ osc classify -s ruby-common branch of devel:languages:ruby/ruby-common
$ cd ~/OBS/systemsmanagement/crowbar/2.0 $ osc classify [...] crowbar-sledgehammer normal or copypac erlang linkpac -> systemsmanagement:chef:10/erlang fakechroot branch of home:dmacvicar/fakechroot gecode linkpac -> systemsmanagement:chef:10/gecode js linkpac -> systemsmanagement:chef:10/js libyaml aggregate -> devel:languages:ruby rabbitmq-server branch of or linkpac -> systemsmanagement:chef:10/rabbitmq-server ruby aggregate -> devel:languages:ruby ruby-common aggregate -> devel:languages:ruby ruby19 aggregate -> devel:languages:ruby rubygem-abstract branch of or linkpac -> devel:languages:ruby:extensions/rubygem-abstract rubygem-actionmailer-3_2 linkpac -> devel:languages:ruby:extensions/rubygem-actionmailer-3_2 [...]
As with the prdiff plugin I announced earlier today, I think there's a good argument for including it in the core rather than packaging it as a plugin, but I'd welcome opinions on that.
Adam Spiers (email@example.com) wrote:
Dirk Müller (firstname.lastname@example.org) wrote:
Am 04.01.2013 00:06 schrieb "Adam Spiers" email@example.com:
If it's checked out unexpanded ("osc co -u") then it seems I can take a guess by looking for
<patches> <branch/> </patches>
in the _link file, but I'm not sure this is correct
This is correct.
and it's not even possible when the sources are expanded, since then _link doesn't exist. Suggestions?
I haven't tried it, but perhaps osc info does say it somewhere? Other than that you could use osc cat to query the Server, but I'm not sure if your goal was to avoid the roundtrip.
Yes I was hoping to avoid that :-)
Maybe there is something hidden in the .osc dir :-)
As you said in a separate mail, checking if the linkinfo in .osc/_meta has a baserev is a close-enough estimation, as usually links do not have baserevs. Thanks for the very helpful info!
Here's the resulting script:
To unsubscribe, e-mail: firstname.lastname@example.org To contact the owner, e-mail: email@example.com