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

1371 Commits

Author SHA1 Message Date
Andreas Schwab
7be5838e4e fix decoding for osc aggregatepac 2019-11-13 15:50:49 +01:00
lethliel
e16bd07e25 release 0.166.2 2019-11-13 13:02:57 +01:00
lethliel
02207d719c fix decoding for osc linkpac
in def link_pac dst_meta is a list of bytes-like objects.
so b''.join(dst_meta) is needed
2019-11-04 15:00:59 +01:00
lethliel
992255b0df release 0.166.1 2019-10-29 11:15:35 +01:00
lethliel
64a5969ca8 release 0.166.0 2019-10-24 11:48:35 +02:00
Marcus Huewe
95d49a0af6 Merge branch 'fix' of https://github.com/adrianschroeter/osc
Only a 404 implies a "meta_change" in link_pac and aggregate_pac.
2019-10-09 14:38:50 +02:00
e2c50fb8c1 be sure that destination is not existing before overwriting content
we used to crash on utf encoding errors, be sure not to replace meta
data in that case
2019-10-09 07:34:20 +02:00
Marco Strigl
99d305e969
Merge pull request #643 from lethliel/fix_quoted_output
unquote prj on osc co error message
2019-09-23 11:55:52 +02:00
40c480e9ef
Resurrect merge_cmd variable after it got removed in the past
In case diff3 returns something except 0 or 1, osc errors out because the
variable merge_cmd is not defined. It used to exist, but got removed in the
past and is reintroduced via this commit.
2019-09-20 21:56:35 +02:00
lethliel
e89c7dd12d unquote prj on osc co error message 2019-09-20 09:28:19 +02:00
lethliel
ced4ac6506 append '+00:00' to now.isoformat() to satify api
just append '+00:00' so that the api calculates the correct accept time
based on UTC
2019-09-18 16:55:10 +02:00
5f1109072f fix checkout of meta files
typo leaded to wrong parameter
2019-09-16 14:01:35 +02:00
lethliel
406918469d [python3] decode tmpfile content on edit_message 2019-08-30 11:57:31 +02:00
lethliel
c9d85ac248 move raw_input function to helper module 2019-08-27 15:17:53 +02:00
lethliel
dbed74a13f reopen 0.166 development 2019-08-05 08:47:46 +02:00
lethliel
5994326451 release 0.165.4 2019-08-05 08:45:32 +02:00
Marco Strigl
d2de7ccc97
Merge branch 'master' into maint_enforce_branch 2019-07-25 13:46:18 +02:00
f465717668 allow implicit branch on maintenance request creation
via --enforce-branching option

This may be default by server side settings
2019-07-25 13:43:45 +02:00
lethliel
5e39cdf683 open 0.166 development 2019-07-24 15:15:45 +02:00
lethliel
26214f7dcd release 0.165.3 2019-07-24 15:13:39 +02:00
lethliel
2b47be6b1e switch to difflib.diff_bytes in python3 case.
The files are now opened as rb for diffing. In python2 nothing changes.
In python3 the returned diff is bytes now.

The following changes were made:
  * commandline.py: The returned diff is now bytes
  * get_diff now returs the diff as a bytes-like object
  * run_pager writes with sys.stdout.buffer.write if message
    is not a string
  * for the commit message the returned diff needs to be decoded
    now. Otherwise it will just producce garbage. For the commit
    message the diff on decoded bytes-objects is ok. (nothing harmfull
    can happen here)
  * fixed submit_action_diff
  * fixed request_interactive_review
2019-07-24 13:48:39 +02:00
lethliel
9a1b2d980a open 0.165.3 development 2019-07-08 11:30:42 +02:00
lethliel
d17b46c948 release 0.165.2 2019-07-08 11:28:50 +02:00
lethliel
ef4b0ce023 fix handling of empty prjconfig meta
if prjconfig meta is empty the class metafile init
fails with

if isinstance(input[0], str):
IndexError: list index out of range

This is because input is an empty list and has no
[0] index.

This can be fixed by changing this line to:

if input and isinstance(input[0], str):
2019-07-02 09:36:05 +02:00
lethliel
2568f88438 simplified class metafile __init__ method
simplified and fixed the __init__ method of the metafile class.
input can be string, bytes-like object, list of strings or list
of bytes-like objects now.

Based on the input now always a list is generated and joined to
a string for writing in the fd. (This is ugly but needed for
compat reasons)
2019-06-11 15:08:52 +02:00
Marco Strigl
9a098c4af8
Merge pull request #578 from lethliel/python3_fix_set_bugowner
[python3] osc maintainer -s now works with python3
2019-06-11 12:53:20 +02:00
lethliel
d85c901f88 osc maintainer -s now works with python3
data is a bytes-like object now and needs to be joined into a
bytes-like object.
2019-06-11 12:00:42 +02:00
Andreas Schwab
ce63cd3e18 Properly parse error message in metafile.edit 2019-05-29 12:27:40 +02:00
Marcus Huewe
cf96f85590 Merge branch 'master' of https://github.com/sknorr/osc
Improve grammar in check_existing_requests and
check_existing_maintenance_requests.
2019-05-25 23:44:44 +02:00
lethliel
1ab68d3bfb open 0.165.2 development 2019-05-22 13:00:55 +02:00
lethliel
8b56405d10 release 0.165.1 2019-05-20 08:35:27 +02:00
lethliel
5bd5fdb22c Revert "fix getbinaries quiet logic"
This reverts commit 82ac5f6f06.
2019-05-16 09:31:38 +02:00
Marco Strigl
8c14208ad0
Merge pull request #555 from lethliel/fix_get_binaries_quiet_logic
fix getbinaries quiet logic
2019-05-15 17:29:16 +02:00
lethliel
82ac5f6f06 fix getbinaries quiet logic
opts.quiet is passed to get_binary_file which is False by default.
So the following if progress_meter is always False unless -q is given.

So it needs to be if not progress_meter.
2019-05-15 17:22:51 +02:00
Stefan Knorr
84c8019383 Improve grammar of request supersede message 2019-05-14 20:05:38 +02:00
lethliel
597eadf2f4 fix adding dirs as compressed archive
The content in the todo dict are strings. In python3 the communicate
method expects a bytes-like object not a string.

Solution: Encode every element in todo to a new dict (enc_todo) and
pass this instead of todo
2019-05-14 10:24:17 +02:00
lethliel
03777b7e4d fix get_commitlog to decode correct.
get_commitlog mixes bytes and strings when the output is
xml or csv.

This is fixed by decoding the commit message before replacing chars.
2019-05-14 10:01:02 +02:00
Marcus Huewe
a3de1bdad1 Merge branch 'master' of https://github.com/lnussel/osc
Remove group elements during copy_pac, link_pac, aggregate_pac.
2019-04-24 20:11:50 +02:00
lethliel
1dc836f48c open 0.166 development 2019-04-18 14:30:14 +02:00
lethliel
baf80268b7 release 0.165.0 2019-04-18 14:27:42 +02:00
Ludwig Nussel
9d4f584aeb Also remove groups on copypac 2019-04-17 11:42:29 +02:00
lethliel
0d55ddc1b3 [python3] fix decoding in addGitSource
open the file with mode 'w' instead of 'wb'. The 'b' is not needed.
Neither in python2 nor in python3.

Fixes github issue https://github.com/openSUSE/osc/issues/507
2019-04-16 16:55:06 +02:00
lethliel
ee694b54f2 [python3] python3 support for core library
* use cmp_to_key from functools for python 2.7 and higer
* use self written cmp_to_key for python 2.6
* new functions compare und cmp (used in python2 and python3)
* a lot of bytestring handling and decoding
* fix slow rbl based on f.readline(bufsize)
2019-04-07 11:14:49 -05:00
Michael Schroeder
8b4dae21f7 Fix kiwi builds where the project does not define a path
In that case, the packages to setup the build environment are
taken from the repositories defined in the kiwi file. Osc did
not take into account that the build config must match this
path. So it cannot just get the build config like with normal
builds, but must use a different path.

This led to build errors on some projects like CentOS 7 which
rely on 'Order' statements from the project config.

The OBS backend already had support for this: the 'path' parameter
can be used to overwrite the project path in the _buildconfig
query. We now use this to provide the correct path if we
detect this case. (The detection is currently a heuristic
because OBS does not provide us with a clear indicator.)
2019-03-11 16:39:04 +01:00
lethliel
93ea66b922 reopen 0.165 development 2019-02-12 09:17:05 +01:00
lethliel
4a7248562f release 0.164.2 2019-02-12 09:11:43 +01:00
Marcus Huewe
555efc845f Avoid a potential http request if there are no services
The vc_export_env call was introduced in commit
37ca5535ce ("Export vc env vars when
running a source service") and broke the testsuite. The potential
http request is useless if there are no services. Hence, avoid it.

Thanks to Marco Strigl for catching the testsuite error!
2019-02-04 12:19:57 +01:00
Marcus Huewe
37ca5535ce Export vc env vars when running a source service
Some services (like the obs_scm) will use them. Note: if realname
or email is not set in the oscrc, an additional http request will
be performed.

This change was requested by darix.
2019-01-29 14:30:52 +01:00
Marcus Huewe
fefd7c1dea Move vc env exporting code into core.vc_export_env
This allows for reuse. In the future, these variables should also
be exported when executing source services.
2019-01-29 14:20:12 +01:00
lethliel
623f33daa4 reopen 0.165.0 development 2019-01-16 14:04:04 +01:00