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

Help text of co -s was indentical to co -S, fixed to say local instead of server.

Fixed -s to chdir into the project for the sake of /usr/lib/obs/service/verify_file
This commit is contained in:
Juergen Weigert 2011-02-02 17:11:14 +01:00
parent d174599b8d
commit 0fd0ff2685
2 changed files with 6 additions and 3 deletions

View File

@ -2349,7 +2349,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
help='do not follow a defined devel project ' \
'(primary project where a package is developed)')
@cmdln.option('-c', '--checkout', action='store_true',
help='Checkout branched package afterwards ' \
help='Checkout branched package afterwards using "co -e -S"' \
'(\'osc bco\' is a shorthand for this option)' )
@cmdln.option('-f', '--force', default=False, action="store_true",
help='force branch, overwrite target')
@ -2437,7 +2437,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
package = tpackage or args[1]
if opts.checkout:
checkout_package(apiurl, targetprj, package,
checkout_package(apiurl, targetprj, package, server_service_files=True
expand_link=True, prj_dir=targetprj)
if conf.config['verbose']:
print 'Note: You can use "osc delete" or "osc submitpac" when done.\n'
@ -2829,7 +2829,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
help='place PACKAGE folder in the current directory' \
'instead of a PROJECT/PACKAGE directory')
@cmdln.option('-s', '--source-service-files', action='store_true',
help='Use server side generated sources instead of local generation.' )
help='Run source services.' )
@cmdln.option('-S', '--server-side-source-service-files', action='store_true',
help='Use server side generated sources instead of local generation.' )
@cmdln.option('-l', '--limit-size', metavar='limit_size',

View File

@ -2016,12 +2016,15 @@ rev: %s
print 'At revision %s.' % self.rev
def run_source_services(self, mode=""):
curdir = os.getcwd()
os.chdir(self.absdir) # e.g. /usr/lib/obs/service/verify_file fails if not inside the project dir.
if self.filenamelist.count('_service') or self.filenamelist_unvers.count('_service'):
service = ET.parse(os.path.join(self.absdir, '_service')).getroot()
si = Serviceinfo()
si.read(service)
si.readProjectFile(self.apiurl, self.prjname)
si.execute(self.absdir, mode)
os.chdir(curdir)
def prepare_filelist(self):
"""Prepare a list of files, which will be processed by process_filelist