Mailinglist Archive: opensuse-buildservice (266 mails)

< Previous Next >
Re: [opensuse-buildservice] [ANNOUNCE] new osc plugin: prdiff for comparing projects
  • From: Adam Spiers <aspiers@xxxxxxxx>
  • Date: Fri, 18 Jan 2013 12:33:58 +0000
  • Message-id: <20130118123358.GH31109@pacific.linksys.moosehall>
Marcus Hüwe (suse-tux@xxxxxx) wrote:
Hi Adam,

On 2013-01-17 12:57:03 +0000, Adam Spiers wrote:
Adam Spiers (aspiers@xxxxxxxx) wrote:
I wanted a way to quickly compare a project with its "upstream"
project, and a quick hack ended up as a new osc plugin:

https://gist.github.com/616b476a9c592a0a2a89

(Copy to your ~/.osc-plugins or /var/lib/osc-plugins to try it.)

This plugin now lives in a github repo:

https://github.com/aspiers/SUSE-dist

Feel free to submit issues and pull requests. However I would also
like the code to be considered for inclusion in osc core if possible.

Nice! Your plugin looks pretty good. I've no objections against
including it into osc. So if you create a merge request I'll happily
accept it:)
Some comments about the code:
- _prdiff_output_matching_requests:
when using the "get_actions" method you can directly specify the
action types you're interested in: "req.get_actions('submit')"
- do_prdiff:
in most cases it isn't needed to "inspect" the storedir manually.
So instead of "if os.path.exists(os.path.join(store, '_project'))" you
should use "if is_project_dir(os.curdir)". Also the former will
evaluate to True if "prdiff" is executed in a package wc (which
will lead to an error when instantiating the "Project" object).
- do_prdiff:
the "conf.get_config()" call isn't needed.

Thanks for the review! I've made the adjustments, and am now
importing into commandline.py. I think I see some opportunities for
refactoring and reuse of code from other commands too, which is good.

I also just submitted a couple of pull requests to fix some test
failures and hopefully get the Travis builds working - they are all
currently failing due to lack of a Travis configuration file.

I'll try to write some tests for prdiff too.
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups