Issue #128: Please provide "download at revision" feature in mercurial repository (conservancy/kallithea)
Alexander Nikitin
issues-reply at bitbucket.org
Thu Apr 30 12:33:22 EDT 2015
New issue 128: Please provide "download at revision" feature in mercurial repository
https://bitbucket.org/conservancy/kallithea/issue/128/please-provide-download-at-revision
Alexander Nikitin:
Hello Kallithea/RhodeCode/Python gurus!
I'm in the process of transferring my RhodeCode 1.7.1 installation to Kallithea 0.2.1 and have a small enhancement request.
In RhodeCode 1.7.1 I "patched" _get_download_links method (in summary.py) to be able to download mercurial repo (in zip format) at specified revision:
def _get_download_links(self, repo):
download_l = []
branches_group = ([], _("Branches"))
tags_group = ([], _("Tags"))
////////////////////////////////////////////////////// patch start /////////////////////////////////////////
revisions_group = ([], _("Revisions"))
new_collection = reversed(list(c.rhodecode_repo))
for cs in new_collection:
revisions_group[0].append(( cs.raw_id, h.show_id(cs) ),)
download_l.append(revisions_group)
////////////////////////////////////////////////////////// patch end /////////////////////////////////////////
for name, chs in c.rhodecode_repo.branches.items():
#chs = chs.split(':')[-1]
branches_group[0].append((chs, name),)
download_l.append(branches_group)
for name, chs in c.rhodecode_repo.tags.items():
#chs = chs.split(':')[-1]
tags_group[0].append((chs, name),)
download_l.append(tags_group)
return download_l
I've tried to do the same trick in Kallithea 0.2.1 but it looks like that Branches/Tags/etc "download code" has moved somewhere in home.py (repo_refs_data method) which I failed to patch due to my zero skills in python.
So is there are any chance to make it work in Kallithea 0.2.1 ?
PS Sorry for my weird code above - I'm C++/Java coder - not Python :)
Thanks in advance !
More information about the kallithea-general
mailing list