##// END OF EJS Templates
vcs: commits, expose refs function to fetch commit refereces such as tags, bookmarks, etc.
marcink -
r2337:58e07bf5 default
parent child Browse files
Show More
@@ -340,11 +340,7 b' def get_repo_changeset(request, apiuser,'
340 _cs_json = cs.__json__()
340 _cs_json = cs.__json__()
341 _cs_json['diff'] = build_commit_data(cs, changes_details)
341 _cs_json['diff'] = build_commit_data(cs, changes_details)
342 if changes_details == 'full':
342 if changes_details == 'full':
343 _cs_json['refs'] = {
343 _cs_json['refs'] = cs._get_refs()
344 'branches': [cs.branch],
345 'bookmarks': getattr(cs, 'bookmarks', []),
346 'tags': cs.tags
347 }
348 return _cs_json
344 return _cs_json
349
345
350
346
@@ -708,6 +708,13 b' class BaseCommit(object):'
708 'branch': self.branch
708 'branch': self.branch
709 }
709 }
710
710
711 def _get_refs(self):
712 return {
713 'branches': [self.branch],
714 'bookmarks': getattr(self, 'bookmarks', []),
715 'tags': self.tags
716 }
717
711 @LazyProperty
718 @LazyProperty
712 def last(self):
719 def last(self):
713 """
720 """
General Comments 0
You need to be logged in to leave comments. Login now