1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 09:16:16 +02:00
Commit Graph

1141 Commits

Author SHA1 Message Date
Marcus Huewe
58d716a6f7 - _load_plugins: add all functions from the plugin to the Osc class
Adding only functions which starts with "do_" breaks the old
behavior.
2013-06-26 10:18:14 +02:00
Marcus Huewe
4996b1d1ac - do_copypac: fixed help text of the --revision option (as suggested by darix)
It "copies" the specified revision instead of "linking" it.
2013-06-21 15:11:20 +02:00
Marcus Huewe
58532bbac7 - small fix for commit d338254bb7
catch HTTPError instead of TypeError
2013-06-17 17:37:40 +02:00
Sascha Peilicke
d338254bb7 Display meaningful message for queries w/o project
Like: osc rq list -U $USER -t change_devel
2013-06-17 16:26:00 +02:00
Sascha Peilicke
4007800880 Catch specific exception. Catch-all is calling for error 2013-06-17 16:21:32 +02:00
Marcus Huewe
b6c9505274 - reworked the plugin loading mechanism
Using the "old" exec approach isn't possible anymore because it'll break all
plugins which aren't compatible with python3 (for instance the usage of
python2's "print" statement will lead to an error). In order to circumvent
this problem we do the following:

- import the plugin/module
- update the module's global symbol table with the "globals()" of the
  commandline module
- bind the module's "do_*" functions to the "Osc" class

This basically mimics the old "exec" semantics.
2013-06-13 20:10:12 +02:00
Juergen Weigert
4b48cc611f fixed plugin crash message: include the plugin name
Two occurences.
2013-06-06 12:36:48 +02:00
Juergen Weigert
c7a15b9dab fixed plugin crash message: include the plugin name 2013-06-06 11:55:50 +02:00
Danny Al-Gaaf
ca306fbb29 commandline.py: remove some unnecessary pass statements
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-27 13:42:28 +02:00
Danny Al-Gaaf
42b8d5ff45 commandline.py: fix "More than one statement on a single line"
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-27 13:38:49 +02:00
Danny Al-Gaaf
c261a80d46 commandline.py: remove comma, causing trouble
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-27 13:06:01 +02:00
Danny Al-Gaaf
00e3932e43 commandline.py: wrap some really long lines
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-27 13:03:46 +02:00
Danny Al-Gaaf
8403c92059 commandline.py: add missing spaces
Add missing spaces around operators, add missing spaces after comma.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-27 12:41:50 +02:00
Danny Al-Gaaf
439e03501d commandline.py: remove unnecessary semicolon
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-27 12:18:43 +02:00
Danny Al-Gaaf
e1b8022ca0 commandline.py: fix bad indentation
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-05-27 12:16:44 +02:00
eea716f11f - support listing of deleted source files "ls -D $PROJECT $PACKAGE" 2013-05-17 10:37:51 +02:00
Michal Čihař
f2a1bde695 Fix typo in help 2013-05-07 09:29:59 +02:00
954c2fc2b2 - fix request ... --or-revoke command for automated request accept/revoking 2013-05-06 18:45:51 +02:00
Marcus Huewe
69150040c2 - do_submitrequest: --diff is not supported in a project working copy
This (partly) fixes issue #29.
2013-05-02 22:18:14 +02:00
90d51da3d2 - add --message option for creating set_bugowner requests 2013-05-02 11:38:53 +02:00
71c40acc51 - fix using --set-bugowner-request on explicit specified containers 2013-05-02 11:08:27 +02:00
69e6e586c7 - fix print syntax 2013-05-02 11:05:48 +02:00
ce998fbc29 - fix spelling typo 2013-05-02 10:57:15 +02:00
a8f14bed60 - allow to set bugowner/maintainership for a given binary 2013-05-02 10:50:05 +02:00
Marcus Huewe
cdc1245960 - pass a str to exec() instead of an open file object
An open file object isn't supported anymore by python3.
This fixes issue #26.
2013-04-30 17:44:38 +02:00
9595aa9f09 - show also groups in maintainer/bugowner search 2013-04-22 17:09:33 +02:00
2b06180efa - anotehr python3 syntax fix 2013-04-16 15:57:30 +02:00
e1291fdcc6 - fix the general architecture detection for incomplete "osc build" lines 2013-04-16 15:42:37 +02:00
b99233e3ae - hostarch is an array :/ 2013-04-16 15:24:28 +02:00
ce04f8b9bb - fix syntax to satisfy testsuite 2013-04-16 11:01:56 +02:00
Michal Vyskocil
b787ca2b39 python3 compatibility: make all unit test pass
There are many places can't be covered by 2to3, especially the
str/unicode -> str/bytes change done in python3. This is a big patch
incorporating all changes made in order to make python3 suite.py run
without any single failure.

It

 * adapt the introspect_handler_3 for case there are no __defaults__
 * adds the ET_ENCODING variable for ET.fromstring ("unicode" in py3,
  "utf-8" in py2)
 * (re)adds various builtins to both python versions
    - memoryview to python 2.6
    - bytes compatible with py3 to 2.6 and 2.7

and it changes few parts of tests/common.py in order to be compatible
with python3

 * new urlcompare method compares all components or url + parsed query
   string in a dictionary, so the ordering, neither quoting does not matter
 * bytes builtin has been added to 2.x and used in assertEqualMultiline
2013-04-16 10:51:42 +02:00
Michal Vyskocil
f0186dbde8 python3 compatibility: fix all tests 2013-04-16 10:51:42 +02:00
Michal Vyskocil
419367fca3 python3 compatibility: urllib
fixes all renames in urllib, urllib2, urlparse modules in python3
2013-04-16 10:51:42 +02:00
Michal Vyskocil
7f2031558c python3 compatibility: print function
The most visible change in python3 - removal of print statement and all
the crufty
   print >> sys.stderr, foo,

The from __future__ import print_function makes it available in python
2.6
2013-04-16 10:51:41 +02:00
Michal Vyskocil
0dcbddbafe python3 compatibility: new syntax for literals
The octal literals got a new syntax 0755 -> 0o755
2013-04-16 10:51:18 +02:00
Michal Vyskocil
87d354e1a0 python3 compatibility: import proper modules
Some modules (httplib, StringIO, ...) were renamed in python3. This
patch try to import the proper symbols from python3 and then fallback to
python2 in a case ImportError will appear.

There is one exception, python 2.7 got the io module with StringIO, but
it allow unicode arguments only. Therefor the old module is poked before
new one.
2013-04-16 10:51:18 +02:00
Michal Vyskocil
c612e8d47e python3 compatibility: use relative imports
Use relative imports when using module's own modules - this makes a
clear distinction between already developed copy and installed package.
2013-04-16 10:51:18 +02:00
Michal Vyskocil
2ad4a8c873 python3 compatibility: has_key
don't use method removed from python3
2013-04-16 10:51:17 +02:00
Michal Vyskocil
19f689ce0b python3 compatibility: getcwdu
used just on one place, seems to be enough to simply remove it
2013-04-16 10:51:17 +02:00
Michal Vyskocil
600a565428 python 3 compatibility: exec
exec is no longer a statement
2013-04-16 10:51:17 +02:00
Michal Vyskocil
3a93ac6d10 python3 compatibility: except
changes 'except FooError, fe' to 'except FooError as fe'

available in python 2.6
2013-04-16 10:51:17 +02:00
Michal Vyskocil
d3648be24b python3 compatibility: dict
this patch
 1.) removes the iteritems/itervalues, which were dropped in py3
     items/values are used instead
 2.) add an extra list() in a cases the list-based access is needed
     (included appending, indexing and so)
 3.) changes a sorting idiom in few places
     instead of
     foo = dict.keys()
     foo.sort()
     for i in foo:

     there is a recommended

     for i in sorted(dict.keys()):
 4.) in one occassion it removes a if dict.has_key() by simpler
   dict.get(key, default)
2013-04-16 10:51:17 +02:00
b8faeeddb4 - fix build on ppc/s390/ia64 (bnc#815296) 2013-04-16 09:04:34 +02:00
Marcus Huewe
9e6e76c712 - do_localbuild: made "arch" argument optional 2013-03-25 20:28:27 +01:00
Marcus Huewe
03b8cba2af - fixed bnc#807621
Bug summary: "osc: when forwarding a request, previous request is
not superseded automatically"
2013-03-08 19:06:04 +01:00
Marcus Huewe
93df866787 - added new function core.run_external which can be used to execute an external program
Basically it's just a wrapper around subprocess.call which raises an ExtRuntimeError
exception if subprocess.call raised an OSError with errno set to ENOENT (unfortunately
the OSError's filename attribute is set to None therefore we cannot print a meaningful
error message (that's why an ExtRuntimeError is raised)).
Replaced all occurrences of subprocess.call with a corresponding run_external call.
2013-03-08 00:56:57 +01:00
6d7de62755 - explain the "osc maintainer" command a bit more extensive 2013-03-06 11:49:54 +01:00
Marcus Huewe
b228fc3c98 - do_service: fixed typo in command description
Thanks to Richard Bos <rbos@opensuse.org> for spotting this.
2013-03-02 15:27:20 +01:00
6e42a61076 - add a accept-or-revoke function for requests. useful for mass automatisation of processing stuck requests. 2013-02-28 10:32:29 +01:00
Marcus Huewe
45e49905ce - do_mv: minor cosmetic changes 2013-02-28 00:30:05 +01:00