Hello community,
here is the log from the commit of package osc for openSUSE:Factory
checked in at Sat Jun 20 05:13:00 CEST 2009.
--------
--- osc/osc.changes 2009-06-15 17:39:51.000000000 +0200
+++ osc/osc.changes 2009-06-18 19:54:51.000000000 +0200
@@ -1,0 +2,24 @@
+Thu Jun 18 19:16:22 CEST 2009 - adrian@suse.de
+
+- use completion script from tar ball
+- update to r7560 (version 0.120)
+ - support "setlinkrev" for whole projects
+ - add "setlinkrev --unset" for removing revision references
+ - add "osc request list -t <type>" to list only submit, delete or develchange requests
+ - add shell completion scripts
+ - fix support of listing requests with multiple actions
+ - "osc maintainer" is following to the development project / package now
+ - "osc maintainer" list maintainer and bugowner roles now
+
+-------------------------------------------------------------------
+Thu Jun 18 10:19:09 CEST 2009 - adrian@suse.de
+
+- update to version 0.119.1
+ * fixing listing of requests, when a delete request exists
+
+-------------------------------------------------------------------
+Wed Jun 10 17:57:29 CEST 2009 - werner@suse.de
+
+- Add completion support for both tcsh and bash
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
osc-0.119.tar.gz
New:
----
osc-0.120.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ osc.spec ++++++
--- /var/tmp/diff_new_pack.lv1980/_old 2009-06-20 05:12:32.000000000 +0200
+++ /var/tmp/diff_new_pack.lv1980/_new 2009-06-20 05:12:32.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package osc (Version 0.119)
+# spec file for package osc (Version 0.120)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,7 +20,7 @@
Name: osc
BuildRequires: python-devel
-Version: 0.119
+Version: 0.120
Release: 1
Group: Development/Tools/Other
License: GPL v2 or later
@@ -75,6 +75,11 @@
%{__python} setup.py install --prefix=%{_prefix} --root %{buildroot}
ln -s osc-wrapper.py %{buildroot}/%{_bindir}/osc
mkdir -p %{buildroot}/var/lib/osc-plugins
+mkdir -p %{buildroot}%{_prefix}/%{_lib}/osc
+mkdir -p %{buildroot}%{_sysconfdir}/profile.d
+install -m 0755 dist/osc.complete %{buildroot}%{_prefix}/%{_lib}/osc/complete
+install -m 0755 dist/complete.csh %{buildroot}%{_sysconfdir}/profile.d/osc.csh
+install -m 0755 dist/complete.sh %{buildroot}%{_sysconfdir}/profile.d/osc.sh
%clean
%{__rm} -rf %{buildroot}
@@ -83,11 +88,29 @@
%defattr(-,root,root)
%{_bindir}/osc*
%{python_sitelib}/*
+%{_sysconfdir}/profile.d/*
+%dir %{_prefix}/%{_lib}/osc
+%{_prefix}/%{_lib}/osc/*
%dir /var/lib/osc-plugins
%doc AUTHORS README TODO NEWS
%doc %_mandir/man1/osc.*
%changelog
+* Thu Jun 18 2009 adrian@suse.de
+- use completion script from tar ball
+- update to r7560 (version 0.120)
+ - support "setlinkrev" for whole projects
+ - add "setlinkrev --unset" for removing revision references
+ - add "osc request list -t <type>" to list only submit, delete or develchange requests
+ - add shell completion scripts
+ - fix support of listing requests with multiple actions
+ - "osc maintainer" is following to the development project / package now
+ - "osc maintainer" list maintainer and bugowner roles now
+* Thu Jun 18 2009 adrian@suse.de
+- update to version 0.119.1
+ * fixing listing of requests, when a delete request exists
+* Wed Jun 10 2009 werner@suse.de
+- Add completion support for both tcsh and bash
* Wed Jun 03 2009 adrian@suse.de
- update to r7528 (version 0.119)
- Support new request types
++++++ osc-0.119.tar.gz -> osc-0.120.tar.gz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.119/AUTHORS new/osc-0.120/AUTHORS
--- old/osc-0.119/AUTHORS 2009-06-03 09:26:02.000000000 +0200
+++ new/osc-0.120/AUTHORS 2009-06-18 19:14:20.000000000 +0200
@@ -17,4 +17,5 @@
Peter Poeml
Susanne Oberhauser
Tom Patzig
+Werner Fink
Will Stephenson
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.119/dist/complete.csh new/osc-0.120/dist/complete.csh
--- old/osc-0.119/dist/complete.csh 1970-01-01 01:00:00.000000000 +0100
+++ new/osc-0.120/dist/complete.csh 2009-06-18 19:14:19.000000000 +0200
@@ -0,0 +1,12 @@
+onintr -
+if (! $?prompt || ! $?tcsh) goto end
+if ($tcsh == 1) goto end
+set rev=$tcsh:r
+set rel=$rev:e
+set pat=$tcsh:e
+set rev=$rev:r
+if ($rev > 5 && $rel > 1) then
+ complete osc 'p@*@`/usr/lib/osc/complete`@'
+endif
+end:
+ onintr
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.119/dist/complete.sh new/osc-0.120/dist/complete.sh
--- old/osc-0.119/dist/complete.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/osc-0.120/dist/complete.sh 2009-06-18 19:14:19.000000000 +0200
@@ -0,0 +1,4 @@
+test -z "$BASH_VERSION" && return
+complete -o default _nullcommand &> /dev/null || return
+complete -r _nullcommand &> /dev/null || return
+complete -o default -C /usr/lib/osc/complete osc
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.119/dist/osc.complete new/osc-0.120/dist/osc.complete
--- old/osc-0.119/dist/osc.complete 1970-01-01 01:00:00.000000000 +0100
+++ new/osc-0.120/dist/osc.complete 2009-06-18 19:14:19.000000000 +0200
@@ -0,0 +1,289 @@
+#!/bin/bash
+#
+# Helper script for completion, usage with tcsh:
+#
+# complete osc 'p@*@`osc.complete`@'
+#
+# usage with bash
+#
+# complete -C osc.complete osc
+#
+# Author: Werner Fink
+#
+
+set -o noclobber
+shopt -s extglob
+typeset -i last
+typeset -i count
+
+test "/proc/$PPID/exe" -ef /bin/tcsh || COMMAND_LINE="$COMP_LINE"
+cmdline=($COMMAND_LINE)
+test "${cmdline[0]}" != "osc" && exit 1
+
+let last=${#COMMAND_LINE}
+let last--
+let count=${#cmdline[@]}
+let count--
+test "${COMMAND_LINE:$last}" = " " && let count++
+unset last
+
+osccmds=(abortbuild add addremove aggregatepac branch build buildconfig \
+ buildhistory buildhist buildinfo buildlog bl cat checkout co commit \
+ checkin ci copypac delete del remove rm deletepac deleteprj diff di \
+ getbinaries help importsrcpkg info init jobhistory jobhist linkpac list \
+ log ls maintainer meta mkpac platforms prjresults pr rdiff rebuildpac \
+ remotebuildlog rbl repos repourls req resolved results results_meta rlog \
+ rprjresults rresults search status sr submitreq update up updatepacmetafromspec \
+ metafromspec wipebinaries)
+oscreq=(create list log show accept decline delete revoke)
+
+oscprj=""
+oscpkg=""
+lnkprj=""
+lnkpkg=""
+test -s ${PWD}/.osc/_project && read -t 1 oscprj < ${PWD}/.osc/_project
+test -s ${PWD}/.osc/_package && read -t 1 oscpkg < ${PWD}/.osc/_package
+if test -s ${PWD}/.osc/_files ; then
+ lnkprj=$(command sed -rn '/ 86400)) && command osc ls >| ~/.osc.projects
+else
+ command osc ls >| ~/.osc.projects
+fi
+
+submit ()
+{
+ local -i pos=$1
+ local -i off=$2
+ local target
+
+ if ((pos == 1)) ; then
+ if test -z "${cmdline[$((3+off))]}" -a -n "${oscprj}" ; then
+ builtin compgen -W "${oscprj}"
+ else
+ builtin compgen -W "$(command cat ~/.osc.projects)" -- "${cmdline[$((3+off))]}"
+ fi
+ fi
+ if ((pos == 2)) ; then
+ if test -z "${cmdline[$((4+off))]}" -a -n "${oscpkg}" ; then
+ builtin compgen -W "${oscpkg}"
+ else
+ builtin compgen -W "$(command osc ls "${cmdline[$((3+off))]}")" -- "${cmdline[$((4+off))]}"
+ fi
+ fi
+ if ((pos == 3)) ; then
+ if test -z "${cmdline[$((5+off))]}" -a -n "${lnkprj}" ; then
+ builtin compgen -W "${lnkprj}"
+ else
+ builtin compgen -W "$(command cat ~/.osc.projects)" -- "${cmdline[$((5+off))]}"
+ fi
+ fi
+ if ((pos == 4)) ; then
+ target="${lnkpkg}"
+ target="${target:+$target }$oscpkg"
+ if test -n "${target}" ; then
+ builtin compgen -W "${target}" -- "${cmdline[$((6+off))]}"
+ else
+ builtin compgen -W "$(command osc ls "${cmdline[$((5+off))]}")" -- "${cmdline[$((6+off))]}"
+ fi
+ fi
+}
+
+case "${cmdline[1]}" in
+add|addremove)
+ if ((count == 1)) ; then
+ builtin compgen -W 'add addremove' -- "${cmdline[1]}"
+ else
+ for x in $(builtin compgen -f -X '.osc' -- "${cmdline[2]}"); do
+ test -d $x && builtin echo $x/ || builtin echo $x
+ done
+ fi
+ ;;
+branch)
+ if ((count == 1)) ; then
+ builtin compgen -W 'branch' -- "${cmdline[1]}"
+ fi
+ case "${cmdline[2]}" in
+ --nodevelproject)
+ if ((count == 3)) ; then
+ builtin compgen -W "$(command cat ~/.osc.projects)" -- "${cmdline[3]}"
+ fi
+ if ((count == 4)) ; then
+ builtin compgen -W "$(command osc ls "${cmdline[3]}")" -- "${cmdline[4]}"
+ fi
+ ;;
+ -*) builtin compgen -W '--nodevelproject' -- "${cmdline[3]}" ;;
+ *)
+ if ((count == 2)) ; then
+ builtin compgen -W "$(command cat ~/.osc.projects)" -- "${cmdline[2]}"
+ fi
+ if ((count == 3)) ; then
+ builtin compgen -W "$(command osc ls "${cmdline[2]}")" -- "${cmdline[3]}"
+ fi
+ esac
+ ;;
+list|ls)
+ if ((count == 1)) ; then
+ builtin compgen -W 'list ls' -- "${cmdline[1]}"
+ fi
+ if ((count == 2)) ; then
+ builtin compgen -W "$(command cat ~/.osc.projects)" -- "${cmdline[2]}"
+ fi
+ if ((count == 3)) ; then
+ builtin compgen -W "$(command osc ls "${cmdline[2]}")" -- "${cmdline[3]}"
+ fi
+ ;;
+sr|submitreq)
+ if ((count == 1)) ; then
+ builtin compgen -W 'sr submitreq' -- "${cmdline[1]}"
+ fi
+ case "${cmdline[2]}" in
+ create)
+ case "${cmdline[3]}" in
+ --nodevelproject)
+ submit $((count - 3)) 1 ;;
+ -*) builtin compgen -W '--nodevelproject' -- "${cmdline[3]}" ;;
+ *) submit $((count - 2)) 0 ;;
+ esac
+ ;;
+ accept|decline|delete|revoke|log)
+ if ((count == 3)) ; then
+ builtin echo -n 'ID'
+ fi
+ ;;
+ show)
+ if ((count == 3)) ; then
+ builtin compgen -W '--diff' -- "${cmdline[3]}"
+ else
+ builtin echo -n 'ID'
+ fi
+ ;;
+ list)
+ if ((count == 3)) ; then
+ builtin compgen -W "$(command cat ~/.osc.projects)" -- "${cmdline[3]}"
+ fi
+ if ((count == 4)) ; then
+ builtin compgen -W "$(command osc ls "${cmdline[3]}")" -- "${cmdline[4]}"
+ fi
+ ;;
+ *)
+ ((count == 2)) && builtin compgen -W "$(builtin echo ${oscreq[@]})" -- "${cmdline[2]}"
+ esac
+ ;;
+copypac|linkpac)
+ if ((count == 1)) ; then
+ builtin compgen -W 'copypac linkpac' -- "${cmdline[1]}"
+ fi
+ case "${cmdline[2]}" in
+ *)
+ if ((count == 2)) ; then
+ builtin compgen -W "$(command cat ~/.osc.projects)" -- "${cmdline[2]}"
+ fi
+ if ((count == 3)) ; then
+ builtin compgen -W "$(osc ls "${cmdline[2]}")" -- "${cmdline[3]}"
+ fi
+ if ((count == 4)) ; then
+ builtin compgen -W "$(command cat ~/.osc.projects)" -- "${cmdline[4]}"
+ fi
+ if ((count == 5)) ; then
+ builtin compgen -W "$(command osc ls "${cmdline[4]}")" -- "${cmdline[5]}"
+ fi
+ esac
+ ;;
+rdiff)
+ if ((count == 1)) ; then
+ builtin compgen -W 'rdiff' -- "${cmdline[1]}"
+ fi
+ case "${cmdline[2]}" in
+ *)
+ if ((count == 2)) ; then
+ builtin compgen -W "$(command cat ~/.osc.projects)" -- "${cmdline[2]}"
+ fi
+ if ((count == 3)) ; then
+ builtin compgen -W "$(osc ls "${cmdline[2]}")" -- "${cmdline[3]}"
+ fi
+ if ((count == 4)) ; then
+ builtin compgen -W "$(command cat ~/.osc.projects)" -P --oldprj= -- "${cmdline[4]#*=}"
+ fi
+ if ((count == 5)) ; then
+ builtin compgen -W "$(command osc ls "${cmdline[4]}")" -P --oldpkg= -- "${cmdline[5]#*=}"
+ fi
+ esac
+ ;;
+ci|commit|checkin)
+ if ((count == 1)) ; then
+ builtin compgen -W 'ci commit checkin' -- "${cmdline[1]}"
+ else
+ for x in $(builtin compgen -f -X '.osc' -- "${cmdline[2]}"); do
+ test -d $x && builtin echo $x/ || builtin echo $x
+ done
+ fi
+ ;;
+co|checkout)
+ if ((count == 1)) ; then
+ builtin compgen -W 'co checkout' -- "${cmdline[1]}"
+ fi
+ if ((count == 1)) ; then
+ builtin compgen -W 'co checkout' -- "${cmdline[1]}"
+ else
+ if ((count == 2)) ; then
+ builtin compgen -W "$(command cat ~/.osc.projects)" -- "${cmdline[2]}"
+ fi
+ if ((count == 3)) ; then
+ builtin compgen -W "$(command osc ls "${cmdline[2]}")" -- "${cmdline[3]}"
+ fi
+ fi
+ ;;
+up|update)
+ if ((count == 1)) ; then
+ builtin compgen -W 'up update' -- "${cmdline[1]}"
+ fi
+ if ((count == 2)) ; then
+ builtin compgen -W '--expand-link --unexpand-link' -- "${cmdline[2]}"
+ fi
+ ;;
+meta)
+ if ((count == 1)) ; then
+ builtin compgen -W 'meta metafromspec' -- "${cmdline[1]}"
+ fi
+ if ((count == 2)) ; then
+ builtin compgen -W 'prj pkg' -- "${cmdline[2]}"
+ fi
+ if ((count == 3)) ; then
+ builtin compgen -W "$(command cat ~/.osc.projects)" -- "${cmdline[3]}"
+ fi
+ if ((count == 4)) && test "${cmdline[2]}" = pkg ; then
+ builtin compgen -W "$(command osc ls "${cmdline[3]}")" -- "${cmdline[4]}"
+ fi
+ if ((count == 5)) ; then
+ builtin compgen -W '--edit -e' -- "${cmdline[5]}"
+ fi
+ ;;
+wipebinaries)
+ if ((count == 1)) ; then
+ builtin compgen -W 'wipebinaries' -- "${cmdline[1]}"
+ fi
+ if ((count == 2)) ; then
+ builtin compgen -W "$(command cat ~/.osc.projects)" -- "${cmdline[2]}"
+ fi
+ if ((count == 3)) ; then
+ builtin compgen -W "$(command osc ls "${cmdline[2]}")" -- "${cmdline[3]}"
+ fi
+ if ((count == 4)) ; then
+ builtin compgen -W "--expansion --broken --build-failed --build-disabled" -- "${cmdline[4]}"
+ fi
+ ;;
+help)
+ if ((count == 1)) ; then
+ builtin compgen -W 'help' -- "${cmdline[1]}"
+ fi
+ ((count == 2)) && builtin compgen -W "$(builtin echo ${osccmds[@]})" -- "${cmdline[2]}"
+ ;;
+*)
+ ((count == 1)) && builtin compgen -W "$(builtin echo ${osccmds[@]})" -- "${cmdline[1]}"
+esac
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.119/NEWS new/osc-0.120/NEWS
--- old/osc-0.119/NEWS 2009-06-15 17:42:54.000000000 +0200
+++ new/osc-0.120/NEWS 2009-06-18 19:14:20.000000000 +0200
@@ -1,3 +1,12 @@
+0.120:
+ - support "setlinkrev" for whole projects
+ - add "setlinkrev --unset" for removing revision references
+ - add "osc request list -t <type>" to list only submit, delete or develchange requests
+ - add shell completion scripts
+ - fix support of listing requests with multiple actions
+ - "osc maintainer" is following to the development project / package now
+ - "osc maintainer" list maintainer and bugowner roles now
+
0.119:
- Support new request types
- "submitreq" command has a new syntax (incompatible !)
Files old/osc-0.119/osc/babysitter.pyc and new/osc-0.120/osc/babysitter.pyc differ
Files old/osc-0.119/osc/build.pyc and new/osc-0.120/osc/build.pyc differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.119/osc/cmdln.py new/osc-0.120/osc/cmdln.py
--- old/osc-0.119/osc/cmdln.py 2009-06-03 09:26:02.000000000 +0200
+++ new/osc-0.120/osc/cmdln.py 2009-06-18 19:14:20.000000000 +0200
@@ -117,6 +117,24 @@
return f
return decorate
+MAN_REPLACES = [
+ (re.compile(r'(^|[ \t])--([^/ \t-]*)-([^/ \t-]*)-([^/ \t-]*)($|[ \t=])'), r'\1\-\-\2\-\3\-\4\5'),
+ (re.compile(r'(^|[ \t])-([^/ \t-]*)-([^/ \t-]*)-([^/ \t-]*)($|[ \t=])'), r'\1\-\2\-\3\-\4\5'),
+ (re.compile(r'(^|[ \t])--([^/ \t-]*)-([^/ \t-]*)($|[ \t=])'), r'\1\-\-\2\-\3\4'),
+ (re.compile(r'(^|[ \t])-([^/ \t-]*)-([^/ \t-]*)($|[ \t=])'), r'\1\-\2\-\3\4'),
+ (re.compile(r'(^|[ \t])--([^/ \t-]*)($|[ \t=])'), r'\1\-\-\2\3'),
+ (re.compile(r'(^|[ \t])-([^/ \t-]*)($|[ \t=])'), r'\1\-\2\3'),
+ ]
+
+def man_escape(text):
+ '''
+ Escapes text to be included in man page.
+
+ For now it only escapes dashes in command line options.
+ '''
+ for repl in MAN_REPLACES:
+ text = repl[0].sub(repl[1], text)
+ return text
class RawCmdln(cmd.Cmd):
"""An improved (on cmd.Cmd) framework for building multi-subcommand
@@ -561,12 +579,12 @@
for line in text.splitlines(False):
if line[:8] == ' ' * 8:
line = line[8:]
- lines.append(line)
+ lines.append(man_escape(line))
self.stdout.write('.TP\n\\fB%s\\fR\n%s\n' % (command, '\n'.join(lines)))
self.stdout.write(self.man_options_header)
- self.stdout.write(self._help_preprocess('${option_list}', None))
+ self.stdout.write(man_escape(self._help_preprocess('${option_list}', None)))
self.stdout.write(self.man_footer)
Files old/osc-0.119/osc/cmdln.pyc and new/osc-0.120/osc/cmdln.pyc differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.119/osc/commandline.py new/osc-0.120/osc/commandline.py
--- old/osc-0.119/osc/commandline.py 2009-06-15 17:42:54.000000000 +0200
+++ new/osc-0.120/osc/commandline.py 2009-06-18 19:14:20.000000000 +0200
@@ -13,7 +13,7 @@
MAN_HEADER = r""".TH %(ucname)s "1" "%(date)s" "%(name)s %(version)s" "User Commands"
.SH NAME
-%(name)s \- OpenSUSE build service command-line tool.
+%(name)s \- openSUSE build service command-line tool.
.SH SYNOPSIS
.B %(name)s
[\fIGLOBALOPTS\fR] \fISUBCOMMAND \fR[\fIOPTS\fR] [\fIARGS\fR...]
@@ -21,7 +21,7 @@
.B %(name)s
\fIhelp SUBCOMMAND\fR
.SH DESCRIPTION
-OpenSUSE build service command\-line tool.
+openSUSE build service command-line tool.
"""
MAN_FOOTER = r"""
.SH "SEE ALSO"
@@ -42,7 +42,7 @@
"""Usage: osc [GLOBALOPTS] SUBCOMMAND [OPTS] [ARGS...]
or: osc help SUBCOMMAND
- OpenSUSE build service command-line tool.
+ openSUSE build service command-line tool.
Type 'osc help <subcommand>' for help on a specific subcommand.
${command_list}
@@ -656,6 +656,8 @@
help='output the diff in the unified diff format')
@cmdln.option('-m', '--message', metavar='TEXT',
help='specify message TEXT')
+ @cmdln.option('-t', '--type', metavar='TEXT',
+ help='limit to requests which contain a given action type (submit/delete/develchange)')
@cmdln.option('-s', '--state', default='new',
help='only list requests in one of the comma separated given states [default=new]')
@cmdln.option('-b', '--brief', action='store_true', default=False,
@@ -700,7 +702,7 @@
usage:
- osc request list [-M] [PRJ [PKG]]
+ osc request list [-M] [-t type] [PRJ [PKG]]
osc request log ID
osc request show [-d] [-b] ID
osc request accept [-m TEXT] ID
@@ -760,7 +762,7 @@
who = conf.get_apiurl_usr(apiurl)
results = get_request_list(apiurl,
- project, package, who, state_list)
+ project, package, who, state_list, opts.type)
results.sort(reverse=True)
@@ -836,6 +838,8 @@
@cmdln.option('-r', '--revision', metavar='rev',
help='use the specified revision.')
+ @cmdln.option('-u', '--unset', action='store_true',
+ help='remove revision in link, it will point always to latest revision')
def do_setlinkrev(self, subcmd, opts, *args):
"""${cmd_name}: Updates a revision number in a source link.
@@ -844,12 +848,13 @@
usage:
osc setlinkrev
- osc setlinkrev PROJECT PACKAGE
+ osc setlinkrev PROJECT [PACKAGE]
${cmd_option_list}
"""
args = slash_split(args)
apiurl = conf.config['apiurl']
+ package = None
if not args or len(args) == 0:
p = findpacs(os.curdir)[0]
project = p.prjname
@@ -860,18 +865,30 @@
elif len(args) == 2:
project = args[0]
package = args[1]
+ elif len(args) == 1:
+ project = args[0]
else:
raise oscerr.WrongArgs('Incorrect number of arguments.\n\n' \
+ self.get_cmd_help('setlinkrev'))
- rev, dummy = parseRevisionOption(opts.revision)
- set_link_rev(apiurl, project, package, rev)
+ if package:
+ packages = [ package ]
+ else:
+ packages = meta_get_packagelist(apiurl, project)
+
+ for p in packages:
+ print "setting revision for package", p
+ if opts.unset:
+ rev=-1
+ else:
+ rev, dummy = parseRevisionOption(opts.revision)
+ set_link_rev(apiurl, project, p, rev)
- @cmdln.option('-c', '--current', action='store_true',
- help='link fixed against current revision.')
@cmdln.option('-C', '--cicount', choices=['add', 'copy', 'local'],
help='cicount attribute in the link, known values are add, copy, and local, default in buildservice is currently add.')
+ @cmdln.option('-c', '--current', action='store_true',
+ help='link fixed against current revision.')
@cmdln.option('-r', '--revision', metavar='rev',
help='link the specified revision.')
@cmdln.option('-f', '--force', action='store_true',
@@ -2101,8 +2118,8 @@
which is directly readable by the build script. It contains RPM macros
and BuildRequires expansions, for example.
- The arguments PLATFORM and ARCH can be taken first two columns in the
- 'osc repos' output.
+ The arguments PLATFORM and ARCH can be taken from the first two columns
+ of the 'osc repos' output.
${cmd_usage}
${cmd_option_list}
@@ -2919,8 +2936,13 @@
sys.stdout.write(out)
+ @cmdln.option('-b', '--bugowner', action='store_true',
+ help='Show only the bugowner')
@cmdln.option('-e', '--email', action='store_true',
help='show email addresses instead of user names')
+ @cmdln.option('--nodevelproject', action='store_true',
+ help='do not follow a defined devel project ' \
+ '(primary project where a package is developed)')
@cmdln.option('-v', '--verbose', action='store_true',
help='show more information')
@cmdln.option('-D', '--devel-project', metavar='devel_project',
@@ -2942,48 +2964,70 @@
${cmd_option_list}
"""
+ maintainers = []
pac = None
+ tree = None
+ roles = [ 'bugowner', 'maintainer' ]
+ if opts.bugowner:
+ roles = [ 'bugowner' ]
+
if len(args) == 1:
- m = show_project_meta(conf.config['apiurl'], args[0])
prj = args[0]
+ m = show_project_meta(conf.config['apiurl'], prj)
+ tree = ET.parse(StringIO(''.join(m)))
elif len(args) == 2:
- m = show_package_meta(conf.config['apiurl'], args[0], args[1])
prj = args[0]
pac = args[1]
+ m = show_package_meta(conf.config['apiurl'], prj, pac)
+ tree = ET.parse(StringIO(''.join(m)))
+ if not opts.nodevelproject and not opts.delete and not opts.add:
+ while tree.findall('devel'):
+ d = tree.find('devel')
+ prj = d.get('project', prj)
+ pac = d.get('package', pac)
+ print "Following to the development space:", prj, "/", pac
+ m = show_package_meta(conf.config['apiurl'], prj, pac)
+ tree = ET.parse(StringIO(''.join(m)))
+ if not tree.findall('person'):
+ print "No dedicated persons in package defined, showing the project persons !"
+ m = show_project_meta(conf.config['apiurl'], prj)
+ tree = ET.parse(StringIO(''.join(m)))
else:
raise oscerr.WrongArgs('I need at least one argument.')
- maintainers = []
-
- tree = ET.parse(StringIO(''.join(m)))
- for person in tree.findall('person'):
- maintainers.append(person.get('userid'))
-
- if opts.email:
- emails = []
- for maintainer in maintainers:
- user = get_user_data(conf.config['apiurl'], maintainer, 'email')
- if user != None:
- emails.append(''.join(user))
- print ', '.join(emails)
- elif opts.verbose:
- userdata = []
- for maintainer in maintainers:
- user = get_user_data(conf.config['apiurl'], maintainer, 'realname', 'login', 'email')
- if user != None:
- for itm in user:
- userdata.append(itm)
- for row in build_table(3, userdata, ['realname', 'userid', 'email\n']):
- print row
- elif opts.add:
+ if opts.add:
addMaintainer(conf.config['apiurl'], prj, pac, opts.add)
elif opts.delete:
delMaintainer(conf.config['apiurl'], prj, pac, opts.delete)
elif opts.devel_project:
- addDevelProject(conf.config['apiurl'], prj, pac, opts.devel_project)
-
- else:
- print ', '.join(maintainers)
+ setDevelProject(conf.config['apiurl'], prj, pac, opts.devel_project)
+ else:
+ # showing the maintainers
+ for role in roles:
+ print ""
+ print role, ":"
+ for person in tree.findall('person'):
+ if person.get('role') == role:
+ maintainers.append(person.get('userid'))
+
+ if opts.email:
+ emails = []
+ for maintainer in maintainers:
+ user = get_user_data(conf.config['apiurl'], maintainer, 'email')
+ if user != None:
+ emails.append(''.join(user))
+ print ', '.join(emails)
+ elif opts.verbose:
+ userdata = []
+ for maintainer in maintainers:
+ user = get_user_data(conf.config['apiurl'], maintainer, 'realname', 'login', 'email')
+ if user != None:
+ for itm in user:
+ userdata.append(itm)
+ for row in build_table(3, userdata, ['realname', 'userid', 'email\n']):
+ print row
+ else:
+ print ', '.join(maintainers)
@cmdln.option('-r', '--revision', metavar='rev',
Files old/osc-0.119/osc/commandline.pyc and new/osc-0.120/osc/commandline.pyc differ
Files old/osc-0.119/osc/conf.pyc and new/osc-0.120/osc/conf.pyc differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.119/osc/core.py new/osc-0.120/osc/core.py
--- old/osc-0.119/osc/core.py 2009-06-16 14:22:00.000000000 +0200
+++ new/osc-0.120/osc/core.py 2009-06-18 21:58:02.000000000 +0200
@@ -5,7 +5,7 @@
# and distributed under the terms of the GNU General Public Licence,
# either version 2, or (at your option) any later version.
-__version__ = '0.119'
+__version__ = '0.120'
# __store_version__ is to be incremented when the format of the working copy
# "store" changes in an incompatible way. Please add any needed migration
# functionality to check_store_version().
@@ -80,8 +80,8 @@
<arch>x86_64</arch>
<arch>i586</arch>
</repository>
- <repository name="Fedora_10">
- <path project="Fedora:10" repository="standard" />
+ <repository name="Fedora_11">
+ <path project="Fedora:11" repository="standard" />
<arch>x86_64</arch>
<arch>i586</arch>
</repository>
@@ -1270,13 +1270,16 @@
for action in actions:
type = action.get('type', 'submit')
try:
- n = action.find('source')
- src_prj = n.get('project')
- src_pkg = n.get('package')
- src_rev = n.get('rev', None)
- n = action.find('target')
- dst_prj = n.get('project')
- dst_pkg = n.get('package')
+ src_prj = src_pkg = src_rev = dst_prj = dst_pkg = None
+ if action.findall('source'):
+ n = action.find('source')
+ src_prj = n.get('project', None)
+ src_pkg = n.get('package', None)
+ src_rev = n.get('rev', None)
+ if action.findall('target'):
+ n = action.find('target')
+ dst_prj = n.get('project', None)
+ dst_pkg = n.get('package', None)
self.add_action(type, src_prj, src_pkg, src_rev, dst_prj, dst_pkg)
except:
msg = 'invalid request format:\n%s' % ET.tostring(root)
@@ -1317,19 +1320,22 @@
)
def list_view(self):
- dst = "%s/%s" % (self.actions[0].dst_project, self.actions[0].dst_package)
- if self.actions[0].src_package == self.actions[0].dst_package:
- dst = self.actions[0].dst_project
+ ret = '%6d State:%-7s Creator:%-12s When:%-12s' % (self.reqid, self.state.name, self.state.who, self.state.when)
+
+ for a in self.actions:
+ dst = "%s/%s" % (a.dst_project, a.dst_package)
+ if a.src_package == a.dst_package:
+ dst = a.dst_project
+
+ ret += '\n %s: %-50s -> %-20s ' % \
+ (a.type,
+ "%s/%s" % (a.src_project, a.src_package), dst)
- desc = ""
if self.descr:
- desc = "\n %s" % (repr(self.descr))
+ ret += "\n Comment: %s" % (repr(self.descr))
+ ret += "\n"
- return '%6d %-7s %-12s %-50s -> %-20s %s' % \
- (self.reqid,
- self.state.name, "(%s)" % self.state.who,
- "%s/%s" % (self.actions[0].src_project, self.actions[0].src_package),
- dst, desc)
+ return ret
def __cmp__(self, other):
return cmp(self.reqid, other.reqid)
@@ -2017,7 +2023,7 @@
f = os.fdopen(fd, 'w')
if template != '':
f.write(template)
- f.write('\n')
+ f.write('\n')
f.write(delim)
f.close()
mtime_orig = os.stat(filename).st_mtime
@@ -2150,7 +2156,7 @@
return f.read()
-def get_request_list(apiurl, project, package, req_who='', req_state=('new',) ):
+def get_request_list(apiurl, project, package, req_who='', req_state=('new',), req_type=None ):
requests = []
matches = []
@@ -2173,6 +2179,9 @@
if package:
if len(m): m += '%20and%20'
m += '%s/target/@package=\'%s\'' % (what, quote_plus(package))
+ if req_type:
+ if len(m): m += '%20and%20'
+ m += '%s/@type=\'%s\'' % (what, quote_plus(req_type))
matches.append(m)
else:
@@ -2889,7 +2898,7 @@
# code can be missing when package is too new:
return {}
- if rmap['status'] in ['expansion error', 'broken']:
+ if rmap['status'] in ['expansion error', 'broken', 'blocked']:
rmap['status'] += ': ' + statusnode.find('details').text
if rmap['status'] == 'failed':
@@ -3466,13 +3475,16 @@
e.osc_msg = 'Unable to get _link file in package \'%s\' for project \'%s\'' % (package, project)
raise
+ # set revision element
if not revision:
src_project = root.attrib['project']
src_package = root.attrib['package']
- revision = show_upstream_rev(apiurl, src_project, src_package);
+ root.attrib['rev'] = show_upstream_rev(apiurl, src_project, src_package);
+ elif revision == -1:
+ del root.attrib['rev']
+ else:
+ root.attrib['rev'] = revision
- # set revision element
- root.attrib['rev'] = revision
l = ET.tostring(root)
# upload _link file again
http_PUT(url, data=l)
@@ -3694,14 +3706,10 @@
else:
print "an error occured"
-def addDevelProject(apiurl, prj, pac, dprj):
- """ add a <devel project="..."> element to package metadata"""
- path = quote_plus(prj),
- kind = 'prj'
- if pac:
- path = path + (quote_plus(pac),)
- kind = 'pkg'
- data = meta_exists(metatype=kind,
+def setDevelProject(apiurl, prj, pac, dprj, dpkg=None):
+ """ set the <devel project="..."> element to package metadata"""
+ path = (quote_plus(prj),) + (quote_plus(pac),)
+ data = meta_exists(metatype='pkg',
path_args=path,
template_args=None,
create_new=False)
@@ -3711,8 +3719,15 @@
if not tree.find('devel') != None:
ET.SubElement(tree, 'devel')
elem = tree.find('devel')
- elem.attrib['project'] = dprj
- edit_meta(metatype=kind,
+ if dprj:
+ elem.attrib['project'] = dprj
+ else:
+ del elem.attrib['project']
+ if dpkg:
+ elem.attrib['package'] = dpkg
+ else:
+ del elem.attrib['package']
+ edit_meta(metatype='pkg',
path_args=path,
data=ET.tostring(tree))
else:
Files old/osc-0.119/osc/core.pyc and new/osc-0.120/osc/core.pyc differ
Files old/osc-0.119/osc/.core.py.swp and new/osc-0.120/osc/.core.py.swp differ
Files old/osc-0.119/osc/fetch.pyc and new/osc-0.120/osc/fetch.pyc differ
Files old/osc-0.119/osc/__init__.pyc and new/osc-0.120/osc/__init__.pyc differ
Files old/osc-0.119/osc/meter.pyc and new/osc-0.120/osc/meter.pyc differ
Files old/osc-0.119/osc/OscConfigParser.pyc and new/osc-0.120/osc/OscConfigParser.pyc differ
Files old/osc-0.119/osc/oscerr.pyc and new/osc-0.120/osc/oscerr.pyc differ
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.119/svn-commit.tmp new/osc-0.120/svn-commit.tmp
--- old/osc-0.119/svn-commit.tmp 1970-01-01 01:00:00.000000000 +0100
+++ new/osc-0.120/svn-commit.tmp 2009-04-23 10:59:31.000000000 +0200
@@ -0,0 +1,5 @@
+
+-- Diese und die folgenden Zeilen werden ignoriert --
+
+M osc/commandline.py
+M NEWS
++++++ osc.dsc ++++++
--- /var/tmp/diff_new_pack.lv1980/_old 2009-06-20 05:12:32.000000000 +0200
+++ /var/tmp/diff_new_pack.lv1980/_new 2009-06-20 05:12:32.000000000 +0200
@@ -1,6 +1,6 @@
Format: 1.0
Source: osc
-Version: 0.119-1
+Version: 0.120-1
Binary: osc
Maintainer: Adrian Schroeter
Architecture: any
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org