diff --git a/osc/commandline.py b/osc/commandline.py index 6412bfcc..0bc7dc63 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -7868,9 +7868,12 @@ Please submit there instead, or use --nodevelproject to force direct submission. """ args = parseargs(args) - pacs = Package.from_paths(args) - - for p in pacs: + for pdir in args: + store = osc_store.get_store(pdir) + if store.is_package: + p = Package(pdir) + else: + p = Project(pdir, getPackageList=False, wc_check=False) print(p.info()) @cmdln.option('-M', '--multibuild-package', metavar='FLAVOR', action='append', diff --git a/osc/core.py b/osc/core.py index 27d5535a..5dd96de5 100644 --- a/osc/core.py +++ b/osc/core.py @@ -235,6 +235,13 @@ Revision: %s Link info: %s """ +project_info_templ = """\ +Project name: %s +Path: %s +API URL: %s +Source URL: %s +""" + new_pattern_template = """\ diff --git a/osc/obs_scm/project.py b/osc/obs_scm/project.py index 91332be2..0623a712 100644 --- a/osc/obs_scm/project.py +++ b/osc/obs_scm/project.py @@ -242,6 +242,14 @@ class Project: else: return None + def info(self): + from ..core import project_info_templ + from ..core import makeurl + + source_url = makeurl(self.apiurl, ['source', self.name]) + r = project_info_templ % (self.name, self.absdir, self.apiurl, source_url) + return r + def new_package_entry(self, name, state): ET.SubElement(self.pac_root, 'package', name=name, state=state)