summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2019-08-13 19:57:49 +0200
committerGuido Günther <agx@sigxcpu.org>2019-08-13 19:57:49 +0200
commitb8883494d26af72a3745b32009ad9587b7a137ed (patch)
treed8a5a6c11bdc85b9c1a5bb214a8a5bef291515bb
parent78f8759a3d8e52e63aa3ec4dc2212989ae836494 (diff)
gbp-clone: Support salsa: pseudo urls
-rw-r--r--docs/manpages/gbp-clone.xml7
-rwxr-xr-xgbp/scripts/clone.py4
2 files changed, 10 insertions, 1 deletions
diff --git a/docs/manpages/gbp-clone.xml b/docs/manpages/gbp-clone.xml
index 11a93434..2f08d66a 100644
--- a/docs/manpages/gbp-clone.xml
+++ b/docs/manpages/gbp-clone.xml
@@ -175,8 +175,13 @@
Clone from the <emphasis>Git-Vcs</emphasis> URL of a package:
</para>
<screen>
- &gbp-clone; vcsgit:libvirt</screen>
+ &gbp-clone; vcsgit:libvirt</screen>
<para>
+ Clone a repository from salsa (Debian's code hosting):
+ </para>
+ <screen>
+ &gbp-clone; salsa:agx/git-buildpackage</screen>
+ <para>
Clone from a github repository:
</para>
<screen>
diff --git a/gbp/scripts/clone.py b/gbp/scripts/clone.py
index edc991ed..b17241b6 100755
--- a/gbp/scripts/clone.py
+++ b/gbp/scripts/clone.py
@@ -81,6 +81,8 @@ def repo_to_url(repo):
"""
>>> repo_to_url("https://foo.example.com")
'https://foo.example.com'
+ >>> repo_to_url("salsa:agx/git-buildpackage")
+ 'https://salsa.debian.org/agx/git-buildpackage.git'
>>> repo_to_url("github:agx/git-buildpackage")
'https://github.com/agx/git-buildpackage.git'
"""
@@ -90,6 +92,8 @@ def repo_to_url(repo):
else:
proto, path = parts
+ if proto == 'salsa':
+ return 'https://salsa.debian.org/%s.git' % path
if proto == 'github':
return 'https://github.com/%s.git' % path
elif proto in ['vcsgit', 'vcs-git']: