summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/orm')
-rw-r--r--bitbake/lib/toaster/orm/models.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 1521717482..3c7f6611dc 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -737,6 +737,15 @@ class Layer_Version(models.Model):
737 dirpath = models.CharField(max_length=255, null = True, default = None) # LayerBranch.vcs_subdir 737 dirpath = models.CharField(max_length=255, null = True, default = None) # LayerBranch.vcs_subdir
738 priority = models.IntegerField(default = 0) # if -1, this is a default layer 738 priority = models.IntegerField(default = 0) # if -1, this is a default layer
739 739
740 def get_vcs_link_url(self, file_path="/"):
741 if self.layer.vcs_web_file_base_url is None:
742 return None
743 return self.layer.vcs_web_file_base_url.replace('%path%', file_path).replace('%branch%', self.up_branch.name)
744
745 def get_vcs_link_url_dirpath(self):
746 return self.get_vcs_link_url(self.dirpath)
747
748
740 def __unicode__(self): 749 def __unicode__(self):
741 return "LV " + str(self.layer) + " " + self.commit 750 return "LV " + str(self.layer) + " " + self.commit
742 751