We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f31669f + 97c7053 commit fcf69f3Copy full SHA for fcf69f3
osc/obs_api/scmsync_obsinfo.py
@@ -1,3 +1,4 @@
1
+import re
2
import typing
3
import urllib.parse
4
@@ -71,11 +72,13 @@ def scm_url(self):
71
72
73
if self.subdir:
74
query["subdir"] = self.subdir
75
+ if self.revision and not re.match(r"^[0-9a-fA-F]{40,}$", self.revision):
76
+ query["trackingbranch"] = self.revision
77
78
parsed_url[4] = urllib.parse.urlencode(query)
79
- if self.revision:
80
+ if self.commit:
81
# set revision as fragment
- parsed_url[5] = self.revision
82
+ parsed_url[5] = self.commit
83
84
return urllib.parse.urlunparse(parsed_url)
0 commit comments