Show More
@@ -88,6 +88,7 b' class ChangesetController(BaseController' | |||
|
88 | 88 | def raw_changeset(self,revision): |
|
89 | 89 | |
|
90 | 90 | hg_model = HgModel() |
|
91 | method = request.GET.get('diff','show') | |
|
91 | 92 | try: |
|
92 | 93 | c.changeset = hg_model.get_repo(c.repo_name).get_changeset(revision) |
|
93 | 94 | except RepositoryError: |
@@ -125,7 +126,8 b' class ChangesetController(BaseController' | |||
|
125 | 126 | c.changes.append(('changed', node, diff, cs1, cs2)) |
|
126 | 127 | |
|
127 | 128 | response.content_type = 'text/plain' |
|
128 | ||
|
129 | if method == 'download': | |
|
130 | response.content_disposition = 'attachment; filename=%s.patch' % revision | |
|
129 | 131 | parent = True if len(c.changeset.parents) > 0 else False |
|
130 | 132 | c.parent_tmpl = 'Parent %s' % c.changeset.parents[0]._hex if parent else '' |
|
131 | 133 |
@@ -23,6 +23,18 b'' | |||
|
23 | 23 | ${self.breadcrumbs()} |
|
24 | 24 | </div> |
|
25 | 25 | <div class="table"> |
|
26 | <div id="body" class="diffblock"> | |
|
27 | <div class="code-header"> | |
|
28 | <div> | |
|
29 | ${_('Changeset')} - r${c.changeset.revision}:${c.changeset.raw_id} | |
|
30 | » <span>${h.link_to(_('raw diff'), | |
|
31 | h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show'))}</span> | |
|
32 | » <span>${h.link_to(_('download diff'), | |
|
33 | h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download'))}</span> | |
|
34 | </div> | |
|
35 | </div> | |
|
36 | </div> | |
|
37 | ||
|
26 | 38 | <div id="changeset_content"> |
|
27 | 39 | <div class="container"> |
|
28 | 40 | <div class="left"> |
General Comments 0
You need to be logged in to leave comments.
Login now