Show More
@@ -1,115 +1,115 b'' | |||
|
1 | 1 | .. _general: |
|
2 | 2 | |
|
3 | 3 | ======================= |
|
4 | 4 | General RhodeCode usage |
|
5 | 5 | ======================= |
|
6 | 6 | |
|
7 | 7 | |
|
8 | 8 | Repository deleting |
|
9 | 9 | ------------------- |
|
10 | 10 | |
|
11 | 11 | Currently when admin/owner deletes a repository, RhodeCode does not physically |
|
12 | 12 | delete a repository from filesystem, it renames it in a special way so it's |
|
13 | 13 | not possible to push,clone or access repository. It's worth a notice that, |
|
14 | 14 | even if someone will be given administrative access to RhodeCode and will |
|
15 | 15 | delete a repository You can easy restore such action by restoring `rm__<date>` |
|
16 | 16 | from the repository name, and internal repository storage (.hg/.git). There |
|
17 | 17 | is also a special command for cleaning such archived repos:: |
|
18 | 18 | |
|
19 | 19 | paster cleanup-repos --older-than=30d production.ini |
|
20 | 20 | |
|
21 | 21 | This command will scan for archived repositories that are older than 30d, |
|
22 | 22 | display them and ask if you want to delete them (there's a --dont-ask flag also) |
|
23 | 23 | If you host big amount of repositories with forks that are constantly deleted |
|
24 | 24 | it's recommended that you run such command via crontab. |
|
25 | 25 | |
|
26 | 26 | Follow current branch in file view |
|
27 | 27 | ---------------------------------- |
|
28 | 28 | |
|
29 | 29 | In file view when this checkbox is checked the << and >> arrows will jump |
|
30 | 30 | to changesets within the same branch currently viewing. So for example |
|
31 | 31 | if someone is viewing files at 'beta' branch and marks `follow current branch` |
|
32 | 32 | checkbox the << and >> buttons will only show him revisions for 'beta' branch |
|
33 | 33 | |
|
34 | 34 | |
|
35 | 35 | Compare view from changelog |
|
36 | 36 | --------------------------- |
|
37 | 37 | |
|
38 | 38 | Checkboxes in compare view allow users to view combined compare view. You can |
|
39 | 39 | only show the range between the first and last checkbox (no cherry pick). |
|
40 | 40 | Clicking more than one checkbox will activate a link in top saying |
|
41 | `Show selected changes <from-rev> -> <to-rev>` clicking this will bring | |
|
41 | `Show selected changesets <from-rev> -> <to-rev>` clicking this will bring | |
|
42 | 42 | compare view. In this view also it's possible to switch to combined compare. |
|
43 | 43 | |
|
44 | 44 | Compare view is also available from the journal on pushes having more than |
|
45 | 45 | one changeset |
|
46 | 46 | |
|
47 | 47 | |
|
48 | 48 | Non changeable repository urls |
|
49 | 49 | ------------------------------ |
|
50 | 50 | |
|
51 | 51 | Due to complicated nature of repository grouping, often urls of repositories |
|
52 | 52 | can change. |
|
53 | 53 | |
|
54 | 54 | example:: |
|
55 | 55 | |
|
56 | 56 | #before |
|
57 | 57 | http://server.com/repo_name |
|
58 | 58 | # after insertion to test_group group the url will be |
|
59 | 59 | http://server.com/test_group/repo_name |
|
60 | 60 | |
|
61 | 61 | This can be an issue for build systems and any other hardcoded scripts, moving |
|
62 | 62 | repository to a group leads to a need for changing external systems. To |
|
63 | 63 | overcome this RhodeCode introduces a non changable replacement url. It's |
|
64 | 64 | simply an repository ID prefixed with `_` above urls are also accessible as:: |
|
65 | 65 | |
|
66 | 66 | http://server.com/_<ID> |
|
67 | 67 | |
|
68 | 68 | Since ID are always the same moving the repository will not affect such url. |
|
69 | 69 | the _<ID> syntax can be used anywhere in the system so urls with repo_name |
|
70 | 70 | for changelogs, files and other can be exchanged with _<ID> syntax. |
|
71 | 71 | |
|
72 | 72 | |
|
73 | 73 | Mailing |
|
74 | 74 | ------- |
|
75 | 75 | |
|
76 | 76 | When administrator will fill up the mailing settings in .ini files |
|
77 | 77 | RhodeCode will send mails on user registration, or when RhodeCode errors occur |
|
78 | 78 | on errors the mails will have a detailed traceback of error. |
|
79 | 79 | |
|
80 | 80 | |
|
81 | 81 | Mails are also sent for code comments. If someone comments on a changeset |
|
82 | 82 | mail is sent to all participants, the person who commited the changeset |
|
83 | 83 | (if present in RhodeCode), and to all people mentioned with @mention system. |
|
84 | 84 | |
|
85 | 85 | |
|
86 | 86 | Trending source files |
|
87 | 87 | --------------------- |
|
88 | 88 | |
|
89 | 89 | Trending source files are calculated based on pre defined dict of known |
|
90 | 90 | types and extensions. If You miss some extension or Would like to scan some |
|
91 | 91 | custom files it's possible to add new types in `LANGUAGES_EXTENSIONS_MAP` dict |
|
92 | 92 | located in `/rhodecode/lib/celerylib/tasks.py` |
|
93 | 93 | |
|
94 | 94 | |
|
95 | 95 | Cloning remote repositories |
|
96 | 96 | --------------------------- |
|
97 | 97 | |
|
98 | 98 | RhodeCode has an ability to clone remote repos from given remote locations. |
|
99 | 99 | Currently it support following options: |
|
100 | 100 | |
|
101 | 101 | - hg -> hg clone |
|
102 | 102 | - svn -> hg clone |
|
103 | 103 | - git -> git clone |
|
104 | 104 | |
|
105 | 105 | |
|
106 | 106 | .. note:: |
|
107 | 107 | |
|
108 | 108 | - *`svn -> hg` cloning requires `hgsubversion` library to be installed.* |
|
109 | 109 | |
|
110 | 110 | If you need to clone repositories that are protected via basic auth, you |
|
111 | 111 | might pass the url with stored credentials inside eg. |
|
112 | 112 | `http://user:passw@remote.server/repo, RhodeCode will try to login and clone |
|
113 | 113 | using given credentials. Please take a note that they will be stored as |
|
114 | 114 | plaintext inside the database. RhodeCode will remove auth info when showing the |
|
115 | 115 | clone url in summary page. |
@@ -1,115 +1,115 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <!DOCTYPE html> |
|
3 | 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
|
4 | 4 | <head> |
|
5 | 5 | <title>${self.title()}</title> |
|
6 | 6 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
7 | 7 | <meta name="robots" content="index, nofollow"/> |
|
8 | 8 | <link rel="icon" href="${h.url('/images/icons/database_gear.png')}" type="image/png" /> |
|
9 | 9 | |
|
10 | 10 | ## CSS ### |
|
11 | 11 | <%def name="css()"> |
|
12 | 12 | <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.rhodecode_version)}" media="screen"/> |
|
13 | 13 | <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css', ver=c.rhodecode_version)}"/> |
|
14 | 14 | <link rel="stylesheet" type="text/css" href="${h.url('/css/contextbar.css', ver=c.rhodecode_version)}"/> |
|
15 | 15 | ## EXTRA FOR CSS |
|
16 | 16 | ${self.css_extra()} |
|
17 | 17 | </%def> |
|
18 | 18 | <%def name="css_extra()"> |
|
19 | 19 | </%def> |
|
20 | 20 | |
|
21 | 21 | ${self.css()} |
|
22 | 22 | |
|
23 | 23 | %if c.ga_code: |
|
24 | 24 | <!-- Analytics --> |
|
25 | 25 | <script type="text/javascript"> |
|
26 | 26 | var _gaq = _gaq || []; |
|
27 | 27 | _gaq.push(['_setAccount', '${c.ga_code}']); |
|
28 | 28 | _gaq.push(['_trackPageview']); |
|
29 | 29 | |
|
30 | 30 | (function() { |
|
31 | 31 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
|
32 | 32 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
|
33 | 33 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
|
34 | 34 | })(); |
|
35 | 35 | </script> |
|
36 | 36 | %endif |
|
37 | 37 | |
|
38 | 38 | ## JAVASCRIPT ## |
|
39 | 39 | <%def name="js()"> |
|
40 | 40 | <script type="text/javascript"> |
|
41 | 41 | //JS translations map |
|
42 | 42 | var TRANSLATION_MAP = { |
|
43 | 43 | 'Add another comment':'${_("Add another comment")}', |
|
44 | 44 | 'Stop following this repository':"${_('Stop following this repository')}", |
|
45 | 45 | 'Start following this repository':"${_('Start following this repository')}", |
|
46 | 46 | 'Group':"${_('Group')}", |
|
47 | 47 | 'members':"${_('members')}", |
|
48 | 48 | 'Loading ...':"${_('Loading ...')}", |
|
49 | 49 | 'Search truncated': "${_('Search truncated')}", |
|
50 | 50 | 'No matching files': "${_('No matching files')}", |
|
51 | 51 | 'Open new pull request': "${_('Open new pull request')}", |
|
52 | 52 | 'Open new pull request for selected changesets': "${_('Open new pull request for selected changesets')}", |
|
53 | 'Show selected changes __S -> __E': "${_('Show selected changes __S -> __E')}", | |
|
54 | 'Show selected change __S': "${_('Show selected change __S')}", | |
|
53 | 'Show selected changesets __S -> __E': "${_('Show selected changesets __S -> __E')}", | |
|
54 | 'Show selected changeset __S': "${_('Show selected changeset __S')}", | |
|
55 | 55 | 'Selection link': "${_('Selection link')}", |
|
56 | 56 | 'Collapse diff': "${_('Collapse diff')}", |
|
57 | 57 | 'Expand diff': "${_('Expand diff')}" |
|
58 | 58 | }; |
|
59 | 59 | var _TM = TRANSLATION_MAP; |
|
60 | 60 | |
|
61 | 61 | var TOGGLE_FOLLOW_URL = "${h.url('toggle_following')}"; |
|
62 | 62 | |
|
63 | 63 | </script> |
|
64 | 64 | <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.rhodecode_version)}"></script> |
|
65 | 65 | <!--[if lt IE 9]> |
|
66 | 66 | <script language="javascript" type="text/javascript" src="${h.url('/js/excanvas.min.js')}"></script> |
|
67 | 67 | <![endif]--> |
|
68 | 68 | <script type="text/javascript" src="${h.url('/js/yui.flot.js', ver=c.rhodecode_version)}"></script> |
|
69 | 69 | <script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.rhodecode_version)}"></script> |
|
70 | 70 | <script type="text/javascript" src="${h.url('/js/pyroutes_map.js', ver=c.rhodecode_version)}"></script> |
|
71 | 71 | <script type="text/javascript" src="${h.url('/js/rhodecode.js', ver=c.rhodecode_version)}"></script> |
|
72 | 72 | ## EXTRA FOR JS |
|
73 | 73 | ${self.js_extra()} |
|
74 | 74 | <script type="text/javascript"> |
|
75 | 75 | (function(window,undefined){ |
|
76 | 76 | // Prepare |
|
77 | 77 | var History = window.History; // Note: We are using a capital H instead of a lower h |
|
78 | 78 | if ( !History.enabled ) { |
|
79 | 79 | // History.js is disabled for this browser. |
|
80 | 80 | // This is because we can optionally choose to support HTML4 browsers or not. |
|
81 | 81 | return false; |
|
82 | 82 | } |
|
83 | 83 | })(window); |
|
84 | 84 | |
|
85 | 85 | YUE.onDOMReady(function(){ |
|
86 | 86 | tooltip_activate(); |
|
87 | 87 | show_more_event(); |
|
88 | 88 | show_changeset_tooltip(); |
|
89 | 89 | // routes registration |
|
90 | 90 | pyroutes.register('toggle_following', "${h.url('toggle_following')}"); |
|
91 | 91 | pyroutes.register('changeset_info', "${h.url('changeset_info', repo_name='%(repo_name)s', revision='%(revision)s')}", ['repo_name', 'revision']); |
|
92 | 92 | pyroutes.register('repo_size', "${h.url('repo_size', repo_name='%(repo_name)s')}", ['repo_name']); |
|
93 | 93 | }) |
|
94 | 94 | </script> |
|
95 | 95 | </%def> |
|
96 | 96 | <%def name="js_extra()"></%def> |
|
97 | 97 | ${self.js()} |
|
98 | 98 | <%def name="head_extra()"></%def> |
|
99 | 99 | ${self.head_extra()} |
|
100 | 100 | </head> |
|
101 | 101 | <body id="body"> |
|
102 | 102 | ## IE hacks |
|
103 | 103 | <!--[if IE 7]> |
|
104 | 104 | <script>YUD.addClass(document.body,'ie7')</script> |
|
105 | 105 | <![endif]--> |
|
106 | 106 | <!--[if IE 8]> |
|
107 | 107 | <script>YUD.addClass(document.body,'ie8')</script> |
|
108 | 108 | <![endif]--> |
|
109 | 109 | <!--[if IE 9]> |
|
110 | 110 | <script>YUD.addClass(document.body,'ie9')</script> |
|
111 | 111 | <![endif]--> |
|
112 | 112 | |
|
113 | 113 | ${next.body()} |
|
114 | 114 | </body> |
|
115 | 115 | </html> |
@@ -1,262 +1,262 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | |
|
3 | 3 | <%inherit file="/base/base.html"/> |
|
4 | 4 | |
|
5 | 5 | <%def name="title()"> |
|
6 | 6 | ${_('%s Changelog') % c.repo_name} · ${c.rhodecode_name} |
|
7 | 7 | </%def> |
|
8 | 8 | |
|
9 | 9 | <%def name="breadcrumbs_links()"> |
|
10 | 10 | <% size = c.size if c.size <= c.total_cs else c.total_cs %> |
|
11 | 11 | ${_('Changelog')} - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)} |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="page_nav()"> |
|
15 | 15 | ${self.menu('changelog')} |
|
16 | 16 | </%def> |
|
17 | 17 | |
|
18 | 18 | <%def name="main()"> |
|
19 | 19 | ${self.context_bar('changelog')} |
|
20 | 20 | <div class="box"> |
|
21 | 21 | <!-- box / title --> |
|
22 | 22 | <div class="title"> |
|
23 | 23 | ${self.breadcrumbs()} |
|
24 | 24 | </div> |
|
25 | 25 | <div class="table"> |
|
26 | 26 | % if c.pagination: |
|
27 | 27 | <div id="graph"> |
|
28 | 28 | <div class="info_box" style="clear: both;padding: 10px 6px;min-height: 12px;text-align: right;"> |
|
29 | 29 | <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a> |
|
30 | 30 | <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a> |
|
31 | 31 | |
|
32 | 32 | %if c.rhodecode_db_repo.fork: |
|
33 | 33 | <a id="compare_fork" title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default',merge=1)}" class="ui-btn small">${_('Compare fork with parent')}</a> |
|
34 | 34 | %endif |
|
35 | 35 | %if h.is_hg(c.rhodecode_repo): |
|
36 | 36 | <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a> |
|
37 | 37 | %endif |
|
38 | 38 | </div> |
|
39 | 39 | <div class="container_header"> |
|
40 | 40 | ${h.form(h.url.current(),method='get')} |
|
41 | 41 | <div style="float:left"> |
|
42 | 42 | ${h.submit('set',_('Show'),class_="ui-btn")} |
|
43 | 43 | ${h.text('size',size=1,value=c.size)} |
|
44 | 44 | ${_('revisions')} |
|
45 | 45 | </div> |
|
46 | 46 | ${h.end_form()} |
|
47 | 47 | <div style="float:right">${h.select('branch_filter',c.branch_name,c.branch_filters)}</div> |
|
48 | 48 | </div> |
|
49 | 49 | <div id="graph_nodes"> |
|
50 | 50 | <canvas id="graph_canvas"></canvas> |
|
51 | 51 | </div> |
|
52 | 52 | <div id="graph_content"> |
|
53 | 53 | |
|
54 | 54 | <table id="changesets"> |
|
55 | 55 | <tbody> |
|
56 | 56 | %for cnt,cs in enumerate(c.pagination): |
|
57 | 57 | <tr id="chg_${cnt+1}" class="container ${'tablerow%s' % (cnt%2)}"> |
|
58 | 58 | <td class="checkbox"> |
|
59 | 59 | ${h.checkbox(cs.raw_id,class_="changeset_range")} |
|
60 | 60 | </td> |
|
61 | 61 | <td class="author"> |
|
62 | 62 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),16)}"/> |
|
63 | 63 | <span title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span> |
|
64 | 64 | </td> |
|
65 | 65 | <td class="hash" style="width:${len(h.show_id(cs))*6.5}px"> |
|
66 | 66 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}"> |
|
67 | 67 | <span class="changeset_hash">${h.show_id(cs)}</span> |
|
68 | 68 | </a> |
|
69 | 69 | </td> |
|
70 | 70 | <td class="date"> |
|
71 | 71 | <div class="date">${h.age(cs.date,True)}</div> |
|
72 | 72 | </td> |
|
73 | 73 | <td class="mid"> |
|
74 | 74 | <div class="log-container"> |
|
75 | 75 | <div class="message">${h.urlify_commit(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> |
|
76 | 76 | <div class="expand"><span class="expandtext">↓ ${_('Show more')} ↓</span></div> |
|
77 | 77 | <div class="extra-container"> |
|
78 | 78 | %if c.comments.get(cs.raw_id,[]): |
|
79 | 79 | <div class="comments-container"> |
|
80 | 80 | <div class="comments-cnt" title="${('comments')}"> |
|
81 | 81 | <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id,anchor='comment-%s' % c.comments[cs.raw_id][0].comment_id)}"> |
|
82 | 82 | ${len(c.comments[cs.raw_id])} |
|
83 | 83 | </a> |
|
84 | 84 | </div> |
|
85 | 85 | </div> |
|
86 | 86 | %endif |
|
87 | 87 | %if h.is_hg(c.rhodecode_repo): |
|
88 | 88 | %for book in cs.bookmarks: |
|
89 | 89 | <div class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
90 | 90 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
91 | 91 | </div> |
|
92 | 92 | %endfor |
|
93 | 93 | %endif |
|
94 | 94 | %for tag in cs.tags: |
|
95 | 95 | <div class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
96 | 96 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
97 | 97 | </div> |
|
98 | 98 | %endfor |
|
99 | 99 | %if (not c.branch_name) and cs.branch: |
|
100 | 100 | <div class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
101 | 101 | ${h.link_to(h.shorter(cs.branch),h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch))} |
|
102 | 102 | </div> |
|
103 | 103 | %endif |
|
104 | 104 | </div> |
|
105 | 105 | </div> |
|
106 | 106 | </td> |
|
107 | 107 | </tr> |
|
108 | 108 | %endfor |
|
109 | 109 | </tbody> |
|
110 | 110 | </table> |
|
111 | 111 | |
|
112 | 112 | <div class="pagination-wh pagination-left"> |
|
113 | 113 | ${c.pagination.pager('$link_previous ~2~ $link_next')} |
|
114 | 114 | </div> |
|
115 | 115 | </div> |
|
116 | 116 | </div> |
|
117 | 117 | |
|
118 | 118 | <script type="text/javascript" src="${h.url('/js/graph.js')}"></script> |
|
119 | 119 | <script type="text/javascript"> |
|
120 | 120 | YAHOO.util.Event.onDOMReady(function(){ |
|
121 | 121 | |
|
122 | 122 | //Monitor range checkboxes and build a link to changesets |
|
123 | 123 | //ranges |
|
124 | 124 | var checkboxes = YUD.getElementsByClassName('changeset_range'); |
|
125 | 125 | var url_tmpl = "${h.url('changeset_home',repo_name=c.repo_name,revision='__REVRANGE__')}"; |
|
126 | 126 | var pr_tmpl = "${h.url('pullrequest_home',repo_name=c.repo_name)}"; |
|
127 | 127 | |
|
128 | 128 | var checkbox_checker = function(e){ |
|
129 | 129 | var checked_checkboxes = []; |
|
130 | 130 | for (pos in checkboxes){ |
|
131 | 131 | if(checkboxes[pos].checked){ |
|
132 | 132 | checked_checkboxes.push(checkboxes[pos]); |
|
133 | 133 | } |
|
134 | 134 | } |
|
135 | 135 | if(YUD.get('open_new_pr')){ |
|
136 | 136 | if(checked_checkboxes.length>1){ |
|
137 | 137 | YUD.setStyle('open_new_pr','display','none'); |
|
138 | 138 | } else { |
|
139 | 139 | YUD.setStyle('open_new_pr','display',''); |
|
140 | 140 | if(checked_checkboxes.length>0){ |
|
141 | 141 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets']; |
|
142 | 142 | }else{ |
|
143 | 143 | YUD.get('open_new_pr').innerHTML = _TM['Open new pull request']; |
|
144 | 144 | } |
|
145 | 145 | } |
|
146 | 146 | } |
|
147 | 147 | |
|
148 | 148 | if(checked_checkboxes.length>0){ |
|
149 | 149 | var rev_end = checked_checkboxes[0].name; |
|
150 | 150 | var rev_start = checked_checkboxes[checked_checkboxes.length-1].name; |
|
151 | 151 | var url = url_tmpl.replace('__REVRANGE__', |
|
152 | 152 | rev_start+'...'+rev_end); |
|
153 | 153 | |
|
154 | 154 | var link = (rev_start == rev_end) |
|
155 | ? _TM['Show selected change __S'] | |
|
156 | : _TM['Show selected changes __S -> __E']; | |
|
155 | ? _TM['Show selected changeset __S'] | |
|
156 | : _TM['Show selected changesets __S -> __E']; | |
|
157 | 157 | |
|
158 | 158 | link = link.replace('__S',rev_start.substr(0,6)); |
|
159 | 159 | link = link.replace('__E',rev_end.substr(0,6)); |
|
160 | 160 | YUD.get('rev_range_container').href = url; |
|
161 | 161 | YUD.get('rev_range_container').innerHTML = link; |
|
162 | 162 | YUD.setStyle('rev_range_container','display',''); |
|
163 | 163 | YUD.setStyle('rev_range_clear','display',''); |
|
164 | 164 | |
|
165 | 165 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end); |
|
166 | 166 | YUD.setStyle('compare_fork','display','none'); |
|
167 | 167 | }else{ |
|
168 | 168 | YUD.setStyle('rev_range_container','display','none'); |
|
169 | 169 | YUD.setStyle('rev_range_clear','display','none'); |
|
170 | 170 | if (checkboxes){ |
|
171 | 171 | YUD.get('open_new_pr').href = pr_tmpl + '?rev_end={0}'.format(checkboxes[0].name); |
|
172 | 172 | } |
|
173 | 173 | YUD.setStyle('compare_fork','display',''); |
|
174 | 174 | } |
|
175 | 175 | }; |
|
176 | 176 | YUE.onDOMReady(checkbox_checker); |
|
177 | 177 | YUE.on(checkboxes,'click', checkbox_checker); |
|
178 | 178 | |
|
179 | 179 | YUE.on('rev_range_clear','click',function(e){ |
|
180 | 180 | for (var i=0; i<checkboxes.length; i++){ |
|
181 | 181 | var cb = checkboxes[i]; |
|
182 | 182 | cb.checked = false; |
|
183 | 183 | } |
|
184 | 184 | checkbox_checker(); |
|
185 | 185 | YUE.preventDefault(e); |
|
186 | 186 | }); |
|
187 | 187 | |
|
188 | 188 | var msgs = YUQ('.message'); |
|
189 | 189 | // get first element height |
|
190 | 190 | var el = YUQ('#graph_content .container')[0]; |
|
191 | 191 | var row_h = el.clientHeight; |
|
192 | 192 | for(var i=0;i<msgs.length;i++){ |
|
193 | 193 | var m = msgs[i]; |
|
194 | 194 | |
|
195 | 195 | var h = m.clientHeight; |
|
196 | 196 | var pad = YUD.getStyle(m,'padding'); |
|
197 | 197 | if(h > row_h){ |
|
198 | 198 | var offset = row_h - (h+12); |
|
199 | 199 | YUD.setStyle(m.nextElementSibling,'display','block'); |
|
200 | 200 | YUD.setStyle(m.nextElementSibling,'margin-top',offset+'px'); |
|
201 | 201 | }; |
|
202 | 202 | } |
|
203 | 203 | YUE.on(YUQ('.expand'),'click',function(e){ |
|
204 | 204 | var elem = e.currentTarget.parentNode.parentNode; |
|
205 | 205 | YUD.setStyle(e.currentTarget,'display','none'); |
|
206 | 206 | YUD.setStyle(elem,'height','auto'); |
|
207 | 207 | |
|
208 | 208 | //redraw the graph, line_count and jsdata are global vars |
|
209 | 209 | set_canvas(100); |
|
210 | 210 | |
|
211 | 211 | var r = new BranchRenderer(); |
|
212 | 212 | r.render(jsdata,100,line_count); |
|
213 | 213 | |
|
214 | 214 | }); |
|
215 | 215 | |
|
216 | 216 | // change branch filter |
|
217 | 217 | YUE.on(YUD.get('branch_filter'),'change',function(e){ |
|
218 | 218 | var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value; |
|
219 | 219 | var url_main = "${h.url('changelog_home',repo_name=c.repo_name)}"; |
|
220 | 220 | var url = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"; |
|
221 | 221 | var url = url.replace('__BRANCH__',selected_branch); |
|
222 | 222 | if(selected_branch != ''){ |
|
223 | 223 | window.location = url; |
|
224 | 224 | }else{ |
|
225 | 225 | window.location = url_main; |
|
226 | 226 | } |
|
227 | 227 | |
|
228 | 228 | }); |
|
229 | 229 | |
|
230 | 230 | function set_canvas(width) { |
|
231 | 231 | var c = document.getElementById('graph_nodes'); |
|
232 | 232 | var t = document.getElementById('graph_content'); |
|
233 | 233 | canvas = document.getElementById('graph_canvas'); |
|
234 | 234 | var div_h = t.clientHeight; |
|
235 | 235 | canvas.setAttribute('height',div_h); |
|
236 | 236 | canvas.setAttribute('width',width); |
|
237 | 237 | }; |
|
238 | 238 | var heads = 1; |
|
239 | 239 | var line_count = 0; |
|
240 | 240 | var jsdata = ${c.jsdata|n}; |
|
241 | 241 | |
|
242 | 242 | for (var i=0;i<jsdata.length;i++) { |
|
243 | 243 | var in_l = jsdata[i][2]; |
|
244 | 244 | for (var j in in_l) { |
|
245 | 245 | var m = in_l[j][1]; |
|
246 | 246 | if (m > line_count) |
|
247 | 247 | line_count = m; |
|
248 | 248 | } |
|
249 | 249 | } |
|
250 | 250 | set_canvas(100); |
|
251 | 251 | |
|
252 | 252 | var r = new BranchRenderer(); |
|
253 | 253 | r.render(jsdata,100,line_count); |
|
254 | 254 | |
|
255 | 255 | }); |
|
256 | 256 | </script> |
|
257 | 257 | %else: |
|
258 | 258 | ${_('There are no changes yet')} |
|
259 | 259 | %endif |
|
260 | 260 | </div> |
|
261 | 261 | </div> |
|
262 | 262 | </%def> |
@@ -1,122 +1,124 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('%s Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} · ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | 10 | » |
|
11 | 11 | ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
|
12 | 12 | » |
|
13 | 13 | ${_('Changesets')} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} -> r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="page_nav()"> |
|
17 | 17 | ${self.menu('changelog')} |
|
18 | 18 | </%def> |
|
19 | 19 | |
|
20 | 20 | <%def name="main()"> |
|
21 | 21 | <div class="box"> |
|
22 | 22 | <!-- box / title --> |
|
23 | 23 | <div class="title"> |
|
24 | 24 | ${self.breadcrumbs()} |
|
25 | 25 | </div> |
|
26 | 26 | <div class="table"> |
|
27 | 27 | <div id="body" class="diffblock"> |
|
28 | 28 | <div class="code-header cv"> |
|
29 | <h3 class="code-header-title">${_('Compare View')} / ${h.link_to(_('Show combined compare'),h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref=c.cs_ranges[-1].raw_id))}</h3> | |
|
29 | <h3 class="code-header-title">${_('Show changesets')}</h3> | |
|
30 | 30 | <div> |
|
31 |
${ |
|
|
31 | ${h.link_to('r%s:%s -> r%s:%s' % (c.cs_ranges[0].revision, h.short_id(c.cs_ranges[0].raw_id), c.cs_ranges[-1].revision, h.short_id(c.cs_ranges[-1].raw_id)), | |
|
32 | h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref=c.cs_ranges[-1].raw_id) | |
|
33 | )} | |
|
32 | 34 | </div> |
|
33 | 35 | </div> |
|
34 | 36 | </div> |
|
35 | 37 | <div id="changeset_compare_view_content"> |
|
36 | 38 | <div class="container"> |
|
37 | 39 | <table class="compare_view_commits noborder"> |
|
38 | 40 | %for cnt,cs in enumerate(c.cs_ranges): |
|
39 | 41 | <tr> |
|
40 | 42 | <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td> |
|
41 | 43 | <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td> |
|
42 | 44 | <td><div class="author">${h.person(cs.author)}</div></td> |
|
43 | 45 | <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td> |
|
44 | 46 | <td> |
|
45 | 47 | %if c.statuses: |
|
46 | 48 | <div title="${h.tooltip(_('Changeset status'))}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div> |
|
47 | 49 | %endif |
|
48 | 50 | </td> |
|
49 | 51 | <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td> |
|
50 | 52 | </tr> |
|
51 | 53 | %endfor |
|
52 | 54 | </table> |
|
53 | 55 | </div> |
|
54 | 56 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div> |
|
55 | 57 | <div class="cs_files"> |
|
56 | 58 | %for cs in c.cs_ranges: |
|
57 | 59 | <div class="cur_cs">${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div> |
|
58 | 60 | %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems(): |
|
59 | 61 | <div class="cs_${change}">${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}</div> |
|
60 | 62 | %endfor |
|
61 | 63 | %endfor |
|
62 | 64 | </div> |
|
63 | 65 | </div> |
|
64 | 66 | |
|
65 | 67 | </div> |
|
66 | 68 | <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> |
|
67 | 69 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
68 | 70 | %for cs in c.cs_ranges: |
|
69 | 71 | ##${comment.comment_inline_form(cs)} |
|
70 | 72 | ## diff block |
|
71 | 73 | <div class="h3"> |
|
72 | 74 | <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</a> |
|
73 | 75 | <div class="gravatar"> |
|
74 | 76 | <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),20)}"/> |
|
75 | 77 | </div> |
|
76 | 78 | <div class="right"> |
|
77 | 79 | <span class="logtags"> |
|
78 | 80 | %if len(cs.parents)>1: |
|
79 | 81 | <span class="merge">${_('merge')}</span> |
|
80 | 82 | %endif |
|
81 | 83 | %if cs.branch: |
|
82 | 84 | <span class="branchtag" title="${'%s %s' % (_('branch'),cs.branch)}"> |
|
83 | 85 | ${h.link_to(h.shorter(cs.branch),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
84 | 86 | </span> |
|
85 | 87 | %endif |
|
86 | 88 | %if h.is_hg(c.rhodecode_repo): |
|
87 | 89 | %for book in cs.bookmarks: |
|
88 | 90 | <span class="bookbook" title="${'%s %s' % (_('bookmark'),book)}"> |
|
89 | 91 | ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} |
|
90 | 92 | </span> |
|
91 | 93 | %endfor |
|
92 | 94 | %endif |
|
93 | 95 | %for tag in cs.tags: |
|
94 | 96 | <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}"> |
|
95 | 97 | ${h.link_to(h.shorter(tag),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}</span> |
|
96 | 98 | %endfor |
|
97 | 99 | </span> |
|
98 | 100 | </div> |
|
99 | 101 | </div> |
|
100 | 102 | ${diff_block.diff_block(c.changes[cs.raw_id])} |
|
101 | 103 | ##${comment.comments(cs)} |
|
102 | 104 | |
|
103 | 105 | %endfor |
|
104 | 106 | <script type="text/javascript"> |
|
105 | 107 | |
|
106 | 108 | YUE.onDOMReady(function(){ |
|
107 | 109 | |
|
108 | 110 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
109 | 111 | var act = e.currentTarget.nextElementSibling; |
|
110 | 112 | |
|
111 | 113 | if(YUD.hasClass(act,'active')){ |
|
112 | 114 | YUD.removeClass(act,'active'); |
|
113 | 115 | YUD.setStyle(act,'display','none'); |
|
114 | 116 | }else{ |
|
115 | 117 | YUD.addClass(act,'active'); |
|
116 | 118 | YUD.setStyle(act,'display',''); |
|
117 | 119 | } |
|
118 | 120 | }); |
|
119 | 121 | }) |
|
120 | 122 | </script> |
|
121 | 123 | </div> |
|
122 | 124 | </%def> |
@@ -1,93 +1,93 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.html"/> |
|
3 | 3 | |
|
4 | 4 | <%def name="title()"> |
|
5 | 5 | ${_('%s Compare') % c.repo_name} - ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} · ${c.rhodecode_name} |
|
6 | 6 | </%def> |
|
7 | 7 | |
|
8 | 8 | <%def name="breadcrumbs_links()"> |
|
9 | 9 | ${h.link_to(_(u'Home'),h.url('/'))} |
|
10 | 10 | » |
|
11 | 11 | ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)} |
|
12 | 12 | » |
|
13 | 13 | ${_('compare')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | <%def name="page_nav()"> |
|
17 | 17 | ${self.menu('changelog')} |
|
18 | 18 | </%def> |
|
19 | 19 | |
|
20 | 20 | <%def name="main()"> |
|
21 | 21 | <div class="box"> |
|
22 | 22 | <!-- box / title --> |
|
23 | 23 | <div class="title"> |
|
24 | 24 | ${self.breadcrumbs()} |
|
25 | 25 | </div> |
|
26 | 26 | <div class="table"> |
|
27 | 27 | <div id="body" class="diffblock"> |
|
28 | 28 | <div class="code-header cv"> |
|
29 |
<h3 class="code-header-title">${_('Compare |
|
|
29 | <h3 class="code-header-title">${_('Compare revisions')}</h3> | |
|
30 | 30 | <div> |
|
31 | 31 | ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} <a href="${c.swap_url}">[swap]</a> |
|
32 | 32 | </div> |
|
33 | 33 | </div> |
|
34 | 34 | </div> |
|
35 | 35 | <div id="changeset_compare_view_content"> |
|
36 | 36 | ##CS |
|
37 | 37 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div> |
|
38 | 38 | <%include file="compare_cs.html" /> |
|
39 | 39 | |
|
40 | 40 | ## FILES |
|
41 | 41 | <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px"> |
|
42 | 42 | |
|
43 | 43 | % if c.limited_diff: |
|
44 | 44 | ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} |
|
45 | 45 | % else: |
|
46 | 46 | ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.files)) % (len(c.files),c.lines_added,c.lines_deleted)}: |
|
47 | 47 | %endif |
|
48 | 48 | |
|
49 | 49 | </div> |
|
50 | 50 | <div class="cs_files"> |
|
51 | 51 | %if not c.files: |
|
52 | 52 | <span class="empty_data">${_('No files')}</span> |
|
53 | 53 | %endif |
|
54 | 54 | %for fid, change, f, stat in c.files: |
|
55 | 55 | <div class="cs_${change}"> |
|
56 | 56 | <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}</div> |
|
57 | 57 | <div class="changes">${h.fancy_file_stats(stat)}</div> |
|
58 | 58 | </div> |
|
59 | 59 | %endfor |
|
60 | 60 | </div> |
|
61 | 61 | % if c.limited_diff: |
|
62 | 62 | <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5> |
|
63 | 63 | % endif |
|
64 | 64 | </div> |
|
65 | 65 | </div> |
|
66 | 66 | |
|
67 | 67 | ## diff block |
|
68 | 68 | <%namespace name="diff_block" file="/changeset/diff_block.html"/> |
|
69 | 69 | %for fid, change, f, stat in c.files: |
|
70 | 70 | ${diff_block.diff_block_simple([c.changes[fid]])} |
|
71 | 71 | %endfor |
|
72 | 72 | % if c.limited_diff: |
|
73 | 73 | <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4> |
|
74 | 74 | % endif |
|
75 | 75 | <script type="text/javascript"> |
|
76 | 76 | |
|
77 | 77 | YUE.onDOMReady(function(){ |
|
78 | 78 | |
|
79 | 79 | YUE.on(YUQ('.diff-menu-activate'),'click',function(e){ |
|
80 | 80 | var act = e.currentTarget.nextElementSibling; |
|
81 | 81 | |
|
82 | 82 | if(YUD.hasClass(act,'active')){ |
|
83 | 83 | YUD.removeClass(act,'active'); |
|
84 | 84 | YUD.setStyle(act,'display','none'); |
|
85 | 85 | }else{ |
|
86 | 86 | YUD.addClass(act,'active'); |
|
87 | 87 | YUD.setStyle(act,'display',''); |
|
88 | 88 | } |
|
89 | 89 | }); |
|
90 | 90 | }) |
|
91 | 91 | </script> |
|
92 | 92 | </div> |
|
93 | 93 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now