diff --git a/NEWS b/NEWS index 779d625b..84f90a60 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ - 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 - support for "unresolvable" state of OBS 2.0 + - osc branch reads project/package in package directory 0.126 - added VM autosetup to osc. This requires appropriate OBS version and build script version. diff --git a/osc/commandline.py b/osc/commandline.py index bc031a82..d5f0e9e1 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -1677,6 +1677,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. if nothing else specified. usage: + osc branch osc branch SOURCEPROJECT SOURCEPACKAGE osc branch SOURCEPROJECT SOURCEPACKAGE TARGETPROJECT osc branch SOURCEPROJECT SOURCEPACKAGE TARGETPROJECT TARGETPACKAGE @@ -1693,9 +1694,13 @@ Please submit there instead, or use --nodevelproject to force direct submission. print >>sys.stderr, 'defaulting to %s/%s' % (conf.config['getpac_default_project'], args[0]) # python has no args.unshift ??? 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: raise oscerr.WrongArgs('Wrong number of arguments.') + expected = 'home:%s:branches:%s' % (conf.config['user'], args[0]) if len(args) >= 3: expected = tproject = args[2]