1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-14 01:26:23 +01:00

osc branch reads project/package in package directory

The osc branch (withouth arguments) is able to read the project/package
from current package dir and use it.
This commit is contained in:
Michal Vyskocil 2010-04-27 12:23:03 +02:00
parent d0659fb0f4
commit 6e388a266a
2 changed files with 6 additions and 0 deletions

1
NEWS
View File

@ -2,6 +2,7 @@
- add size limit mode, files can be ignored on checkout or update given a certain size limit. - add size limit mode, files can be ignored on checkout or update given a certain size limit.
- --csv/--format options for results command - using format user can explicitly specify what he wants print - --csv/--format options for results command - using format user can explicitly specify what he wants print
- support for "unresolvable" state of OBS 2.0 - support for "unresolvable" state of OBS 2.0
- osc branch reads project/package in package directory
0.126 0.126
- added VM autosetup to osc. This requires appropriate OBS version and build script version. - added VM autosetup to osc. This requires appropriate OBS version and build script version.

View File

@ -1677,6 +1677,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
if nothing else specified. if nothing else specified.
usage: usage:
osc branch
osc branch SOURCEPROJECT SOURCEPACKAGE osc branch SOURCEPROJECT SOURCEPACKAGE
osc branch SOURCEPROJECT SOURCEPACKAGE TARGETPROJECT osc branch SOURCEPROJECT SOURCEPACKAGE TARGETPROJECT
osc branch SOURCEPROJECT SOURCEPACKAGE TARGETPROJECT TARGETPACKAGE osc branch SOURCEPROJECT SOURCEPACKAGE TARGETPROJECT TARGETPACKAGE
@ -1694,8 +1695,12 @@ Please submit there instead, or use --nodevelproject to force direct submission.
# python has no args.unshift ??? # python has no args.unshift ???
args = [ conf.config['getpac_default_project'] , args[0] ] args = [ conf.config['getpac_default_project'] , args[0] ]
if len(args) == 0 and is_package_dir('.'):
args = (store_read_project('.'), store_read_package('.'))
if len(args) < 2 or len(args) > 4: if len(args) < 2 or len(args) > 4:
raise oscerr.WrongArgs('Wrong number of arguments.') raise oscerr.WrongArgs('Wrong number of arguments.')
expected = 'home:%s:branches:%s' % (conf.config['user'], args[0]) expected = 'home:%s:branches:%s' % (conf.config['user'], args[0])
if len(args) >= 3: if len(args) >= 3:
expected = tproject = args[2] expected = tproject = args[2]