mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-24 17:16:12 +01:00
osc checkout '%{disturl}' is now supported.
This commit is contained in:
parent
818eb05126
commit
9228cebdc5
@ -2857,6 +2857,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
while inside a project directory:
|
||||
osc co PACKAGE # check out PACKAGE from project
|
||||
|
||||
with the result of rpm -q --qf '%{disturl}n' PACKAGE
|
||||
osc co obs://API/PROJECT/PLATFORM/REVISION-PACKAGE
|
||||
|
||||
${cmd_option_list}
|
||||
"""
|
||||
|
||||
@ -2865,21 +2868,35 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
else:
|
||||
expand_link = True
|
||||
|
||||
args = slash_split(args)
|
||||
project = package = filename = None
|
||||
# FIXME: this should go into ~jw/patches/osc/osc.proj_pack_20101201.diff
|
||||
# to be available to all subcommands via @cmdline.prep(proj_pack)
|
||||
# obs://build.opensuse.org/openSUSE:11.3/standard/fc6c25e795a89503e99d59da5dc94a79-screen
|
||||
m = re.match(r"obs://([^/]+)/(\S+)/([^/]+)/([A-Fa-f\d]+)\-(\S+)", args[0])
|
||||
if m and len(args) == 1:
|
||||
apiurl = "https://" + m.group(1)
|
||||
project = project_dir = m.group(2)
|
||||
# platform = m.group(3)
|
||||
opts.revision = m.group(4)
|
||||
package = m.group(5)
|
||||
apiurl = re.sub('/build\.', '/api.', apiurl)
|
||||
filename = None
|
||||
|
||||
apiurl = self.get_api_url()
|
||||
else:
|
||||
args = slash_split(args)
|
||||
project = package = filename = None
|
||||
|
||||
try:
|
||||
apiurl = self.get_api_url()
|
||||
|
||||
try:
|
||||
project = project_dir = args[0]
|
||||
package = args[1]
|
||||
filename = args[2]
|
||||
except:
|
||||
except:
|
||||
pass
|
||||
|
||||
if args and len(args) == 1:
|
||||
localdir = os.getcwd()
|
||||
if is_project_dir(localdir):
|
||||
if args and len(args) == 1:
|
||||
localdir = os.getcwd()
|
||||
if is_project_dir(localdir):
|
||||
project = store_read_project(localdir)
|
||||
project_dir = localdir
|
||||
package = args[0]
|
||||
|
Loading…
Reference in New Issue
Block a user