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LshIc= |
@@ -62,5 +62,5 b' ad0ce803b40cb17fc3988373052943e041030b02' | |||||
62 | c6e32714336345403adf76abb6ebf9b8116fcdc7 0.2.1 |
|
62 | c6e32714336345403adf76abb6ebf9b8116fcdc7 0.2.1 | |
63 | 14f488a5dc4ca6647bc6acf12534fd137e968aa8 0.2.2 |
|
63 | 14f488a5dc4ca6647bc6acf12534fd137e968aa8 0.2.2 | |
64 | 9b3e9e242f5c97cc0c7657e5ac93dce7de61ca16 0.3 |
|
64 | 9b3e9e242f5c97cc0c7657e5ac93dce7de61ca16 0.3 | |
65 | 250f8150c4bb0ca00dcb92f49ce9a475545863e8 0.3.1 |
|
|||
66 | 9bf8eb837e785b6856ccfac264e977ce3ebe1535 0.3.1 |
|
65 | 9bf8eb837e785b6856ccfac264e977ce3ebe1535 0.3.1 | |
|
66 | a84d40e9481fcea4dafadee86b03f0dd401527d6 0.3.2 |
@@ -4,15 +4,20 b' List of contributors to Kallithea projec' | |||||
4 | Takumi IINO <trot.thunder@gmail.com> 2012-2016 |
|
4 | Takumi IINO <trot.thunder@gmail.com> 2012-2016 | |
5 | Unity Technologies 2012-2016 |
|
5 | Unity Technologies 2012-2016 | |
6 | Andrew Shadura <andrew@shadura.me> 2012 2014-2016 |
|
6 | Andrew Shadura <andrew@shadura.me> 2012 2014-2016 | |
|
7 | Dominik Ruf <dominikruf@gmail.com> 2012 2014-2016 | |||
7 | Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> 2014-2016 |
|
8 | Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> 2014-2016 | |
|
9 | Étienne Gilli <etienne.gilli@gmail.com> 2015-2016 | |||
8 | Jan Heylen <heyleke@gmail.com> 2015-2016 |
|
10 | Jan Heylen <heyleke@gmail.com> 2015-2016 | |
|
11 | Robert Martinez <ntttq@inboxen.org> 2015-2016 | |||
9 | Robert Rauch <mail@robertrauch.de> 2015-2016 |
|
12 | Robert Rauch <mail@robertrauch.de> 2015-2016 | |
10 | Søren Løvborg <sorenl@unity3d.com> 2015-2016 |
|
13 | Søren Løvborg <sorenl@unity3d.com> 2015-2016 | |
11 | Angel Ezquerra <angel.ezquerra@gmail.com> 2016 |
|
14 | Angel Ezquerra <angel.ezquerra@gmail.com> 2016 | |
12 | Asterios Dimitriou <steve@pci.gr> 2016 |
|
15 | Asterios Dimitriou <steve@pci.gr> 2016 | |
|
16 | Konstantin Veretennicov <kveretennicov@gmail.com> 2016 | |||
|
17 | Oscar Curero <oscar@naiandei.net> 2016 | |||
13 | Robert James Dennington <tinytimrob@googlemail.com> 2016 |
|
18 | Robert James Dennington <tinytimrob@googlemail.com> 2016 | |
|
19 | YFdyh000 <yfdyh000@gmail.com> 2016 | |||
14 | Aras Pranckevičius <aras@unity3d.com> 2012-2013 2015 |
|
20 | Aras Pranckevičius <aras@unity3d.com> 2012-2013 2015 | |
15 | Dominik Ruf <dominikruf@gmail.com> 2012 2014-2015 |
|
|||
16 | Sean Farley <sean.michael.farley@gmail.com> 2013-2015 |
|
21 | Sean Farley <sean.michael.farley@gmail.com> 2013-2015 | |
17 | Christian Oyarzun <oyarzun@gmail.com> 2014-2015 |
|
22 | Christian Oyarzun <oyarzun@gmail.com> 2014-2015 | |
18 | Joseph Rivera <rivera.d.joseph@gmail.com> 2014-2015 |
|
23 | Joseph Rivera <rivera.d.joseph@gmail.com> 2014-2015 | |
@@ -27,7 +32,6 b' List of contributors to Kallithea projec' | |||||
27 | Denis Blanchette <dblanchette@coveo.com> 2015 |
|
32 | Denis Blanchette <dblanchette@coveo.com> 2015 | |
28 | duanhongyi <duanhongyi@doopai.com> 2015 |
|
33 | duanhongyi <duanhongyi@doopai.com> 2015 | |
29 | EriCSN Chang <ericsning@gmail.com> 2015 |
|
34 | EriCSN Chang <ericsning@gmail.com> 2015 | |
30 | Étienne Gilli <etienne.gilli@gmail.com> 2015 |
|
|||
31 | Grzegorz Krason <grzegorz.krason@gmail.com> 2015 |
|
35 | Grzegorz Krason <grzegorz.krason@gmail.com> 2015 | |
32 | Jiří Suchan <yed@vanyli.net> 2015 |
|
36 | Jiří Suchan <yed@vanyli.net> 2015 | |
33 | Kazunari Kobayashi <kobanari@nifty.com> 2015 |
|
37 | Kazunari Kobayashi <kobanari@nifty.com> 2015 | |
@@ -42,7 +46,6 b' List of contributors to Kallithea projec' | |||||
42 | Nick High <nick@silverchip.org> 2015 |
|
46 | Nick High <nick@silverchip.org> 2015 | |
43 | Niemand Jedermann <predatorix@web.de> 2015 |
|
47 | Niemand Jedermann <predatorix@web.de> 2015 | |
44 | Peter Vitt <petervitt@web.de> 2015 |
|
48 | Peter Vitt <petervitt@web.de> 2015 | |
45 | Robert Martinez <ntttq@inboxen.org> 2015 |
|
|||
46 | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> 2015 |
|
49 | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> 2015 | |
47 | Sam Jaques <sam.jaques@me.com> 2015 |
|
50 | Sam Jaques <sam.jaques@me.com> 2015 | |
48 | Tuux <tuxa@galaxie.eu.org> 2015 |
|
51 | Tuux <tuxa@galaxie.eu.org> 2015 |
@@ -139,6 +139,7 b' or in the admin panel you can check the ' | |||||
139 |
|
139 | |||
140 | .. _ldap-setup: |
|
140 | .. _ldap-setup: | |
141 |
|
141 | |||
|
142 | ||||
142 | Setting up LDAP support |
|
143 | Setting up LDAP support | |
143 | ----------------------- |
|
144 | ----------------------- | |
144 |
|
145 | |||
@@ -411,8 +412,7 b' reverse-proxy setup with basic auth:' | |||||
411 | </Location> |
|
412 | </Location> | |
412 |
|
413 | |||
413 | Setting metadata in container/reverse-proxy |
|
414 | Setting metadata in container/reverse-proxy | |
414 | ''''''''''''''''''''''''''''''''''''''''''' |
|
415 | """"""""""""""""""""""""""""""""""""""""""" | |
415 |
|
||||
416 | When a new user account is created on the first login, Kallithea has no information about |
|
416 | When a new user account is created on the first login, Kallithea has no information about | |
417 | the user's email and full name. So you can set some additional request headers like in the |
|
417 | the user's email and full name. So you can set some additional request headers like in the | |
418 | example below. In this example the user is authenticated via Kerberos and an Apache |
|
418 | example below. In this example the user is authenticated via Kerberos and an Apache |
@@ -421,11 +421,11 b' class ChangesetController(BaseRepoContro' | |||||
421 | 'repository.admin') |
|
421 | 'repository.admin') | |
422 | @jsonify |
|
422 | @jsonify | |
423 | def delete_comment(self, repo_name, comment_id): |
|
423 | def delete_comment(self, repo_name, comment_id): | |
424 | co = ChangesetComment.get(comment_id) |
|
424 | co = ChangesetComment.get_or_404(comment_id) | |
425 | if not co: |
|
425 | if co.repo.repo_name != repo_name: | |
426 |
raise HTTP |
|
426 | raise HTTPNotFound() | |
427 | owner = co.author.user_id == c.authuser.user_id |
|
427 | owner = co.author.user_id == c.authuser.user_id | |
428 | repo_admin = h.HasRepoPermissionAny('repository.admin') |
|
428 | repo_admin = h.HasRepoPermissionAny('repository.admin')(repo_name) | |
429 | if h.HasPermissionAny('hg.admin')() or repo_admin or owner: |
|
429 | if h.HasPermissionAny('hg.admin')() or repo_admin or owner: | |
430 | ChangesetCommentsModel().delete(comment=co) |
|
430 | ChangesetCommentsModel().delete(comment=co) | |
431 | Session().commit() |
|
431 | Session().commit() |
@@ -487,7 +487,7 b' class PullrequestsController(BaseRepoCon' | |||||
487 | #only owner or admin can update it |
|
487 | #only owner or admin can update it | |
488 | owner = pull_request.owner.user_id == c.authuser.user_id |
|
488 | owner = pull_request.owner.user_id == c.authuser.user_id | |
489 | repo_admin = h.HasRepoPermissionAny('repository.admin')(c.repo_name) |
|
489 | repo_admin = h.HasRepoPermissionAny('repository.admin')(c.repo_name) | |
490 | if not (h.HasPermissionAny('hg.admin') or repo_admin or owner): |
|
490 | if not (h.HasPermissionAny('hg.admin')() or repo_admin or owner): | |
491 | raise HTTPForbidden() |
|
491 | raise HTTPForbidden() | |
492 |
|
492 | |||
493 | _form = PullRequestPostForm()().to_python(request.POST) |
|
493 | _form = PullRequestPostForm()().to_python(request.POST) | |
@@ -814,7 +814,7 b' class PullrequestsController(BaseRepoCon' | |||||
814 |
|
814 | |||
815 | owner = co.author.user_id == c.authuser.user_id |
|
815 | owner = co.author.user_id == c.authuser.user_id | |
816 | repo_admin = h.HasRepoPermissionAny('repository.admin')(c.repo_name) |
|
816 | repo_admin = h.HasRepoPermissionAny('repository.admin')(c.repo_name) | |
817 | if h.HasPermissionAny('hg.admin') or repo_admin or owner: |
|
817 | if h.HasPermissionAny('hg.admin')() or repo_admin or owner: | |
818 | ChangesetCommentsModel().delete(comment=co) |
|
818 | ChangesetCommentsModel().delete(comment=co) | |
819 | Session().commit() |
|
819 | Session().commit() | |
820 | return True |
|
820 | return True |
@@ -759,6 +759,16 b' class LoginRequired(object):' | |||||
759 | if request.method not in ['GET', 'HEAD', 'POST', 'PUT']: |
|
759 | if request.method not in ['GET', 'HEAD', 'POST', 'PUT']: | |
760 | raise HTTPMethodNotAllowed() |
|
760 | raise HTTPMethodNotAllowed() | |
761 |
|
761 | |||
|
762 | # Also verify the _method override. This is only permitted in POST | |||
|
763 | # requests, and can specify PUT or DELETE. | |||
|
764 | _method = request.params.get('_method') | |||
|
765 | if _method is None: | |||
|
766 | pass # no override, no problem | |||
|
767 | elif request.method == 'POST' and _method.upper() in ['PUT', 'DELETE']: | |||
|
768 | pass # permitted override | |||
|
769 | else: | |||
|
770 | raise HTTPMethodNotAllowed() | |||
|
771 | ||||
762 | # Make sure CSRF token never appears in the URL. If so, invalidate it. |
|
772 | # Make sure CSRF token never appears in the URL. If so, invalidate it. | |
763 | if secure_form.token_key in request.GET: |
|
773 | if secure_form.token_key in request.GET: | |
764 | log.error('CSRF key leak detected') |
|
774 | log.error('CSRF key leak detected') |
@@ -123,9 +123,6 b' class BaseRepository(object):' | |||||
123 | for topnode, dirs, files in tip.walk('/'): |
|
123 | for topnode, dirs, files in tip.walk('/'): | |
124 | for f in files: |
|
124 | for f in files: | |
125 | size += tip.get_file_size(f.path) |
|
125 | size += tip.get_file_size(f.path) | |
126 | for dir in dirs: |
|
|||
127 | for f in files: |
|
|||
128 | size += tip.get_file_size(f.path) |
|
|||
129 |
|
126 | |||
130 | except RepositoryError as e: |
|
127 | except RepositoryError as e: | |
131 | pass |
|
128 | pass |
@@ -31,15 +31,20 b'' | |||||
31 | <li>Copyright © 2012–2016, Takumi IINO</li> |
|
31 | <li>Copyright © 2012–2016, Takumi IINO</li> | |
32 | <li>Copyright © 2012–2016, Unity Technologies</li> |
|
32 | <li>Copyright © 2012–2016, Unity Technologies</li> | |
33 | <li>Copyright © 2012, 2014–2016, Andrew Shadura</li> |
|
33 | <li>Copyright © 2012, 2014–2016, Andrew Shadura</li> | |
|
34 | <li>Copyright © 2012, 2014–2016, Dominik Ruf</li> | |||
34 | <li>Copyright © 2014–2016, Thomas De Schampheleire</li> |
|
35 | <li>Copyright © 2014–2016, Thomas De Schampheleire</li> | |
|
36 | <li>Copyright © 2015–2016, Étienne Gilli</li> | |||
35 | <li>Copyright © 2015–2016, Jan Heylen</li> |
|
37 | <li>Copyright © 2015–2016, Jan Heylen</li> | |
|
38 | <li>Copyright © 2015–2016, Robert Martinez</li> | |||
36 | <li>Copyright © 2015–2016, Robert Rauch</li> |
|
39 | <li>Copyright © 2015–2016, Robert Rauch</li> | |
37 | <li>Copyright © 2015–2016, Søren Løvborg</li> |
|
40 | <li>Copyright © 2015–2016, Søren Løvborg</li> | |
38 | <li>Copyright © 2016, Angel Ezquerra</li> |
|
41 | <li>Copyright © 2016, Angel Ezquerra</li> | |
39 | <li>Copyright © 2016, Asterios Dimitriou</li> |
|
42 | <li>Copyright © 2016, Asterios Dimitriou</li> | |
|
43 | <li>Copyright © 2016, Konstantin Veretennicov</li> | |||
|
44 | <li>Copyright © 2016, Oscar Curero</li> | |||
40 | <li>Copyright © 2016, Robert James Dennington</li> |
|
45 | <li>Copyright © 2016, Robert James Dennington</li> | |
|
46 | <li>Copyright © 2016, YFdyh000</li> | |||
41 | <li>Copyright © 2012–2013, 2015, Aras Pranckevičius</li> |
|
47 | <li>Copyright © 2012–2013, 2015, Aras Pranckevičius</li> | |
42 | <li>Copyright © 2012, 2014–2015, Dominik Ruf</li> |
|
|||
43 | <li>Copyright © 2014–2015, Christian Oyarzun</li> |
|
48 | <li>Copyright © 2014–2015, Christian Oyarzun</li> | |
44 | <li>Copyright © 2014–2015, Joseph Rivera</li> |
|
49 | <li>Copyright © 2014–2015, Joseph Rivera</li> | |
45 | <li>Copyright © 2014–2015, Michal Čihař</li> |
|
50 | <li>Copyright © 2014–2015, Michal Čihař</li> | |
@@ -54,7 +59,6 b'' | |||||
54 | <li>Copyright © 2015, Denis Blanchette</li> |
|
59 | <li>Copyright © 2015, Denis Blanchette</li> | |
55 | <li>Copyright © 2015, duanhongyi</li> |
|
60 | <li>Copyright © 2015, duanhongyi</li> | |
56 | <li>Copyright © 2015, EriCSN Chang</li> |
|
61 | <li>Copyright © 2015, EriCSN Chang</li> | |
57 | <li>Copyright © 2015, Étienne Gilli</li> |
|
|||
58 | <li>Copyright © 2015, Grzegorz Krason</li> |
|
62 | <li>Copyright © 2015, Grzegorz Krason</li> | |
59 | <li>Copyright © 2015, Jiří Suchan</li> |
|
63 | <li>Copyright © 2015, Jiří Suchan</li> | |
60 | <li>Copyright © 2015, Kazunari Kobayashi</li> |
|
64 | <li>Copyright © 2015, Kazunari Kobayashi</li> | |
@@ -69,7 +73,6 b'' | |||||
69 | <li>Copyright © 2015, Nick High</li> |
|
73 | <li>Copyright © 2015, Nick High</li> | |
70 | <li>Copyright © 2015, Niemand Jedermann</li> |
|
74 | <li>Copyright © 2015, Niemand Jedermann</li> | |
71 | <li>Copyright © 2015, Peter Vitt</li> |
|
75 | <li>Copyright © 2015, Peter Vitt</li> | |
72 | <li>Copyright © 2015, Robert Martinez</li> |
|
|||
73 | <li>Copyright © 2015, Ronny Pfannschmidt</li> |
|
76 | <li>Copyright © 2015, Ronny Pfannschmidt</li> | |
74 | <li>Copyright © 2015, Sam Jaques</li> |
|
77 | <li>Copyright © 2015, Sam Jaques</li> | |
75 | <li>Copyright © 2015, Tuux</li> |
|
78 | <li>Copyright © 2015, Tuux</li> |
@@ -28,11 +28,11 b'' | |||||
28 | </div> |
|
28 | </div> | |
29 | <div class="input"> |
|
29 | <div class="input"> | |
30 | ${h.textarea('ga_code', cols=80, rows=10)} |
|
30 | ${h.textarea('ga_code', cols=80, rows=10)} | |
31 | <span class="help-block">${_('HTML (possibly with\ |
|
31 | <span class="help-block">${_('HTML (possibly with \ | |
32 | JavaScript and/or CSS) that will be added to the bottom\ |
|
32 | JavaScript and/or CSS) that will be added to the bottom \ | |
33 | of every page. This can be used for web analytics\ |
|
33 | of every page. This can be used for web analytics \ | |
34 | systems like Google Analytics or Piwik, but also to\ |
|
34 | systems like Google Analytics or Piwik, but also to \ | |
35 | perform instance-specific customizations like adding a\ |
|
35 | perform instance-specific customizations like adding a \ | |
36 | project banner at the top of every page.')}</span> |
|
36 | project banner at the top of every page.')}</span> | |
37 | </div> |
|
37 | </div> | |
38 | </div> |
|
38 | </div> |
@@ -183,27 +183,26 b'' | |||||
183 | if ($checked_checkboxes.length > 0) { |
|
183 | if ($checked_checkboxes.length > 0) { | |
184 | $checked_checkboxes.first().parent('td').append($singlerange); |
|
184 | $checked_checkboxes.first().parent('td').append($singlerange); | |
185 | var singlerange = $singlerange.prop('checked'); |
|
185 | var singlerange = $singlerange.prop('checked'); | |
186 |
var rev_end = $checked_checkboxes.first().prop('name') |
|
186 | var rev_end = $checked_checkboxes.first().prop('name'); | |
187 | if ($checked_checkboxes.length > 1 || singlerange) { |
|
187 | if ($checked_checkboxes.length > 1 || singlerange) { | |
188 |
var rev_start = $checked_checkboxes.last().prop('name') |
|
188 | var rev_start = $checked_checkboxes.last().prop('name'); | |
189 | $('#rev_range_container').prop('href', |
|
189 | $('#rev_range_container').prop('href', | |
190 | pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}', |
|
190 | pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}', | |
191 | 'revision': rev_start + '...' + rev_end})); |
|
191 | 'revision': rev_start + '...' + rev_end})); | |
192 | $('#rev_range_container').html( |
|
192 | $('#rev_range_container').html( | |
193 | _TM['Show Selected Changesets {0} → {1}'].format(rev_start, rev_end)); |
|
193 | _TM['Show Selected Changesets {0} → {1}'].format(rev_start.substr(0, 12), rev_end.substr(0, 12))); | |
194 | $('#rev_range_container').show(); |
|
194 | $('#rev_range_container').show(); | |
195 | $('#open_new_pr').prop('href', pyroutes.url('pullrequest_home', |
|
195 | $('#open_new_pr').prop('href', pyroutes.url('pullrequest_home', | |
196 | {'repo_name': '${c.repo_name}', |
|
196 | {'repo_name': '${c.repo_name}', | |
197 | 'rev_start': rev_start, |
|
197 | 'rev_start': rev_start, | |
198 | 'rev_end': rev_end})); |
|
198 | 'rev_end': rev_end})); | |
199 | $('#open_new_pr').html(_TM['Open New Pull Request for {0} → {1}'].format(rev_start, rev_end)); |
|
199 | $('#open_new_pr').html(_TM['Open New Pull Request for {0} → {1}'].format(rev_start.substr(0, 12), rev_end.substr(0, 12))); | |
200 | } else { |
|
200 | } else { | |
201 | $('#open_new_pr').prop('href', pyroutes.url('pullrequest_home', |
|
201 | $('#open_new_pr').prop('href', pyroutes.url('pullrequest_home', | |
202 | {'repo_name': '${c.repo_name}', |
|
202 | {'repo_name': '${c.repo_name}', | |
203 | 'rev_end': rev_end})); |
|
203 | 'rev_end': rev_end})); | |
204 | $('#open_new_pr').html(_TM['Open New Pull Request from {0}'].format(rev_end)); |
|
204 | $('#open_new_pr').html(_TM['Open New Pull Request from {0}'].format(rev_end.substr(0, 12))); | |
205 | } |
|
205 | } | |
206 |
|
||||
207 | $('#rev_range_clear').show(); |
|
206 | $('#rev_range_clear').show(); | |
208 | $('#compare_fork').hide(); |
|
207 | $('#compare_fork').hide(); | |
209 |
|
208 |
@@ -382,6 +382,22 b' class GitChangesetTest(unittest.TestCase' | |||||
382 | for revision, path, size in to_check: |
|
382 | for revision, path, size in to_check: | |
383 | self._test_file_size(revision, path, size) |
|
383 | self._test_file_size(revision, path, size) | |
384 |
|
384 | |||
|
385 | def _test_dir_size(self, revision, path, size): | |||
|
386 | node = self.repo.get_changeset(revision).get_node(path) | |||
|
387 | self.assertEqual(node.size, size) | |||
|
388 | ||||
|
389 | def test_dir_size(self): | |||
|
390 | to_check = ( | |||
|
391 | ('5f2c6ee195929b0be80749243c18121c9864a3b3', '/', 674076), | |||
|
392 | ('7ab37bc680b4aa72c34d07b230c866c28e9fc204', '/', 674049), | |||
|
393 | ('6892503fb8f2a552cef5f4d4cc2cdbd13ae1cd2f', '/', 671830), | |||
|
394 | ) | |||
|
395 | for revision, path, size in to_check: | |||
|
396 | self._test_dir_size(revision, path, size) | |||
|
397 | ||||
|
398 | def test_repo_size(self): | |||
|
399 | self.assertEqual(self.repo.size, 674076) | |||
|
400 | ||||
385 | def test_file_history(self): |
|
401 | def test_file_history(self): | |
386 | # we can only check if those revisions are present in the history |
|
402 | # we can only check if those revisions are present in the history | |
387 | # as we cannot update this test every time file is changed |
|
403 | # as we cannot update this test every time file is changed |
@@ -344,6 +344,23 b' class MercurialChangesetTest(unittest.Te' | |||||
344 | for revision, path, size in to_check: |
|
344 | for revision, path, size in to_check: | |
345 | self._test_file_size(revision, path, size) |
|
345 | self._test_file_size(revision, path, size) | |
346 |
|
346 | |||
|
347 | def _test_dir_size(self, revision, path, size): | |||
|
348 | node = self.repo.get_changeset(revision).get_node(path) | |||
|
349 | self.assertFalse(node.is_file()) | |||
|
350 | self.assertEqual(node.size, size) | |||
|
351 | ||||
|
352 | def test_dir_size(self): | |||
|
353 | to_check = ( | |||
|
354 | ('96507bd11ecc', '/', 682421), | |||
|
355 | ('a53d9201d4bc', '/', 682410), | |||
|
356 | ('90243de06161', '/', 682006), | |||
|
357 | ) | |||
|
358 | for revision, path, size in to_check: | |||
|
359 | self._test_dir_size(revision, path, size) | |||
|
360 | ||||
|
361 | def test_repo_size(self): | |||
|
362 | self.assertEqual(self.repo.size, 682421) | |||
|
363 | ||||
347 | def test_file_history(self): |
|
364 | def test_file_history(self): | |
348 | # we can only check if those revisions are present in the history |
|
365 | # we can only check if those revisions are present in the history | |
349 | # as we cannot update this test every time file is changed |
|
366 | # as we cannot update this test every time file is changed |
General Comments 0
You need to be logged in to leave comments.
Login now