mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-11 16:36:14 +01:00
fix "osc add some_git_url", using now official source service instead of unknown git_pull
This commit is contained in:
parent
e5333f0b23
commit
79656a45e1
@ -3044,7 +3044,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
|
||||
# Do some magic here, when adding a url. We want that the server to download the tar ball and to verify it
|
||||
for arg in parseargs(args):
|
||||
if arg.startswith('http://') or arg.startswith('https://') or arg.startswith('ftp://'):
|
||||
if arg.startswith('http://') or arg.startswith('https://') or arg.startswith('ftp://') or arg.startswith('git://'):
|
||||
if arg.endswith('.git'):
|
||||
addGitSource(arg)
|
||||
else:
|
||||
|
12
osc/core.py
12
osc/core.py
@ -316,8 +316,17 @@ class Serviceinfo:
|
||||
|
||||
def addGitUrl(self, serviceinfo_node, url_string):
|
||||
r = serviceinfo_node
|
||||
s = ET.Element( "service", name="git_pull" )
|
||||
s = ET.Element( "service", name="tar_scm" )
|
||||
ET.SubElement(s, "param", name="url").text = url_string
|
||||
ET.SubElement(s, "param", name="scm").text = "git"
|
||||
r.append( s )
|
||||
return r
|
||||
|
||||
def addRecompressTar(self, serviceinfo_node):
|
||||
r = serviceinfo_node
|
||||
s = ET.Element( "service", name="recompress" )
|
||||
ET.SubElement(s, "param", name="file").text = "*.tar"
|
||||
ET.SubElement(s, "param", name="compression").text = "bz2"
|
||||
r.append( s )
|
||||
return r
|
||||
|
||||
@ -5618,6 +5627,7 @@ def addGitSource(url):
|
||||
stripETxml( services )
|
||||
si = Serviceinfo()
|
||||
s = si.addGitUrl(services, url)
|
||||
s = si.addRecompressTar(services)
|
||||
si.read(s)
|
||||
|
||||
# for pretty output
|
||||
|
Loading…
Reference in New Issue
Block a user