1
0
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:
Adrian Schröter 2011-01-26 17:29:43 +01:00
parent e5333f0b23
commit 79656a45e1
2 changed files with 12 additions and 2 deletions

View File

@ -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:

View File

@ -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