Skip to content

Commit

Permalink
[backend] update BSXML to add sourcediff to request structure used
Browse files Browse the repository at this point in the history
when requesting a diff in xml format
  • Loading branch information
bugfinder committed Jul 10, 2019
1 parent e6f3fd2 commit fa75a0d
Showing 1 changed file with 51 additions and 49 deletions.
100 changes: 51 additions & 49 deletions src/backend/BSXML.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1210,9 +1210,59 @@ our $pattern_id = [
'downloadurl',
];

our $sourcediff = [
'sourcediff' =>
'key',
[ 'old' =>
'project',
'package',
'rev',
'srcmd5',
],
[ 'new' =>
'project',
'package',
'rev',
'srcmd5',
],
[ 'files' =>
[[ 'file' =>
'state', # added, deleted, changed
[ 'old' =>
'name',
'md5',
'size',
'mtime',
],
[ 'new' =>
'name',
'md5',
'size',
'mtime',
],
[ 'diff' =>
'binary',
'lines',
'shown',
'_content',
],
]],
],
[ 'issues' =>
[[ 'issue' =>
'state',
'tracker',
'name',
'label',
'url',
]]
],
];

our $request = [
'request' =>
'id',
'actions',
'creator',
'type', # obsolete, still here to handle OBS pre-1.5 requests
'key', # cache key, not really in request
Expand Down Expand Up @@ -1252,6 +1302,7 @@ our $request = [
'xsrcmd5',
'oxsrcmd5',
],
[ $sourcediff ],
]],
[ 'submit' => # this is old style, obsolete by request, but still supported
[ 'source' =>
Expand Down Expand Up @@ -1541,55 +1592,6 @@ our $prestodelta = [
[ $deltapackage ],
];

our $sourcediff = [
'sourcediff' =>
'key',
[ 'old' =>
'project',
'package',
'rev',
'srcmd5',
],
[ 'new' =>
'project',
'package',
'rev',
'srcmd5',
],
[ 'files' =>
[[ 'file' =>
'state', # added, deleted, changed
[ 'old' =>
'name',
'md5',
'size',
'mtime',
],
[ 'new' =>
'name',
'md5',
'size',
'mtime',
],
[ 'diff' =>
'binary',
'lines',
'shown',
'_content',
],
]],
],
[ 'issues' =>
[[ 'issue' =>
'state',
'tracker',
'name',
'label',
'url',
]]
],
];

our $configuration = [
'configuration' =>
[],
Expand Down

0 comments on commit fa75a0d

Please sign in to comment.