mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 01:16:14 +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:
|
while inside a project directory:
|
||||||
osc co PACKAGE # check out PACKAGE from project
|
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}
|
${cmd_option_list}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -2865,21 +2868,35 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
else:
|
else:
|
||||||
expand_link = True
|
expand_link = True
|
||||||
|
|
||||||
args = slash_split(args)
|
# FIXME: this should go into ~jw/patches/osc/osc.proj_pack_20101201.diff
|
||||||
project = package = filename = None
|
# 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]
|
project = project_dir = args[0]
|
||||||
package = args[1]
|
package = args[1]
|
||||||
filename = args[2]
|
filename = args[2]
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if args and len(args) == 1:
|
if args and len(args) == 1:
|
||||||
localdir = os.getcwd()
|
localdir = os.getcwd()
|
||||||
if is_project_dir(localdir):
|
if is_project_dir(localdir):
|
||||||
project = store_read_project(localdir)
|
project = store_read_project(localdir)
|
||||||
project_dir = localdir
|
project_dir = localdir
|
||||||
package = args[0]
|
package = args[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user