Changeset - 3777939c8674
[Not reviewed]
Merge default
! ! !
Bradley M. Kuhn - 11 years ago 2014-07-03 01:08:45
bkuhn@sfconservancy.org
Merge liberated and rebranded branches to default
60 files changed:
README.rst
68
42
Changeset was too big and was cut off... Show full diff anyway
0 comments (0 inline, 0 general)
.hgignore
Show inline comments
 
@@ -18,10 +18,9 @@ syntax: regexp
 
^\.project$
 
^\.pydevproject$
 
^\.coverage$
 
^rhodecode\.db$
 
^kallithea\.db$
 
^test\.db$
 
^RhodeCode\.egg-info$
 
^Kallithea\.egg-info$
 
^rc.*\.ini$
 
^fabfile.py
 
^\.rhodecode$
 
^\.idea$
.travis.yml
Show inline comments
 
@@ -5,9 +5,9 @@ python:
 
  - "2.7"
 

	
 
env:  
 
  - TEST_DB=sqlite:////tmp/rhodecode_test.sqlite
 
  - TEST_DB=mysql://root@127.0.0.1/rhodecode_test
 
  - TEST_DB=postgresql://postgres@127.0.0.1/rhodecode_test
 
  - TEST_DB=sqlite:////tmp/kallithea_test.sqlite
 
  - TEST_DB=mysql://root@127.0.0.1/kallithea_test
 
  - TEST_DB=postgresql://postgres@127.0.0.1/kallithea_test
 

	
 
services:
 
  - mysql
 
@@ -15,8 +15,8 @@ services:
 

	
 
# command to install dependencies
 
before_script:
 
  - mysql -e 'create database rhodecode_test;'
 
  - psql -c 'create database rhodecode_test;' -U postgres
 
  - mysql -e 'create database kallithea_test;'
 
  - psql -c 'create database kallithea_test;' -U postgres
 
  - git --version
 

	
 
before_install:
 
@@ -34,8 +34,8 @@ script: nosetests
 

	
 
notifications:
 
    email:
 
        - marcinkuz@gmail.com
 
    irc: "irc.freenode.org#rhodecode"
 
        - ci@kallithea-scm.org
 
    irc: "irc.freenode.org#kallithea"
 

	
 
branches:
 
  only:
.tx/config
Show inline comments
 
[main]
 
host = https://www.transifex.com
 

	
 
[RhodeCode.pot]
 
source_file = rhodecode/i18n/rhodecode.pot
 
[Kallithea.pot]
 
source_file = kallithea/i18n/kallithea.pot
 
source_lang = en
 

	
 
trans.pl    = rhodecode/i18n/pl/LC_MESSAGES/rhodecode.po
 
trans.ru    = rhodecode/i18n/ru/LC_MESSAGES/rhodecode.po
 
trans.fr    = rhodecode/i18n/fr/LC_MESSAGES/rhodecode.po
 
trans.ja    = rhodecode/i18n/ja/LC_MESSAGES/rhodecode.po
 
trans.pt_BR = rhodecode/i18n/pt_BR/LC_MESSAGES/rhodecode.po
 
trans.zh_CN = rhodecode/i18n/zh_CN/LC_MESSAGES/rhodecode.po
 
trans.zh_TW = rhodecode/i18n/zh_TW/LC_MESSAGES/rhodecode.po
 
trans.pl    = kallithea/i18n/pl/LC_MESSAGES/kallithea.po
 
trans.ru    = kallithea/i18n/ru/LC_MESSAGES/kallithea.po
 
trans.fr    = kallithea/i18n/fr/LC_MESSAGES/kallithea.po
 
trans.ja    = kallithea/i18n/ja/LC_MESSAGES/kallithea.po
 
trans.pt_BR = kallithea/i18n/pt_BR/LC_MESSAGES/kallithea.po
 
trans.zh_CN = kallithea/i18n/zh_CN/LC_MESSAGES/kallithea.po
 
trans.zh_TW = kallithea/i18n/zh_TW/LC_MESSAGES/kallithea.po
 
trans.de    = kallithea/i18n/de/LC_MESSAGES/kallithea.po
 
type = PO
Apache-License-2.0.txt
Show inline comments
 
new file 100644
 
                                 Apache License
 
                           Version 2.0, January 2004
 
                        http://www.apache.org/licenses/
 

	
 
   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
 

	
 
   1. Definitions.
 

	
 
      "License" shall mean the terms and conditions for use, reproduction,
 
      and distribution as defined by Sections 1 through 9 of this document.
 

	
 
      "Licensor" shall mean the copyright owner or entity authorized by
 
      the copyright owner that is granting the License.
 

	
 
      "Legal Entity" shall mean the union of the acting entity and all
 
      other entities that control, are controlled by, or are under common
 
      control with that entity. For the purposes of this definition,
 
      "control" means (i) the power, direct or indirect, to cause the
 
      direction or management of such entity, whether by contract or
 
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
 
      outstanding shares, or (iii) beneficial ownership of such entity.
 

	
 
      "You" (or "Your") shall mean an individual or Legal Entity
 
      exercising permissions granted by this License.
 

	
 
      "Source" form shall mean the preferred form for making modifications,
 
      including but not limited to software source code, documentation
 
      source, and configuration files.
 

	
 
      "Object" form shall mean any form resulting from mechanical
 
      transformation or translation of a Source form, including but
 
      not limited to compiled object code, generated documentation,
 
      and conversions to other media types.
 

	
 
      "Work" shall mean the work of authorship, whether in Source or
 
      Object form, made available under the License, as indicated by a
 
      copyright notice that is included in or attached to the work
 
      (an example is provided in the Appendix below).
 

	
 
      "Derivative Works" shall mean any work, whether in Source or Object
 
      form, that is based on (or derived from) the Work and for which the
 
      editorial revisions, annotations, elaborations, or other modifications
 
      represent, as a whole, an original work of authorship. For the purposes
 
      of this License, Derivative Works shall not include works that remain
 
      separable from, or merely link (or bind by name) to the interfaces of,
 
      the Work and Derivative Works thereof.
 

	
 
      "Contribution" shall mean any work of authorship, including
 
      the original version of the Work and any modifications or additions
 
      to that Work or Derivative Works thereof, that is intentionally
 
      submitted to Licensor for inclusion in the Work by the copyright owner
 
      or by an individual or Legal Entity authorized to submit on behalf of
 
      the copyright owner. For the purposes of this definition, "submitted"
 
      means any form of electronic, verbal, or written communication sent
 
      to the Licensor or its representatives, including but not limited to
 
      communication on electronic mailing lists, source code control systems,
 
      and issue tracking systems that are managed by, or on behalf of, the
 
      Licensor for the purpose of discussing and improving the Work, but
 
      excluding communication that is conspicuously marked or otherwise
 
      designated in writing by the copyright owner as "Not a Contribution."
 

	
 
      "Contributor" shall mean Licensor and any individual or Legal Entity
 
      on behalf of whom a Contribution has been received by Licensor and
 
      subsequently incorporated within the Work.
 

	
 
   2. Grant of Copyright License. Subject to the terms and conditions of
 
      this License, each Contributor hereby grants to You a perpetual,
 
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
 
      copyright license to reproduce, prepare Derivative Works of,
 
      publicly display, publicly perform, sublicense, and distribute the
 
      Work and such Derivative Works in Source or Object form.
 

	
 
   3. Grant of Patent License. Subject to the terms and conditions of
 
      this License, each Contributor hereby grants to You a perpetual,
 
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
 
      (except as stated in this section) patent license to make, have made,
 
      use, offer to sell, sell, import, and otherwise transfer the Work,
 
      where such license applies only to those patent claims licensable
 
      by such Contributor that are necessarily infringed by their
 
      Contribution(s) alone or by combination of their Contribution(s)
 
      with the Work to which such Contribution(s) was submitted. If You
 
      institute patent litigation against any entity (including a
 
      cross-claim or counterclaim in a lawsuit) alleging that the Work
 
      or a Contribution incorporated within the Work constitutes direct
 
      or contributory patent infringement, then any patent licenses
 
      granted to You under this License for that Work shall terminate
 
      as of the date such litigation is filed.
 

	
 
   4. Redistribution. You may reproduce and distribute copies of the
 
      Work or Derivative Works thereof in any medium, with or without
 
      modifications, and in Source or Object form, provided that You
 
      meet the following conditions:
 

	
 
      (a) You must give any other recipients of the Work or
 
          Derivative Works a copy of this License; and
 

	
 
      (b) You must cause any modified files to carry prominent notices
 
          stating that You changed the files; and
 

	
 
      (c) You must retain, in the Source form of any Derivative Works
 
          that You distribute, all copyright, patent, trademark, and
 
          attribution notices from the Source form of the Work,
 
          excluding those notices that do not pertain to any part of
 
          the Derivative Works; and
 

	
 
      (d) If the Work includes a "NOTICE" text file as part of its
 
          distribution, then any Derivative Works that You distribute must
 
          include a readable copy of the attribution notices contained
 
          within such NOTICE file, excluding those notices that do not
 
          pertain to any part of the Derivative Works, in at least one
 
          of the following places: within a NOTICE text file distributed
 
          as part of the Derivative Works; within the Source form or
 
          documentation, if provided along with the Derivative Works; or,
 
          within a display generated by the Derivative Works, if and
 
          wherever such third-party notices normally appear. The contents
 
          of the NOTICE file are for informational purposes only and
 
          do not modify the License. You may add Your own attribution
 
          notices within Derivative Works that You distribute, alongside
 
          or as an addendum to the NOTICE text from the Work, provided
 
          that such additional attribution notices cannot be construed
 
          as modifying the License.
 

	
 
      You may add Your own copyright statement to Your modifications and
 
      may provide additional or different license terms and conditions
 
      for use, reproduction, or distribution of Your modifications, or
 
      for any such Derivative Works as a whole, provided Your use,
 
      reproduction, and distribution of the Work otherwise complies with
 
      the conditions stated in this License.
 

	
 
   5. Submission of Contributions. Unless You explicitly state otherwise,
 
      any Contribution intentionally submitted for inclusion in the Work
 
      by You to the Licensor shall be under the terms and conditions of
 
      this License, without any additional terms or conditions.
 
      Notwithstanding the above, nothing herein shall supersede or modify
 
      the terms of any separate license agreement you may have executed
 
      with Licensor regarding such Contributions.
 

	
 
   6. Trademarks. This License does not grant permission to use the trade
 
      names, trademarks, service marks, or product names of the Licensor,
 
      except as required for reasonable and customary use in describing the
 
      origin of the Work and reproducing the content of the NOTICE file.
 

	
 
   7. Disclaimer of Warranty. Unless required by applicable law or
 
      agreed to in writing, Licensor provides the Work (and each
 
      Contributor provides its Contributions) on an "AS IS" BASIS,
 
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 
      implied, including, without limitation, any warranties or conditions
 
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
 
      PARTICULAR PURPOSE. You are solely responsible for determining the
 
      appropriateness of using or redistributing the Work and assume any
 
      risks associated with Your exercise of permissions under this License.
 

	
 
   8. Limitation of Liability. In no event and under no legal theory,
 
      whether in tort (including negligence), contract, or otherwise,
 
      unless required by applicable law (such as deliberate and grossly
 
      negligent acts) or agreed to in writing, shall any Contributor be
 
      liable to You for damages, including any direct, indirect, special,
 
      incidental, or consequential damages of any character arising as a
 
      result of this License or out of the use or inability to use the
 
      Work (including but not limited to damages for loss of goodwill,
 
      work stoppage, computer failure or malfunction, or any and all
 
      other commercial damages or losses), even if such Contributor
 
      has been advised of the possibility of such damages.
 

	
 
   9. Accepting Warranty or Additional Liability. While redistributing
 
      the Work or Derivative Works thereof, You may choose to offer,
 
      and charge a fee for, acceptance of support, warranty, indemnity,
 
      or other liability obligations and/or rights consistent with this
 
      License. However, in accepting such obligations, You may act only
 
      on Your own behalf and on Your sole responsibility, not on behalf
 
      of any other Contributor, and only if You agree to indemnify,
 
      defend, and hold each Contributor harmless for any liability
 
      incurred by, or claims asserted against, such Contributor by reason
 
      of your accepting any such warranty or additional liability.
 

	
 
   END OF TERMS AND CONDITIONS
CONTRIBUTORS
Show inline comments
 
List of contributors to RhodeCode project:
 
List of contributors to Kallithea project:
 
    Marcin Kuźmiński <marcin@python-works.com>
 
    Lukasz Balcerzak <lukaszbalcerzak@gmail.com>
 
    Jason Harris <jason@jasonfharris.com>
 
@@ -37,4 +37,11 @@ List of contributors to RhodeCode projec
 
    Simon Lopez <simon.lopez@slopez.org>
 
    Jonathan Sternberg <jonathansternberg@gmail.com>
 
    Grzegorz Rożniecki <xaerxess@gmail.com>
 

	
 
    Andrew Kesterson <andrew@aklabs.net>
 
    David A. Sjøen <david.sjoen@westcon.no>
 
    Jelmer Vernooij <jelmer@samba.org>
 
    larikale
 
    SteveCohen
 
    Kallithea GmbH
 
    Sebastian Kreutzberger <sebastian@rhodecode.com>
 
    thomas <thomas@rhodecode.com>
LICENSE-MERGELY.html
Show inline comments
 
new file 100644
 
<!DOCTYPE html>
 
<html lang="en">
 
<!--[if IE]>
 
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 
<![endif]-->
 
<head>
 
	<meta charset="utf-8" /><title>Mergely License</title>
 
	<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
 
	<meta name="description" content="Mergely license requirements for open source software and commercial software" />
 
	<meta name="keywords" content="diff,merge,compare,compare documents,js diff,javascript diff,comparison,online diff,difference,file,text,unix,patch,algorithm,saas,longest common subsequence,diff online" />
 
	<meta name="author" content="Jamie Peabody" />
 
	<meta name="author" content="Jamie Peabody" />
 
	<link rel="shortcut icon" href="http://www.mergely.com/favicon.ico" />
 
    <link href='http://fonts.googleapis.com/css?family=Noto+Sans:400,700' rel='stylesheet' type='text/css' />
 
    <link href='fonts/berlin-sans-fb-demi.css' rel='stylesheet' type='text/css' />
 
    <link href='style/mergely.css' rel='stylesheet' type='text/css' />
 
    <link href='/Mergely/lib/mergely.css' rel='stylesheet' type='text/css' />
 
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
 
	<script type="text/javascript">
 
		var _gaq = _gaq || [];
 
		_gaq.push(['_setAccount', 'UA-85576-5']);
 
		_gaq.push(['_trackPageview']);
 
		(function() {
 
			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
 
			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
 
			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
 
		})();
 
	</script>
 
</head>
 
<body>
 
    <div id="page">
 
        <div id="content">
 
            <div id="header">
 
                <h1><span>Mergely License - Closed Distribution License</span></h1>
 
                <div id="options">
 
                    <a href="/editor" class="button">Online Diff</a>
 
                    <a href="/download" class="button">Download</a>
 
                </div>
 
                <nav>
 
                    <ul>
 
                        <li><a href="/">Home</a></li>                        <li><a href="/doc">Documentation</a></li>                        <li><a href="/about">About Mergely</a></li>                        <li><a href="/license">License</a></li>                        <li><a href="#footer">Contact</a></li>                    </ul>
 
                </nav>
 
            </div>
 

	
 
            <div id="main">
 
				<h1>Mergely License</h1>
 
				<p>
 
					All Mergely code is Copyright 2014 by Jamie Peabody.
 
					Mergely is distributed under the 
 
					<a href="http://www.gnu.org/licenses/gpl.html">GPL</a>, 
 
					<a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a>
 
					and 
 
					<a href="http://www.mozilla.org/MPL/MPL-1.1.html">MPL</a> open source licenses. 
 
					This triple <b>copyleft</b> licensing model avoids incompatibility with other open 
 
					source licenses. These open source licenses are specially indicated for:
 
					<ul>
 
						<li>Integrating Mergely into Open Source software;</li>
 
						<li>Personal and educational use of Mergely;</li>
 
						<li>
 
							Integrating Mergely in commercial software, taking care of satisfying 
 
							the Open Source licenses terms, while not able or interested on supporting 
 
							Mergely and its development.
 
						</li>
 
					</ul>
 
				</p>
 
				<h2>Mergely Commercial License - Closed Distribution License - CDL</h2>
 
				<p>
 
					You may contact <a href="mailto:jamie.peabody@gmail.com">Jamie Peabody</a> to enquire about
 
					obtaining a CDL license.
 
				</p>
 
				<p>
 
					This license offers a very flexible way to integrate Mergely in your commercial 
 
					application. These are the main advantages it offers over an Open Source license:
 
				</p>
 
				<p>
 
					Modifications and enhancements do not need to be released under an Open 
 
					Source license; There is no need to distribute any Open Source license terms 
 
					along with your product and no reference to it have to be done; You do not have
 
					to mention any reference to Mergely in your product; Mergely source code does not
 
					have to be distributed with your product; You can remove any file from Mergely 
 
					when integrating it with your product.
 
				</p>
 
				<p>
 
					The CDL is a lifetime license valid for all previous releases of Mergely published 
 
                    prior to the year of purchase, and any releases in the following year. Please select 
 
                    the license option that best fit your needs above. It includes 1 year of 
 
                    <b>personal e-mail support</b>.
 
				</p>
 
				<h2>Third party codes</h2>
 
				<p>
 
					Mergely utilizes <b>CodeMirror</b>, a third-party library released under an 
 
					<a href="http://en.wikipedia.org/wiki/MIT_License">MIT</a>
 
					license.  Also used is <b>jQuery</b> and is released under the 
 
					<a href="http://en.wikipedia.org/wiki/MIT_License">MIT</a> or 
 
					<a href="http://www.gnu.org/licenses/gpl.html">GPL</a> Version 2 license.
 
				</p>
 
            </div>
 
            
 
            <div id="footer">
 
                <a href="/download" class="download">Download</a>
 
                <ul>
 
                    <li id="google-plus"><a target="_blank" href="http://groups.google.com/group/mergely">http://groups.google.com/group/mergely</a></li>
 
                    <li id="github"><a target="_blank" href="https://github.com/wickedest/Mergely">https://github.com/wickedest/Mergely</a></li>
 
                    <li id="email"><a target="_blank" href="mailto:jamie.peabody@gmail.com">jamie.peabody@gmail.com</a></li>
 
                </ul>
 
            </div>
 
        </div>
 
        <div id="copyright">By <b>Jamie Peabody</b></div>
 
    </div>
 
</body>
 
</html>
LICENSE.md
Show inline comments
 
new file 100644
 
Kallithea License
 
=================
 

	
 
Kallithea as a whole is copyrighted by various authors and is licensed under
 
the terms of the GNU General Public License, version 3 (GPLv3), which is a
 
license published by the Free Software Foundation,
 
Inc. [A copy of GPLv3](/COPYING) is included herein.
 

	
 
Some individual files have copyright notices and those who offer changes to
 
those files should update the copyright notices in those specific files if
 
they so chose.
 

	
 
However, the definitive list of copyright holders for this project is kept in
 
[the about page template](kallithea/templates/about.html) so that it is
 
displayed appropriately when Kallithea is installed.  This is the most
 
important place to update copyright notices. 
 

	
 
Third-Party Code Incorporated in Kallithea
 
==========================================
 

	
 
Various third-party code under GPLv3-compatible licenses is included as part
 
of Kallithea.
 

	
 

	
 

	
 
Bootstrap
 
---------
 

	
 
Kallithea incorporates parts of the Javascript system called
 
[Bootstrap](http://getbootstrap.com/), which is:
 

	
 
Copyright &copy; 2012 Twitter, Inc.
 

	
 
and licensed under
 
[the Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).
 

	
 
A copy of the Apache License 2.0 is also included in this distribution in its
 
entirety in the file Apache-License-2.0.txt
 

	
 

	
 

	
 
Codemirror
 
----------
 

	
 
Kallithea incorporates parts of the Javascript system called
 
[Codemirror](http://codemirror.net/), which is primarily:
 

	
 
Copyright &copy; 2013 by Marijn Haverbeke <marijnh@gmail.com>
 

	
 
and licensed under the MIT-permissive license, which is
 
[included in this distribution](MIT-Permissive-License.txt).
 

	
 
Additional files from upstream Codemirror are copyrighted by various authors
 
and licensed under other permissive licenses.  The sub-directories under
 
[.../public/js/mode/](kallithea/public/js/mode) include the copyright and
 
license notice and information as they appeared in Codemirror's upstream
 
release.
 

	
 

	
 

	
 
jQuery
 
------
 

	
 
Kallithea incorporates the Javascript system called
 
[jQuery](http://jquery.org/),
 
[herein](kallithea/public/js/jquery-1.10.2.min.js), and the Corresponding
 
Source can be found in https://github.com/jquery/jquery at tag 1.10.2
 
(mirrored at https://kallithea-scm.org/repos/mirror/jquery/files/1.10.2/ ).
 

	
 
It is Copyright 2013 jQuery Foundation and other contributors http://jquery.com/ and is under an
 
[MIT-permissive license](MIT-Permissive-License.txt).
 

	
 

	
 

	
 
Mousetrap
 
---------
 

	
 
Kallithea incorporates parts of the Javascript system called
 
[Mousetrap](http://craig.is/killing/mice/), which is:
 

	
 
   Copyright 2013 Craig Campbell
 

	
 
and licensed under
 
[the Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).
 

	
 
A [copy of the Apache License 2.0](Apache-License-2.0.txt) is also included
 
in this distribution.
 

	
 

	
 

	
 
Mergely
 
-------
 

	
 
Kallithea incorporates some code from the Javascript system called
 
[Mergely](http://http://www.mergely.com/).
 
[Mergely's license](http://www.mergely.com/license.php), a
 
[copy of which is included in this repository](LICENSE-MERGELY.html),
 
is (GPL|LGPL|MPL).  Kallithea as GPLv3'd project chooses the GPL arm of that
 
tri-license.
 

	
 

	
 

	
 
Select2
 
-------
 

	
 
Kallithea incorporates parts of the Javascript system called
 
[Select2](http://ivaynberg.github.io/select2/), which is:
 

	
 
Copyright 2012 Igor Vaynberg (and probably others)
 

	
 
and is licensed [under the following license](https://github.com/ivaynberg/select2/blob/master/LICENSE):
 

	
 
> This software is licensed under the Apache License, Version 2.0 (the
 
> "Apache License") or the GNU General Public License version 2 (the "GPL
 
> License"). You may choose either license to govern your use of this
 
> software only upon the condition that you accept all of the terms of either
 
> the Apache License or the GPL License.
 

	
 
A [copy of the Apache License 2.0](Apache-License-2.0.txt) is also included
 
in this distribution.
 

	
 
Kallithea will take the Apache license fork of the dual license, since
 
Kallithea is GPLv3'd.
 

	
 

	
 

	
 
Select2-Bootstrap-CSS
 
---------------------
 

	
 
Kallithea incorporates some CSS from a system called
 
[Select2-bootstrap-css](https://github.com/t0m/select2-bootstrap-css), which
 
is:
 

	
 
Copyright &copy; 2013 Tom Terrace (and likely others)
 

	
 
and licensed under the MIT-permissive license, which is
 
[included in this distribution](MIT-Permissive-License.txt).
 

	
 

	
 

	
 
History.js
 
----------
 

	
 
Kallithea incorporates some CSS from a system called History.js, which is
 

	
 
Copyright 2010-2011 Benjamin Arthur Lupton <contact@balupton.com>
 

	
 
Redistribution and use in source and binary forms, with or without
 
modification, are permitted provided that the following conditions are met:
 

	
 
1. Redistributions of source code must retain the above copyright notice,
 
   this list of conditions and the following disclaimer.
 

	
 
2. Redistributions in binary form must reproduce the above copyright notice,
 
   this list of conditions and the following disclaimer in the documentation
 
   and/or other materials provided with the distribution.
 

	
 
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 
POSSIBILITY OF SUCH DAMAGE.
 

	
 

	
 

	
 
YUI
 
---
 

	
 
Kallithea incorporates parts of the Javascript system called
 
[YUI 2 — Yahoo! User Interface Library](http://yui.github.io/yui2/docs/yui_2.9.0_full/),
 
which is made available under the [BSD License](http://yuilibrary.com/license/):
 

	
 
Copyright &copy; 2013 Yahoo! Inc. All rights reserved.
 

	
 
Redistribution and use of this software in source and binary forms, with or
 
without modification, are permitted provided that the following conditions are
 
met:
 

	
 
* Redistributions of source code must retain the above copyright notice, this
 
  list of conditions and the following disclaimer.
 

	
 
* Redistributions in binary form must reproduce the above copyright notice,
 
  this list of conditions and the following disclaimer in the documentation
 
  and/or other materials provided with the distribution.
 

	
 
* Neither the name of Yahoo! Inc. nor the names of YUI's contributors may be
 
  used to endorse or promote products derived from this software without
 
  specific prior written permission of Yahoo! Inc.
 

	
 
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
 
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 

	
 

	
 
Kallithea includes a minified version of YUI 2.9. To build yui.2.9.js:
 

	
 
    git clone https://github.com/yui/builder
 
    git clone https://github.com/yui/yui2
 
    cd yui2/
 
    git checkout hudson-yui2-2800
 
    ln -sf JumpToPageDropDown.js src/paginator/js/JumpToPageDropdown.js # work around inconsistent casing
 
    rm -f tmp.js
 
    for m in yahoo event dom connection animation dragdrop element datasource autocomplete container event-delegate json datatable paginator; do
 
      rm -f build/\$m/\$m.js
 
      ( cd src/\$m && ant build deploybuild ) && sed -e 's,@VERSION@,2.9.0,g' -e 's,@BUILD@,2800,g' build/\$m/\$m.js >> tmp.js
 
    done
 
    java -jar ../builder/componentbuild/lib/yuicompressor/yuicompressor-2.4.4.jar tmp.js -o yui.2.9.js
 

	
 
In compliance with GPLv3 the Corresponding Source for this Object Code is made
 
available on
 
[https://kallithea-scm.org/repos/mirror](https://kallithea-scm.org/repos/mirror).
 

	
 

	
 

	
 
Flot
 
----
 

	
 
Kallithea incorporates some CSS from a system called
 
[Flot](http://code.google.com/p/flot/), which is:
 

	
 
Copyright 2006 Google Inc.
 

	
 
Licensed under the Apache License, Version 2.0 (the "License");
 
you may not use this file except in compliance with the License.
 

	
 
A [copy of the Apache License 2.0](Apache-License-2.0.txt) is also included
 
in this distribution.
 

	
 

	
 

	
 
Migrate
 
-------
 

	
 
Kallithea incorporates in kallithea/lib/dbmigrate/migrate parts of the Python
 
system called [Migrate or sqlalchemy-migrate](https://github.com/stackforge/sqlalchemy-migrate),
 
which is:
 

	
 
Copyright (c) 2009 Evan Rosson, Jan Dittberner, Domen Kožar
 

	
 
and licensed under the MIT-permissive license, which is
 
[included in this distribution](MIT-Permissive-License.txt).
 

	
 

	
 

	
 
EOF
MANIFEST.in
Show inline comments
 
include rhodecode/config/deployment.ini_tmpl
 
include rhodecode/lib/dbmigrate/migrate.cfg
 
include kallithea/config/deployment.ini_tmpl
 
include kallithea/lib/dbmigrate/migrate.cfg
 

	
 
include README.rst
 
recursive-include rhodecode/i18n *
 
recursive-include kallithea/i18n *
 

	
 
#docs
 
recursive-include docs *
 
@@ -11,9 +11,9 @@ recursive-include docs *
 
recursive-include init.d *
 

	
 
#images
 
recursive-include rhodecode/public/css *
 
recursive-include rhodecode/public/images *
 
recursive-include kallithea/public/css *
 
recursive-include kallithea/public/images *
 
#js
 
recursive-include rhodecode/public/js *
 
recursive-include kallithea/public/js *
 
#templates
 
recursive-include rhodecode/templates *
 
recursive-include kallithea/templates *
MIT-Permissive-License.txt
Show inline comments
 
new file 100644
 
Permission is hereby granted, free of charge, to any person obtaining a copy
 
of this software and associated documentation files (the "Software"), to deal
 
in the Software without restriction, including without limitation the rights
 
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 
copies of the Software, and to permit persons to whom the Software is
 
furnished to do so, subject to the following conditions:
 

	
 
The above copyright notice and this permission notice shall be included in
 
all copies or substantial portions of the Software.
 

	
 
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 
SOFTWARE.
README.rst
Show inline comments
 
=========
 
RhodeCode
 
Kallithea
 
=========
 

	
 
About
 
-----
 

	
 
``RhodeCode`` is a fast and powerful management tool for Mercurial_ and GIT_
 
``Kallithea`` is a fast and powerful management tool for Mercurial_ and GIT_
 
with a built in push/pull server, full text search and code-review.
 
It works on http/https and has a built in permission/authentication system with
 
the ability to authenticate via LDAP or ActiveDirectory. RhodeCode also provides
 
the ability to authenticate via LDAP or ActiveDirectory. Kallithea also provides
 
simple API so it's easy integrable with existing external systems.
 

	
 
RhodeCode is similar in some respects to github_ or bitbucket_,
 
however RhodeCode can be run as standalone hosted application on your own server.
 
Kallithea is similar in some respects to github_ or bitbucket_,
 
however Kallithea can be run as standalone hosted application on your own server.
 
It is open source and donation ware and focuses more on providing a customized,
 
self administered interface for Mercurial_ and GIT_  repositories.
 
RhodeCode works on \*nix systems and Windows it is powered by a vcs_ library
 
Kallithea works on \*nix systems and Windows it is powered by a vcs_ library
 
that Lukasz Balcerzak and Marcin Kuzminski created to handle multiple
 
different version control systems.
 

	
 
RhodeCode uses `PEP386 versioning <http://www.python.org/dev/peps/pep-0386/>`_
 
Kallithea was forked from RhodeCode in July 2014 and has been heavily modified.
 

	
 
Installation
 
------------
 
Stable releases of RhodeCode are best installed via::
 
Stable releases of Kallithea are best installed via::
 

	
 
    easy_install rhodecode
 
    easy_install kallithea
 

	
 
Or::
 

	
 
    pip install rhodecode
 
    pip install kallithea
 

	
 
Detailed instructions and links may be found on the Installation page.
 

	
 
Please visit http://packages.python.org/RhodeCode/installation.html for
 
Please visit http://packages.python.org/Kallithea/installation.html for
 
more details
 

	
 
RhodeCode demo
 
--------------
 

	
 
http://demo.rhodecode.org
 

	
 
The default access is anonymous but you can login to an administrative account
 
using the following credentials:
 

	
 
- username: demo
 
- password: demo12
 

	
 
Source code
 
-----------
 

	
 
The latest sources can be obtained from official RhodeCode instance
 
https://secure.rhodecode.org
 
The latest sources can be obtained from https://kallithea-scm.org/repos/kallithea
 

	
 

	
 
MIRRORS:
 

	
 
Issue tracker and sources at bitbucket_
 

	
 
http://bitbucket.org/marcinkuzminski/rhodecode
 

	
 
Sources at github_
 

	
 
https://github.com/marcinkuzminski/rhodecode
 
https://bitbucket.org/conservancy/kallithea
 

	
 

	
 
RhodeCode Features
 

	
 
Kallithea Features
 
------------------
 

	
 
- Has its own middleware to handle mercurial_ and git_ protocol requests.
 
@@ -82,7 +68,7 @@ RhodeCode Features
 
- Built in Gist functionality for sharing code snippets.
 
- Integrates easily with other systems, with custom created mappers you can connect it to almost
 
  any issue tracker, and with an JSON-RPC API you can make much more
 
- Build in commit-api let's you add, edit and commit files right from RhodeCode
 
- Build in commit-api let's you add, edit and commit files right from Kallithea
 
  web interface using simple editor or upload binary files using simple form.
 
- Powerfull pull-request driven review system with inline commenting,
 
  changeset statuses, and notification system.
 
@@ -127,7 +113,7 @@ Incoming / Plans
 
License
 
-------
 

	
 
``RhodeCode`` is released under the GPLv3 license.
 
``Kallithea`` is released under the GPLv3 license.
 

	
 

	
 
Getting help
 
@@ -140,24 +126,20 @@ Listed bellow are various support resour
 
   Please try to read the documentation before posting any issues, especially
 
   the **troubleshooting section**
 

	
 
- Join the `Google group <http://groups.google.com/group/rhodecode>`_ and ask
 
  any questions.
 

	
 
- Open an issue at `issue tracker <http://bitbucket.org/marcinkuzminski/rhodecode/issues>`_
 
- Open an issue at `issue tracker <https://bitbucket.org/conservancy/kallithea/issues>`_
 

	
 
- Join #rhodecode on FreeNode (irc.freenode.net)
 
  or use http://webchat.freenode.net/?channels=rhodecode for web access to irc.
 
- Join #kallithea on FreeNode (irc.freenode.net)
 
  or use http://webchat.freenode.net/?channels=kallithea for web access to irc.
 

	
 
- You can also follow me on twitter **@marcinkuzminski** where i often post some
 
  news about RhodeCode
 
You can follow this project on Twitter, **@KallitheaSCM**.
 

	
 

	
 
Online documentation
 
--------------------
 

	
 
Online documentation for the current version of RhodeCode is available at
 
 - http://packages.python.org/RhodeCode/
 
 - http://rhodecode.readthedocs.org/en/latest/index.html
 
Online documentation for the current version of Kallithea is available at
 
 - http://packages.python.org/Kallithea/
 
 - http://kallithea.readthedocs.org/
 

	
 
You may also build the documentation for yourself - go into ``docs/`` and run::
 

	
 
@@ -167,6 +149,50 @@ You may also build the documentation for
 
have sphinx_ installed you can install it via the command:
 
``easy_install sphinx``)
 

	
 

	
 
Converting from RhodeCode
 
-------------------------
 

	
 
Currently, you have two options for working with an existing RhodeCode database:
 
 - keep the database unconverted (intended for testing and evaluation)
 
 - convert the database in a one-time step
 

	
 
Maintaining Interoperability
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Interoperability with RhodeCode 2.2.5 installations is provided so you don't
 
have to immediately commit to switching to Kallithea. This option will most
 
likely go away once the two projects have diverged significantly.
 

	
 
To run Kallithea on a Rhodecode database, run::
 

	
 
   echo "BRAND = 'rhodecode'" > kallithea/brand.py
 

	
 
This location will depend on where you installed Kallithea. If you installed via::
 

	
 
   python setup.py install
 

	
 
then you will find this location at
 
``$VIRTUAL_ENV/lib/python2.7/site-packages/Kallithea-2.2.5-py2.7.egg/kallithea``
 

	
 
One-time Conversion
 
~~~~~~~~~~~~~~~~~~~
 

	
 
Alternatively, if you would like to convert the database for good, you can use
 
a helper script provided by Kallithea. This script will operate directly on the
 
database, using the database string you can find in your ``production.ini`` (or
 
``development.ini``) file. For example, if using SQLite::
 

	
 
   cd /path/to/kallithea
 
   cp /path/to/rhodecode/rhodecode.db kallithea.db
 
   pip install sqlalchemy-migrate
 
   python kallithea/bin/rebranddb.py sqlite:///kallithea.db
 

	
 
.. WARNING::
 

	
 
   If you used the other method for interoperability, overwrite brand.py with
 
   an empty file (or watch out for stray brand.pyc after removing brand.py).
 

	
 
.. _virtualenv: http://pypi.python.org/pypi/virtualenv
 
.. _python: http://www.python.org/
 
.. _sphinx: http://sphinx.pocoo.org/
development.ini
Show inline comments
 
################################################################################
 
################################################################################
 
# RhodeCode - Pylons environment configuration                                 #
 
# Kallithea - Development config:                                              #
 
# listening on *:5000                                                          #
 
# sqlite and kallithea.db                                                      #
 
# initial_repo_scan = true                                                     #
 
# set debug = true                                                             #
 
# verbose and colorful logging                                                 #
 
#                                                                              #
 
# The %(here)s variable will be replaced with the parent directory of this file#
 
################################################################################
 
################################################################################
 

	
 
[DEFAULT]
 
debug = true
 
pdebug = false
 

	
 
################################################################################
 
## Uncomment and replace with the address which should receive                ##
 
## any error reports after application crash                                  ##
 
## Additionally those settings will be used by RhodeCode mailing system       ##
 
## Additionally those settings will be used by Kallithea mailing system       ##
 
################################################################################
 
#email_to = admin@localhost
 
#error_email_from = paste_error@localhost
 
#app_email_from = rhodecode-noreply@localhost
 
#app_email_from = kallithea-noreply@localhost
 
#error_message =
 
#email_prefix = [RhodeCode]
 
#email_prefix = [Kallithea]
 

	
 
#smtp_server = mail.server.com
 
#smtp_username =
 
@@ -54,11 +61,11 @@ max_request_body_size = 107374182400
 
## is set to more than one worker
 
#workers = 1
 
## process name
 
#proc_name = rhodecode
 
#proc_name = kallithea
 
## type of worker class, one of sync, eventlet, gevent, tornado
 
## recommended for bigger setup is using of of other than sync one
 
#worker_class = sync
 
#max_requests = 5
 
#max_requests = 1000
 
## ammount of time a worker can handle request before it gets killed and
 
## restarted
 
#timeout = 3600
 
@@ -68,13 +75,13 @@ max_request_body_size = 107374182400
 
#[uwsgi]
 
#socket = /tmp/uwsgi.sock
 
#master = true
 
#http = 0.0.0.0:5000
 
#http = 127.0.0.1:5000
 

	
 
## set as deamon and redirect all output to file
 
#daemonize = ./uwsgi_rhodecode.log
 
#daemonize = ./uwsgi_kallithea.log
 

	
 
## master process PID
 
#pidfile = ./uwsgi_rhodecode.pid
 
#pidfile = ./uwsgi_kallithea.pid
 

	
 
## stats server with workers statistics, use uwsgitop
 
## for monitoring, `uwsgitop 127.0.0.1:1717`
 
@@ -133,27 +140,28 @@ port = 5000
 
#prefix = /<your-prefix>
 

	
 
[app:main]
 
use = egg:rhodecode
 
use = egg:kallithea
 
## enable proxy prefix middleware
 
#filter-with = proxy-prefix
 

	
 
full_stack = true
 
static_files = true
 
## Optional Languages
 
## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
 
## Available Languages:
 
## de en fr ja pl pt_BR ru zh_CN zh_TW
 
lang = en
 
cache_dir = %(here)s/data
 
index_dir = %(here)s/data/index
 

	
 
## perform a full repository scan on each server start, this should be
 
## set to false after first startup, to allow faster server restarts.
 
#initial_repo_scan = false
 
initial_repo_scan = true
 

	
 
## uncomment and set this path to use archive download cache
 
#archive_cache_dir = /tmp/tarballcache
 
archive_cache_dir = %(here)s/tarballcache
 

	
 
## change this to unique ID for security
 
app_instance_uuid = rc-production
 
app_instance_uuid = development-not-secret
 

	
 
## cut off limit for large diffs (size in bytes)
 
cut_off_limit = 256000
 
@@ -161,7 +169,7 @@ cut_off_limit = 256000
 
## use cache version of scm repo everywhere
 
vcs_full_cache = true
 

	
 
## force https in RhodeCode, fixes https redirects, assumes it's always https
 
## force https in Kallithea, fixes https redirects, assumes it's always https
 
force_https = false
 

	
 
## use Strict-Transport-Security headers
 
@@ -178,7 +186,7 @@ git_path = git
 

	
 
## git rev filter option, --all is the default filter, if you need to
 
## hide all refs in changelog switch this to --branches --tags
 
git_rev_filter=--all
 
#git_rev_filter = --branches --tags
 

	
 
## RSS feed options
 
rss_cut_off_limit = 256000
 
@@ -191,8 +199,8 @@ show_revision_number = true
 

	
 
## gist URL alias, used to create nicer urls for gist. This should be an
 
## url that does rewrites to _admin/gists/<gistid>.
 
## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
 
## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid>
 
## example: http://gist.kallithea.server/{gistid}. Empty means use the internal
 
## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid>
 
gist_alias_url =
 

	
 
## white list of API enabled controllers. This allows to add list of
 
@@ -200,7 +208,7 @@ gist_alias_url =
 
## api access to raw_files put `FilesController:raw`, to enable access to patches
 
## add `ChangesetController:changeset_patch`. This list should be "," separated
 
## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
 
## Recommended settings bellow are commented out:
 
## Recommended settings below are commented out:
 
api_access_controllers_whitelist =
 
#    ChangesetController:changeset_patch,
 
#    ChangesetController:changeset_raw,
 
@@ -212,8 +220,8 @@ api_access_controllers_whitelist =
 
## {email}        user email
 
## {md5email}     md5 hash of the user email (like at gravatar.com)
 
## {size}         size of the image that is expected from the server application
 
## {scheme}       http/https from RhodeCode server
 
## {netloc}       network location from RhodeCode server
 
## {scheme}       http/https from Kallithea server
 
## {netloc}       network location from Kallithea server
 
#alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
 
#alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
 

	
 
@@ -236,8 +244,8 @@ default_encoding = utf8
 

	
 
#clone_uri = {scheme}://{user}{pass}{netloc}{path}
 

	
 
## issue tracker for RhodeCode (leave blank to disable, absent for default)
 
#bugtracker = http://bitbucket.org/marcinkuzminski/rhodecode/issues
 
## issue tracker for Kallithea (leave blank to disable, absent for default)
 
#bugtracker = https://bitbucket.org/conservancy/kallithea/issues
 

	
 
## issue tracking mapping for commits messages
 
## comment out issue_pat, issue_server, issue_prefix to enable
 
@@ -262,7 +270,7 @@ issue_prefix = #
 
## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
 
## multiple patterns, to other issues server, wiki or others
 
## below an example how to create a wiki pattern
 
#  #wiki-some-id -> https://mywiki.com/some-id
 
# wiki-some-id -> https://mywiki.com/some-id
 

	
 
#issue_pat_wiki = (?:wiki-)(.+)
 
#issue_server_link_wiki = https://mywiki.com/{id}
 
@@ -271,8 +279,8 @@ issue_prefix = #
 

	
 
## instance-id prefix
 
## a prefix key for this instance used for cache invalidation when running
 
## multiple instances of rhodecode, make sure it's globally unique for
 
## all running rhodecode instances. Leave empty if you don't use it
 
## multiple instances of kallithea, make sure it's globally unique for
 
## all running kallithea instances. Leave empty if you don't use it
 
instance_id =
 

	
 
## alternative return HTTP header for failed authentication. Default HTTP
 
@@ -294,6 +302,7 @@ allow_custom_hooks_settings = True
 
####################################
 
###        CELERY CONFIG        ####
 
####################################
 

	
 
use_celery = false
 
broker.host = localhost
 
broker.vhost = rabbitmqhost
 
@@ -301,7 +310,7 @@ broker.port = 5672
 
broker.user = rabbitmq
 
broker.password = qweqwe
 

	
 
celery.imports = rhodecode.lib.celerylib.tasks
 
celery.imports = kallithea.lib.celerylib.tasks
 

	
 
celery.result.backend = amqp
 
celery.result.dburi = amqp://
 
@@ -321,6 +330,7 @@ celery.always.eager = false
 
####################################
 
###         BEAKER CACHE        ####
 
####################################
 

	
 
beaker.cache.data_dir=%(here)s/data/cache/data
 
beaker.cache.lock_dir=%(here)s/data/cache/lock
 

	
 
@@ -360,7 +370,7 @@ beaker.cache.sql_cache_long.key_length =
 

	
 
## db session ##
 
#beaker.session.type = ext:database
 
#beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
 
#beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
 
#beaker.session.table_name = db_session
 

	
 
## encrypted cookie client side session, good for many instances ##
 
@@ -369,8 +379,8 @@ beaker.cache.sql_cache_long.key_length =
 
## file based cookies (default) ##
 
#beaker.session.type = file
 

	
 
beaker.session.key = rhodecode
 
beaker.session.secret = develop-rc-uytcxaz
 
beaker.session.key = kallithea
 
beaker.session.secret = development-not-secret
 

	
 
## Secure encrypted cookie. Requires AES and AES python libraries
 
## you must disable beaker.session.secret to use this
 
@@ -400,7 +410,7 @@ beaker.session.auto = False
 
### [errormator] ###
 
####################
 

	
 
## Errormator is tailored to work with RhodeCode, see
 
## Errormator is tailored to work with Kallithea, see
 
## http://errormator.com for details how to obtain an account
 
## you must install python package `errormator_client` to make it work
 

	
 
@@ -479,10 +489,12 @@ sentry.exclude_paths =
 
## execute malicious code after an exception is raised.                       ##
 
################################################################################
 
#set debug = false
 
set debug = true
 

	
 
##################################
 
###       LOGVIEW CONFIG       ###
 
##################################
 

	
 
logview.sqlalchemy = #faa
 
logview.pylons.templating = #bfb
 
logview.pylons.util = #eee
 
@@ -490,9 +502,18 @@ logview.pylons.util = #eee
 
#########################################################
 
### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG    ###
 
#########################################################
 
#sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
 
sqlalchemy.db1.url = postgresql://postgres:qweqwe@localhost/rhodecode
 
#sqlalchemy.db1.url = mysql://root:qweqwe@localhost/rhodecode
 

	
 
# SQLITE [default]
 
sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
 

	
 
# POSTGRESQL
 
# sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
 

	
 
# MySQL
 
# sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
 

	
 
# see sqlalchemy docs for others
 

	
 
sqlalchemy.db1.echo = false
 
sqlalchemy.db1.pool_recycle = 3600
 
sqlalchemy.db1.convert_unicode = true
 
@@ -500,8 +521,9 @@ sqlalchemy.db1.convert_unicode = true
 
################################
 
### LOGGING CONFIGURATION   ####
 
################################
 

	
 
[loggers]
 
keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
 
keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
 

	
 
[handlers]
 
keys = console, console_sql
 
@@ -512,6 +534,7 @@ keys = generic, color_formatter, color_f
 
#############
 
## LOGGERS ##
 
#############
 

	
 
[logger_root]
 
level = NOTSET
 
handlers = console
 
@@ -535,10 +558,10 @@ handlers =
 
qualname = pylons.templating
 
propagate = 1
 

	
 
[logger_rhodecode]
 
[logger_kallithea]
 
level = DEBUG
 
handlers =
 
qualname = rhodecode
 
qualname = kallithea
 
propagate = 1
 

	
 
[logger_sqlalchemy]
 
@@ -560,12 +583,16 @@ propagate = 1
 
[handler_console]
 
class = StreamHandler
 
args = (sys.stderr,)
 
#level = INFO
 
#formatter = generic
 
level = DEBUG
 
formatter = color_formatter
 

	
 
[handler_console_sql]
 
class = StreamHandler
 
args = (sys.stderr,)
 
#level = WARN
 
#formatter = generic
 
level = DEBUG
 
formatter = color_formatter_sql
 

	
 
@@ -578,11 +605,11 @@ format = %(asctime)s.%(msecs)03d %(level
 
datefmt = %Y-%m-%d %H:%M:%S
 

	
 
[formatter_color_formatter]
 
class=rhodecode.lib.colored_formatter.ColorFormatter
 
class=kallithea.lib.colored_formatter.ColorFormatter
 
format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
 

	
 
[formatter_color_formatter_sql]
 
class=rhodecode.lib.colored_formatter.ColorFormatterSql
 
class=kallithea.lib.colored_formatter.ColorFormatterSql
 
format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
docs/Makefile
Show inline comments
 
@@ -72,17 +72,17 @@ qthelp:
 
	@echo
 
	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
 
	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
 
	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/RhodeCode.qhcp"
 
	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Kallithea.qhcp"
 
	@echo "To view the help file:"
 
	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/RhodeCode.qhc"
 
	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Kallithea.qhc"
 

	
 
devhelp:
 
	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
 
	@echo
 
	@echo "Build finished."
 
	@echo "To view the help file:"
 
	@echo "# mkdir -p $$HOME/.local/share/devhelp/RhodeCode"
 
	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/RhodeCode"
 
	@echo "# mkdir -p $$HOME/.local/share/devhelp/Kallithea"
 
	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Kallithea"
 
	@echo "# devhelp"
 

	
 
epub:
docs/api/api.rst
Show inline comments
 
@@ -5,15 +5,15 @@ API
 
===
 

	
 

	
 
Starting from RhodeCode version 1.2 a simple API was implemented.
 
Starting from Kallithea version 1.2 a simple API was implemented.
 
There's a single schema for calling all api methods. API is implemented
 
with JSON protocol both ways. An url to send API request to RhodeCode is
 
with JSON protocol both ways. An url to send API request to Kallithea is
 
<your_server>/_admin/api
 

	
 
API ACCESS FOR WEB VIEWS
 
++++++++++++++++++++++++
 

	
 
API access can also be turned on for each web view in RhodeCode that is
 
API access can also be turned on for each web view in Kallithea that is
 
decorated with `@LoginRequired` decorator. To enable API access simple change
 
the standard login decorator to `@LoginRequired(api_access=True)`.
 

	
 
@@ -21,7 +21,7 @@ To make this operation easier, starting 
 
of views that will have API access enabled. Simply edit `api_access_controllers_whitelist`
 
option in your .ini file, and define views that should have API access enabled.
 
Following example shows how to enable API access to patch/diff raw file and archive
 
in RhodeCode::
 
in Kallithea::
 

	
 
    api_access_controllers_whitelist =
 
        ChangesetController:changeset_patch,
 
@@ -30,7 +30,7 @@ in RhodeCode::
 
        FilesController:archivefile
 

	
 

	
 
After this change, a rhodecode view can be accessed without login by adding a
 
After this change, a Kallithea view can be accessed without login by adding a
 
GET parameter `?api_key=<api_key>` to url. By default this is only
 
enabled on RSS/ATOM feed views. Exposing raw diffs is a good way to integrate with
 
3rd party services like code review, or build farms that could download archives.
 
@@ -62,7 +62,7 @@ Simply provide
 
    api_key can be found in your user account page
 

	
 

	
 
RhodeCode API will return always a JSON-RPC response::
 
Kallithea API will return always a JSON-RPC response::
 

	
 
    {
 
        "id":<id>, # matching id sent by request
 
@@ -78,13 +78,13 @@ and result will be null.
 
API CLIENT
 
++++++++++
 

	
 
From version 1.4 RhodeCode adds a script that allows to easily
 
communicate with API. After installing RhodeCode a `rhodecode-api` script
 
From version 1.4 Kallithea adds a script that allows to easily
 
communicate with API. After installing Kallithea a `kallithea-api` script
 
will be available.
 

	
 
To get started quickly simply run::
 

	
 
  rhodecode-api _create_config --apikey=<youapikey> --apihost=<rhodecode host>
 
  kallithea-api _create_config --apikey=<youapikey> --apihost=<your.kallithea.server>
 

	
 
This will create a file named .config in the directory you executed it storing
 
json config file with credentials. You can skip this step and always provide
 
@@ -93,10 +93,10 @@ both of the arguments to be able to comm
 

	
 
after that simply run any api command for example get_repo::
 

	
 
 rhodecode-api get_repo
 
 kallithea-api get_repo
 

	
 
 calling {"api_key": "<apikey>", "id": 75, "args": {}, "method": "get_repo"} to http://127.0.0.1:5000
 
 rhodecode said:
 
 Kallithea said:
 
 {'error': 'Missing non optional `repoid` arg in JSON DATA',
 
  'id': 75,
 
  'result': None}
 
@@ -105,10 +105,10 @@ Ups looks like we forgot to add an argum
 

	
 
Let's try again now giving the repoid as parameters::
 

	
 
    rhodecode-api get_repo repoid:rhodecode
 
    kallithea-api get_repo repoid:myrepo
 

	
 
    calling {"api_key": "<apikey>", "id": 39, "args": {"repoid": "rhodecode"}, "method": "get_repo"} to http://127.0.0.1:5000
 
    rhodecode said:
 
    calling {"api_key": "<apikey>", "id": 39, "args": {"repoid": "myrepo"}, "method": "get_repo"} to http://127.0.0.1:5000
 
    Kallithea said:
 
    {'error': None,
 
     'id': 39,
 
     'result': <json data...>}
 
@@ -146,7 +146,7 @@ rescan_repos
 
------------
 

	
 
Dispatch rescan repositories action. If remove_obsolete is set
 
RhodeCode will delete repos that are in database but not in the filesystem.
 
Kallithea will delete repos that are in database but not in the filesystem.
 
This command can be executed only using api_key belonging to user with admin
 
rights.
 

	
 
@@ -225,7 +225,7 @@ OUTPUT::
 
show_ip
 
-------
 

	
 
Shows IP address as seen from RhodeCode server, together with all
 
Shows IP address as seen from Kallithea server, together with all
 
defined IP addresses for given user.
 
This command can be executed only using api_key belonging to user with admin
 
rights.
docs/api/models.rst
Show inline comments
 
@@ -4,32 +4,32 @@
 
The :mod:`models` Module
 
========================
 

	
 
.. automodule:: rhodecode.model
 
.. automodule:: kallithea.model
 
   :members:
 

	
 
.. automodule:: rhodecode.model.comment
 
.. automodule:: kallithea.model.comment
 
   :members:
 

	
 
.. automodule:: rhodecode.model.notification
 
.. automodule:: kallithea.model.notification
 
   :members:
 

	
 
.. automodule:: rhodecode.model.permission
 
.. automodule:: kallithea.model.permission
 
   :members:
 

	
 
.. automodule:: rhodecode.model.repo_permission
 
.. automodule:: kallithea.model.repo_permission
 
   :members:
 

	
 
.. automodule:: rhodecode.model.repo
 
.. automodule:: kallithea.model.repo
 
   :members:
 

	
 
.. automodule:: rhodecode.model.repos_group
 
.. automodule:: kallithea.model.repo_group
 
   :members:
 

	
 
.. automodule:: rhodecode.model.scm
 
.. automodule:: kallithea.model.scm
 
   :members:
 

	
 
.. automodule:: rhodecode.model.user
 
.. automodule:: kallithea.model.user
 
   :members:
 

	
 
.. automodule:: rhodecode.model.users_group
 
.. automodule:: kallithea.model.user_group
 
   :members:
docs/changelog.rst
Show inline comments
 
@@ -4,1225 +4,6 @@
 
Changelog
 
=========
 

	
 

	
 
1.7.2 (**2013-07-XX**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- Added handling of copied files in diffs
 
- Implemented issue #387 side-by-side diffs view
 
- Added option to specify other than official bugtracker url to post issues
 
  with RhodeCode.
 
- Markdown renderer now uses github flavored syntax with a better newline handling
 
- Added User pre-create, create and delete hooks for rcextensions.
 
- Branch selectors: show closed branches too for Mercurial
 
- Updated codemirror to latest version and added syntax coloring dropdown for
 
  various languages CodeMirror supports
 
- Added --no-public-access / --public-access flags into setup-rhodecode
 
  command to enable setup without public access
 
- Various small updates to pull requests
 
- Bumped Mercurial version to latest
 
- Diffs view doesn't show content of delete files anymore.
 

	
 
fixes
 
+++++
 

	
 
- Added missing __get_cs_or_redirect method for file history.
 
  Fixes issue with displaying a history of file that is not present at tip.
 
- Pull request: urlify description and fix javascript injection
 
- Fixed some missing IP extraction for action logger
 
- Fixed bug with log_delete hook didn't properly store
 
  user who triggered delete action
 
- Fixed show as raw link for private gists
 
- Fixes issue #860. IMC web commits poisoned caches when they failed with commit.
 
- Fixes issue #856 file upload >1000 bytes on windows throws exception.
 

	
 

	
 
1.7.1 (**2013-06-13**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- Apply to children flag on repository group also adds users to private
 
  repositories, this is now consistent with user groups. Private repos default
 
  permissions are not affected by apply to children flag.
 
- Removed unionrepo code as it's part of Mercurial 2.6
 
- RhodeCode accepts now read only paths for serving repositories.
 

	
 
fixes
 
+++++
 

	
 
- Fixed issues with how mysql handles float values. Caused gists with
 
  expiration dates not work properly on mysql.
 
- Fixed issue with ldap enable/disable flag
 

	
 

	
 
1.7.0 (**2013-06-08**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- Manage User’s Groups(teams): create, delete, rename, add/remove users inside.
 
  by delegated user group admins.
 
- Implemented simple Gist functionality.
 
- External authentication got special flag to controll user activation.
 
- Created whitelist for API access. Each view can now be accessed by api_key
 
  if added to whitelist.
 
- Added dedicated file history page.
 
- Added compare option into bookmarks
 
- Improved diff display for binary files and renames.
 
- Archive downloading are now stored in main action journal.
 
- Switch gravatar to always use ssl.
 
- Implements #842 RhodeCode version disclosure.
 
- Allow underscore to be the optionally first character of username.
 

	
 
fixes
 
+++++
 

	
 
- #818: Bookmarks Do Not Display on Changeset View.
 
- Fixed default permissions population during upgrades.
 
- Fixed overwrite default user group permission flag.
 
- Fixed issue with h.person() function returned prematurly giving only email
 
  info from changeset metadata.
 
- get_changeset uses now mercurial revrange to filter out branches.
 
  Switch to branch it's around 20% faster this way.
 
- Fixed some issues with paginators on chrome.
 
- Forbid changing of repository type.
 
- Adde missing permission checks in list of forks in repository settings.
 
- Fixes #834 hooks error on remote pulling.
 
- Fixes issues #849. Web Commits functionality failed for non-ascii files.
 
- Fixed #850. Whoosh indexer should use the default revision when doing index.
 
- Fixed #851 and #563 make-index crashes on non-ascii files.
 
- Fixes #852, flash messages had issies with non-ascii messages
 

	
 

	
 
1.6.0 (**2013-05-12**)
 
----------------------
 

	
 
news
 
++++
 

	
 
fixes
 
+++++
 

	
 
- #818: Bookmarks Do Not Display on Changeset View
 
- Fixed issue with forks form errors rendering
 
- #819 review status is showed in the main changelog
 
- Permission update function is idempotent, and doesn't override default
 
  permissions when doing upgrades
 
- Fixed some unicode problems with git file path
 
- Fixed broken handling of adding an htsts headers.
 
- Fixed redirection loop on changelog for empty repository
 
- Fixed issue with web-editor that didn't preserve executable bit
 
  after editing files
 

	
 

	
 
1.6.0rc1 (**2013-04-07**)
 
-------------------------
 

	
 
news
 
++++
 

	
 
 - Redesign UI, with lots of small improvements.
 
 - Group management delegation. Group admin can manage a group, and repos
 
   under it, admin can create child groups inside group he manages.
 
 - Repository extra fields. Optional unlimited extra fields can be defined for
 
   each repository to store custom data.
 
 - API get_repo call includes repo followers now.
 
 - Large amounts of improvements in pull requests.
 
 - #734 repo switcher is available in all pages.
 
 - #733 API invalidate_cache function.
 
 - Added option to turn on HSTS headers when using SSL.
 
 - #83 show repo size on summary page.
 
 - #745 added show full diff link into to big diff message.
 
 - Deprecated RSS links - ATOM is the present and the future.
 
 - Add option to define custom lexers for custom extensions for code highlight
 
   in rcextension module.
 
 - Git executable is now configurable via .ini files.
 
 - #689 repositories now has optional detach/delete option for connected forks.
 
 - Obfuscate password when cloning a remote repo with credentials.
 
 - #788 tarball cache. zip or compressed tarballs can be optionally cached for
 
   faster serving.
 
 - Speed up of last_changeset extraction in VCS.
 
 - API get_locks function.
 
 - Configurable HTTP codes for repository locking.
 
 - Possible to use closed branches in ?branch= in changelog.
 
 - Linaro's ldap sync scripts.
 
 - #797 git refs filter is now configurable via .ini file.
 
 - New ishell paster command for easier administrative tasks.
 

	
 
fixes
 
+++++
 

	
 
 - #654 switch to handles `/` in branch/tag/bookmark names.
 
 - #572 moved out password reset tasks from celery.
 
 - #730 filter out repo groups choices to only ones that you have write+ access.
 
 - #462 disable file editing when not on branch head.
 
 - #731 update-repoinfo sometimes failed to update data when changesets were
 
   initial commits.
 
 - #749,#805 and #516 Removed duplication of repo settings for rhodecode admins
 
   and repo admins.
 
 - Global permission update with "overwrite existing settings" shouldn't
 
   override private repositories.
 
 - #642 added recursion limit for stats gathering.
 
 - #739 Delete/Edit repositories should only point to admin links if the user
 
   is an super admin.
 
 - Fixed escaping of html in "patch" view for GIT repos.
 
 - #747 load changeset cache after forking to refresh lightweight dashboard caches.
 
 - Quick repo list: public/private icon control should only control icons,
 
   not repo visibility.
 
 - #746 UnicodeDedode errors on feed controllers.
 
 - #756 cleanup repos didn't properly compose paths of repos to be cleaned up.
 
 - #763 gravatar helper function should fallback into default image if somehow
 
   email provided is empty.
 
 - Fixes #762, LDAP and container created users are now activated based on
 
   the registration settings in permissions.
 
 - Cleanup would recurse into every leaf and could thus not be used on lots of
 
   large repositories.
 
 - Better detection of deleting groups with subgroups inside.
 
 - Fixed issue with renaming repos group together with changing parents with
 
   multiple nested trees.
 
 - #594 web interface file committing executes push hooks.
 
 - Disallow cloning from different URI's that http[s]/svn/git/hg.
 
 - Handling of RhodeCode extra params in consistent way.
 
 - Don't normalize path if it's empty on adding a file through web interface.
 
 - #808 missing changesets and files should return 404 not redirect
 
 - #809 added url quote in clone url.
 
 - Fixed issues with importing non-ascii repo names.
 
 - Automatically assign instance_id for host and process if it has been set to *
 
 - Fixed multiple IP addresses in each of extracted IP.
 
 - Lot of other small bug fixes and improvements.
 

	
 

	
 
1.5.4 (**2013-03-13**)
 
----------------------
 

	
 
news
 
++++
 

	
 

	
 
fixes
 
+++++
 

	
 
- fixed webtest dependency issues
 
- fixed issues with celery tasks for password reset
 
- fixed #763 gravatar helper function should fallback into default image
 
  if email is empty
 
- fixes #762 user global activation flag is also respected for LDAP created
 
  accounts
 
- use password obfuscate when clonning a remote repo with credentials inside
 
- fixed issue with renaming repository group together with changing parents
 
- disallow cloning from file:/// URIs
 
- handle all cases with multiple IP addresses in proxy headers
 

	
 

	
 
1.5.3 (**2013-02-12**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- IP restrictions now also enabled for IPv6
 

	
 
fixes
 
+++++
 

	
 
- fixed issues with private checkbox not always working
 
- fixed #746 unicodeDedode errors on feed controllers
 
- fixes issue #756 cleanup repos didn't properly compose paths of repos to be cleaned up.
 
- fixed cache invalidation issues together with vcs_full_cache option
 
- repo scan should skip directories with starting with '.'
 
- fixes for issue #731, update-repoinfo sometimes failed to update data when changesets
 
  were initial commits
 
- recursive mode of setting permission skips private repositories
 

	
 

	
 
1.5.2 (**2013-01-14**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- IP restrictions for users. Each user can get a set of whitelist IP+mask for
 
  extra protection. Useful for buildbots etc.
 
- added full last changeset info to lightweight dashboard. lightweight dashboard
 
  is now fully functional replacement of original dashboard.
 
- implemented certain API calls for non-admin users.
 
- enabled all Markdown Extra plugins
 
- implemented #725 Pull Request View - Show origin repo URL
 
- show comments from pull requests into associated changesets
 

	
 
fixes
 
+++++
 

	
 
- update repoinfo script is more failsafe
 
- fixed #687  Lazy loaded tooltip bug with simultaneous ajax requests
 
- fixed #691: Notifications for pull requests: move link to top for better
 
  readability
 
- fixed #699: fix missing fork docs for API
 
- fixed #693 Opening changeset from pull request fails
 
- fixed #710 File view stripping empty lines from beginning and end of file
 
- fixed issues with getting repos by path on windows, caused GIT hooks to fail
 
- fixed issues with groups paginator on main dashboard
 
- improved fetch/pull command for git repos, now pulling all refs
 
- fixed issue #719 Journal revision ID tooltip AJAX query path is incorrect
 
  when running in a subdir
 
- fixed issue #702 API methods without arguments fail when "args":null
 
- set the status of changesets initially on pull request. Fixes issues #690 and #587
 

	
 

	
 
1.5.1 (**2012-12-13**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- implements #677: Don't allow to close pull requests when they are
 
  under-review status
 
- implemented #670 Implementation of Roles in Pull Request
 

	
 
fixes
 
+++++
 

	
 
- default permissions can get duplicated after migration
 
- fixed changeset status labels, they now select radio buttons
 
- #682 translation difficult for multi-line text
 
- #683 fixed difference between messages about not mapped repositories
 
- email: fail nicely when no SMTP server has been configured
 

	
 

	
 
1.5.0 (**2012-12-12**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- new rewritten from scratch diff engine. 10x faster in edge cases. Handling
 
  of file renames, copies, change flags and binary files
 
- added lightweight dashboard option. ref #500. New version of dashboard
 
  page that doesn't use any VCS data and is super fast to render. Recommended
 
  for large amount of repositories.
 
- implements #648 write Script for updating last modification time for
 
  lightweight dashboard
 
- implemented compare engine for git repositories.
 
- LDAP failover, option to specify multiple servers
 
- added Errormator and Sentry support for monitoring RhodeCode
 
- implemented #628: Pass server URL to rc-extensions hooks
 
- new tooltip implementation - added lazy loading of changesets from journal
 
  pages. This can significantly improve speed of rendering the page
 
- implements #632,added branch/tag/bookmarks info into feeds
 
  added changeset link to body of message
 
- implemented #638 permissions overview to groups
 
- implements #636, lazy loading of history and authors to speed up source
 
  pages rendering
 
- implemented #647, option to pass list of default encoding used to
 
  encode to/decode from unicode
 
- added caching layer into RSS/ATOM feeds.
 
- basic implementation of cherry picking changesets for pull request, ref #575
 
- implemented #661 Add option to include diff in RSS feed
 
- implemented file history page for showing detailed changelog for a given file
 
- implemented #663 Admin/permission: specify default repogroup perms
 
- implemented #379 defaults settings page for creation of repositories, locking
 
  statistics, downloads, repository type
 
- implemented #210 filtering of admin journal based on Whoosh Query language
 
- added parents/children links in changeset viewref #650
 

	
 
fixes
 
+++++
 

	
 
- fixed git version checker
 
- #586 patched basic auth handler to fix issues with git behind proxy
 
- #589 search urlgenerator didn't properly escape special characters
 
- fixed issue #614 Include repo name in delete confirmation dialog
 
- fixed #623: Lang meta-tag doesn't work with C#/C++
 
- fixes #612 Double quotes to Single quotes result in bad html in diff
 
- fixes #630 git statistics do too much work making them slow.
 
- fixes #625 Git-Tags are not displayed in Shortlog
 
- fix for issue #602, enforce str when setting mercurial UI object.
 
  When this is used together with mercurial internal translation system
 
  it can lead to UnicodeDecodeErrors
 
- fixes #645 Fix git handler when doing delete remote branch
 
- implements #649 added two seperate method for author and committer to VCS
 
  changeset class switch author for git backed to be the real author not committer
 
- fix issue #504 RhodeCode is showing different versions of README on
 
  different summary page loads
 
- implemented #658 Changing username in LDAP-Mode should not be allowed.
 
- fixes #652 switch to generator approach when doing file annotation to prevent
 
  huge memory consumption
 
- fixes #666 move lockkey path location to cache_dir to ensure this path is
 
  always writable for rhodecode server
 
- many more small fixes and improvements
 
- fixed issues with recursive scans on removed repositories that could take
 
  long time on instance start
 

	
 

	
 
1.4.4 (**2012-10-08**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- obfuscate db password in logs for engine connection string
 
- #574 Show pull request status also in shortlog (if any)
 
- remember selected tab in my account page
 
- Bumped mercurial version to 2.3.2
 
- #595 rcextension hook for repository delete
 

	
 
fixes
 
+++++
 

	
 
- Add git version detection to warn users that Git used in system is to
 
  old. Ref #588 - also show git version in system details in settings page
 
- fixed files quick filter links
 
- #590 Add GET flag that controls the way the diff are generated, for pull
 
  requests we want to use non-bundle based diffs, That are far better for
 
  doing code reviews. The /compare url still uses bundle compare for full
 
  comparison including the incoming changesets
 
- Fixed #585, checks for status of revision where to strict, and made
 
  opening pull request with those revision impossible due to previously set
 
  status. Checks now are made also for the repository.
 
- fixes #591 git backend was causing encoding errors when handling binary
 
  files - added a test case for VCS lib tests
 
- fixed #597 commits in future get negative age.
 
- fixed #598 API docs methods had wrong members parameter as returned data
 

	
 

	
 
1.4.3 (**2012-09-28**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- #558 Added config file to hooks extra data
 
- bumped mercurial version to 2.3.1
 
- #518 added possibility of specifying multiple patterns for issues
 
- update codemirror to latest version
 

	
 
fixes
 
+++++
 

	
 
- fixed #570 explicit user group permissions can overwrite owner permissions
 
- fixed #578 set proper PATH with current Python for Git
 
  hooks to execute within same Python as RhodeCode
 
- fixed issue with Git bare repos that ends with .git in name
 

	
 

	
 
1.4.2 (**2012-09-12**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- added option to menu to quick lock/unlock repository for users that have
 
  write access to
 
- Implemented permissions for writing to repo
 
  groups. Now only write access to group allows to create a repostiory
 
  within that group
 
- #565 Add support for {netloc} and {scheme} to alternative_gravatar_url
 
- updated translation for zh_CN
 

	
 
fixes
 
+++++
 

	
 
- fixed visual permissions check on repository groups inside groups
 
- fixed issues with non-ascii search terms in search, and indexers
 
- fixed parsing of page number in GET parameters
 
- fixed issues with generating pull-request overview for repos with
 
  bookmarks and tags, also preview doesn't loose chosen revision from
 
  select dropdown
 

	
 

	
 
1.4.1 (**2012-09-07**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- always put a comment about code-review status change even if user send
 
  empty data
 
- modified_on column saves repository update and it's going to be used
 
  later for light version of main page ref #500
 
- pull request notifications send much nicer emails with details about pull
 
  request
 
- #551 show breadcrumbs in summary view for repositories inside a group
 

	
 
fixes
 
+++++
 

	
 
- fixed migrations of permissions that can lead to inconsistency.
 
  Some users sent feedback that after upgrading from older versions issues
 
  with updating default permissions occurred. RhodeCode detects that now and
 
  resets default user permission to initial state if there is a need for that.
 
  Also forces users to set the default value for new forking permission.
 
- #535 improved apache wsgi example configuration in docs
 
- fixes #550 mercurial repositories comparision failed when origin repo had
 
  additional not-common changesets
 
- fixed status of code-review in preview windows of pull request
 
- git forks were not initialized at bare repos
 
- fixes #555 fixes issues with comparing non-related repositories
 
- fixes #557 follower counter always counts up
 
- fixed issue #560 require push ssl checkbox wasn't shown when option was
 
  enabled
 
- fixed #559
 
- fixed issue #559 fixed bug in routing that mapped repo names with <name>_<num> in name as
 
  if it was a request to url by repository ID
 

	
 

	
 
1.4.0 (**2012-09-03**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- new codereview system
 
- email map, allowing users to have multiple email addresses mapped into
 
  their accounts
 
- improved git-hook system. Now all actions for git are logged into journal
 
  including pushed revisions, user and IP address
 
- changed setup-app into setup-rhodecode and added default options to it.
 
- new git repos are created as bare now by default
 
- #464 added links to groups in permission box
 
- #465 mentions autocomplete inside comments boxes
 
- #469 added --update-only option to whoosh to re-index only given list
 
  of repos in index
 
- rhodecode-api CLI client
 
- new git http protocol replaced buggy dulwich implementation.
 
  Now based on pygrack & gitweb
 
- Improved RSS/ATOM feeds. Discoverable by browsers using proper headers, and
 
  reformated based on user suggestions. Additional rss/atom feeds for user
 
  journal
 
- various i18n improvements
 
- #478 permissions overview for admin in user edit view
 
- File view now displays small gravatars off all authors of given file
 
- Implemented landing revisions. Each repository will get landing_rev attribute
 
  that defines 'default' revision/branch for generating readme files
 
- Implemented #509, RhodeCode enforces SSL for push/pulling if requested at
 
  earliest possible call.
 
- Import remote svn repositories to mercurial using hgsubversion.
 
- Fixed #508 RhodeCode now has a option to explicitly set forking permissions
 
- RhodeCode can use alternative server for generating avatar icons
 
- implemented repositories locking. Pull locks, push unlocks. Also can be done
 
  via API calls
 
- #538 form for permissions can handle multiple users at once
 

	
 
fixes
 
+++++
 

	
 
- improved translations
 
- fixes issue #455 Creating an archive generates an exception on Windows
 
- fixes #448 Download ZIP archive keeps file in /tmp open and results
 
  in out of disk space
 
- fixes issue #454 Search results under Windows include proceeding
 
  backslash
 
- fixed issue #450. Rhodecode no longer will crash when bad revision is
 
  present in journal data.
 
- fix for issue #417, git execution was broken on windows for certain
 
  commands.
 
- fixed #413. Don't disable .git directory for bare repos on deleting
 
- fixed issue #459. Changed the way of obtaining logger in reindex task.
 
- fixed #453 added ID field in whoosh SCHEMA that solves the issue of
 
  reindexing modified files
 
- fixed #481 rhodecode emails are sent without Date header
 
- fixed #458 wrong count when no repos are present
 
- fixed issue #492 missing `\ No newline at end of file` test at the end of
 
  new chunk in html diff
 
- full text search now works also for commit messages
 

	
 

	
 
1.3.6 (**2012-05-17**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- chinese traditional translation
 
- changed setup-app into setup-rhodecode and added arguments for auto-setup
 
  mode that doesn't need user interaction
 

	
 
fixes
 
+++++
 

	
 
- fixed no scm found warning
 
- fixed __future__ import error on rcextensions
 
- made simplejson required lib for speedup on JSON encoding
 
- fixes #449 bad regex could get more than revisions from parsing history
 
- don't clear DB session when CELERY_EAGER is turned ON
 

	
 

	
 
1.3.5 (**2012-05-10**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- use ext_json for json module
 
- unified annotation view with file source view
 
- notification improvements, better inbox + css
 
- #419 don't strip passwords for login forms, make rhodecode
 
  more compatible with LDAP servers
 
- Added HTTP_X_FORWARDED_FOR as another method of extracting
 
  IP for pull/push logs. - moved all to base controller
 
- #415: Adding comment to changeset causes reload.
 
  Comments are now added via ajax and doesn't reload the page
 
- #374 LDAP config is discarded when LDAP can't be activated
 
- limited push/pull operations are now logged for git in the journal
 
- bumped mercurial to 2.2.X series
 
- added support for displaying submodules in file-browser
 
- #421 added bookmarks in changelog view
 

	
 
fixes
 
+++++
 

	
 
- fixed dev-version marker for stable when served from source codes
 
- fixed missing permission checks on show forks page
 
- #418 cast to unicode fixes in notification objects
 
- #426 fixed mention extracting regex
 
- fixed remote-pulling for git remotes remopositories
 
- fixed #434: Error when accessing files or changesets of a git repository
 
  with submodules
 
- fixed issue with empty APIKEYS for users after registration ref. #438
 
- fixed issue with getting README files from git repositories
 

	
 

	
 
1.3.4 (**2012-03-28**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- Whoosh logging is now controlled by the .ini files logging setup
 
- added clone-url into edit form on /settings page
 
- added help text into repo add/edit forms
 
- created rcextensions module with additional mappings (ref #322) and
 
  post push/pull/create repo hooks callbacks
 
- implemented #377 Users view for his own permissions on account page
 
- #399 added inheritance of permissions for user group on repository groups
 
- #401 repository group is automatically pre-selected when adding repos
 
  inside a repository group
 
- added alternative HTTP 403 response when client failed to authenticate. Helps
 
  solving issues with Mercurial and LDAP
 
- #402 removed group prefix from repository name when listing repositories
 
  inside a group
 
- added gravatars into permission view and permissions autocomplete
 
- #347 when running multiple RhodeCode instances, properly invalidates cache
 
  for all registered servers
 

	
 
fixes
 
+++++
 
Kallithea project doesn't keep its changelog here.  We refer you to our Mercurial logs_ .
 

	
 
- fixed #390 cache invalidation problems on repos inside group
 
- fixed #385 clone by ID url was loosing proxy prefix in URL
 
- fixed some unicode problems with waitress
 
- fixed issue with escaping < and > in changeset commits
 
- fixed error occurring during recursive group creation in API
 
  create_repo function
 
- fixed #393 py2.5 fixes for routes url generator
 
- fixed #397 Private repository groups shows up before login
 
- fixed #396 fixed problems with revoking users in nested groups
 
- fixed mysql unicode issues + specified InnoDB as default engine with
 
  utf8 charset
 
- #406 trim long branch/tag names in changelog to not break UI
 

	
 

	
 
1.3.3 (**2012-03-02**)
 
----------------------
 

	
 
news
 
++++
 

	
 

	
 
fixes
 
+++++
 

	
 
- fixed some python2.5 compatibility issues
 
- fixed issues with removed repos was accidentally added as groups, after
 
  full rescan of paths
 
- fixes #376 Cannot edit user (using container auth)
 
- fixes #378 Invalid image urls on changeset screen with proxy-prefix
 
  configuration
 
- fixed initial sorting of repos inside repo group
 
- fixes issue when user tried to resubmit same permission into user/user_groups
 
- bumped beaker version that fixes #375 leap error bug
 
- fixed raw_changeset for git. It was generated with hg patch headers
 
- fixed vcs issue with last_changeset for filenodes
 
- fixed missing commit after hook delete
 
- fixed #372 issues with git operation detection that caused a security issue
 
  for git repos
 

	
 

	
 
1.3.2 (**2012-02-28**)
 
----------------------
 

	
 
news
 
++++
 

	
 

	
 
fixes
 
+++++
 

	
 
- fixed git protocol issues with repos-groups
 
- fixed git remote repos validator that prevented from cloning remote git repos
 
- fixes #370 ending slashes fixes for repo and groups
 
- fixes #368 improved git-protocol detection to handle other clients
 
- fixes #366 When Setting Repository Group To Blank Repo Group Wont Be
 
  Moved To Root
 
- fixes #371 fixed issues with beaker/sqlalchemy and non-ascii cache keys
 
- fixed #373 missing cascade drop on user_group_to_perm table
 

	
 

	
 
1.3.1 (**2012-02-27**)
 
----------------------
 

	
 
news
 
++++
 

	
 

	
 
fixes
 
+++++
 

	
 
- redirection loop occurs when remember-me wasn't checked during login
 
- fixes issues with git blob history generation
 
- don't fetch branch for git in file history dropdown. Causes unneeded slowness
 

	
 

	
 
1.3.0 (**2012-02-26**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- code review, inspired by github code-comments
 
- #215 rst and markdown README files support
 
- #252 Container-based and proxy pass-through authentication support
 
- #44 branch browser. Filtering of changelog by branches
 
- mercurial bookmarks support
 
- new hover top menu, optimized to add maximum size for important views
 
- configurable clone url template with possibility to specify  protocol like
 
  ssh:// or http:// and also manually alter other parts of clone_url.
 
- enabled largefiles extension by default
 
- optimized summary file pages and saved a lot of unused space in them
 
- #239 option to manually mark repository as fork
 
- #320 mapping of commit authors to RhodeCode users
 
- #304 hashes are displayed using monospace font
 
- diff configuration, toggle white lines and context lines
 
- #307 configurable diffs, whitespace toggle, increasing context lines
 
- sorting on branches, tags and bookmarks using YUI datatable
 
- improved file filter on files page
 
- implements #330 api method for listing nodes ar particular revision
 
- #73 added linking issues in commit messages to chosen issue tracker url
 
  based on user defined regular expression
 
- added linking of changesets in commit messages
 
- new compact changelog with expandable commit messages
 
- firstname and lastname are optional in user creation
 
- #348 added post-create repository hook
 
- #212 global encoding settings is now configurable from .ini files
 
- #227 added repository groups permissions
 
- markdown gets codehilite extensions
 
- new API methods, delete_repositories, grante/revoke permissions for groups
 
  and repos
 

	
 

	
 
fixes
 
+++++
 

	
 
- rewrote dbsession management for atomic operations, and better error handling
 
- fixed sorting of repo tables
 
- #326 escape of special html entities in diffs
 
- normalized user_name => username in api attributes
 
- fixes #298 ldap created users with mixed case emails created conflicts
 
  on saving a form
 
- fixes issue when owner of a repo couldn't revoke permissions for users
 
  and groups
 
- fixes #271 rare JSON serialization problem with statistics
 
- fixes #337 missing validation check for conflicting names of a group with a
 
  repository group
 
- #340 fixed session problem for mysql and celery tasks
 
- fixed #331 RhodeCode mangles repository names if the a repository group
 
  contains the "full path" to the repositories
 
- #355 RhodeCode doesn't store encrypted LDAP passwords
 

	
 

	
 
1.2.5 (**2012-01-28**)
 
----------------------
 

	
 
news
 
++++
 

	
 
fixes
 
+++++
 

	
 
- #340 Celery complains about MySQL server gone away, added session cleanup
 
  for celery tasks
 
- #341 "scanning for repositories in None" log message during Rescan was missing
 
  a parameter
 
- fixed creating archives with subrepos. Some hooks were triggered during that
 
  operation leading to crash.
 
- fixed missing email in account page.
 
- Reverted Mercurial to 2.0.1 for windows due to bug in Mercurial that makes
 
  forking on windows impossible
 

	
 

	
 
1.2.4 (**2012-01-19**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- RhodeCode is bundled with mercurial series 2.0.X by default, with
 
  full support to largefiles extension. Enabled by default in new installations
 
- #329 Ability to Add/Remove Groups to/from a Repository via AP
 
- added requires.txt file with requirements
 

	
 
fixes
 
+++++
 

	
 
- fixes db session issues with celery when emailing admins
 
- #331 RhodeCode mangles repository names if the a repository group
 
  contains the "full path" to the repositories
 
- #298 Conflicting e-mail addresses for LDAP and RhodeCode users
 
- DB session cleanup after hg protocol operations, fixes issues with
 
  `mysql has gone away` errors
 
- #333 doc fixes for get_repo api function
 
- #271 rare JSON serialization problem with statistics enabled
 
- #337 Fixes issues with validation of repository name conflicting with
 
  a group name. A proper message is now displayed.
 
- #292 made ldap_dn in user edit readonly, to get rid of confusion that field
 
  doesn't work
 
- #316 fixes issues with web description in hgrc files
 

	
 

	
 
1.2.3 (**2011-11-02**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- added option to manage repository group for non admin users
 
- added following API methods for get_users, create_user, get_users_groups,
 
  get_users_group, create_users_group, add_user_to_users_groups, get_repos,
 
  get_repo, create_repo, add_user_to_repo
 
- implements #237 added password confirmation for my account
 
  and admin edit user.
 
- implements #291 email notification for global events are now sent to all
 
  administrator users, and global config email.
 

	
 
fixes
 
+++++
 

	
 
- added option for passing auth method for smtp mailer
 
- #276 issue with adding a single user with id>10 to usergroups
 
- #277 fixes windows LDAP settings in which missing values breaks the ldap auth
 
- #288 fixes managing of repos in a group for non admin user
 

	
 

	
 
1.2.2 (**2011-10-17**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- #226 repo groups are available by path instead of numerical id
 

	
 
fixes
 
+++++
 

	
 
- #259 Groups with the same name but with different parent group
 
- #260 Put repo in group, then move group to another group -> repo becomes unavailable
 
- #258 RhodeCode 1.2 assumes egg folder is writable (lockfiles problems)
 
- #265 ldap save fails sometimes on converting attributes to booleans,
 
  added getter and setter into model that will prevent from this on db model level
 
- fixed problems with timestamps issues #251 and #213
 
- fixes #266 RhodeCode allows to create repo with the same name and in
 
  the same parent as group
 
- fixes #245 Rescan of the repositories on Windows
 
- fixes #248 cannot edit repos inside a group on windows
 
- fixes #219 forking problems on windows
 

	
 

	
 
1.2.1 (**2011-10-08**)
 
----------------------
 

	
 
news
 
++++
 

	
 

	
 
fixes
 
+++++
 

	
 
- fixed problems with basic auth and push problems
 
- gui fixes
 
- fixed logger
 

	
 

	
 
1.2.0 (**2011-10-07**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- implemented #47 repository groups
 
- implemented #89 Can setup google analytics code from settings menu
 
- implemented #91 added nicer looking archive urls with more download options
 
  like tags, branches
 
- implemented #44 into file browsing, and added follow branch option
 
- implemented #84 downloads can be enabled/disabled for each repository
 
- anonymous repository can be cloned without having to pass default:default
 
  into clone url
 
- fixed #90 whoosh indexer can index chooses repositories passed in command
 
  line
 
- extended journal with day aggregates and paging
 
- implemented #107 source code lines highlight ranges
 
- implemented #93 customizable changelog on combined revision ranges -
 
  equivalent of githubs compare view
 
- implemented #108 extended and more powerful LDAP configuration
 
- implemented #56 user groups
 
- major code rewrites optimized codes for speed and memory usage
 
- raw and diff downloads are now in git format
 
- setup command checks for write access to given path
 
- fixed many issues with international characters and unicode. It uses utf8
 
  decode with replace to provide less errors even with non utf8 encoded strings
 
- #125 added API KEY access to feeds
 
- #109 Repository can be created from external Mercurial link (aka. remote
 
  repository, and manually updated (via pull) from admin panel
 
- beta git support - push/pull server + basic view for git repos
 
- added followers page and forks page
 
- server side file creation (with binary file upload interface)
 
  and edition with commits powered by codemirror
 
- #111 file browser file finder, quick lookup files on whole file tree
 
- added quick login sliding menu into main page
 
- changelog uses lazy loading of affected files details, in some scenarios
 
  this can improve speed of changelog page dramatically especially for
 
  larger repositories.
 
- implements #214 added support for downloading subrepos in download menu.
 
- Added basic API for direct operations on rhodecode via JSON
 
- Implemented advanced hook management
 

	
 
fixes
 
+++++
 

	
 
- fixed file browser bug, when switching into given form revision the url was
 
  not changing
 
- fixed propagation to error controller on simplehg and simplegit middlewares
 
- fixed error when trying to make a download on empty repository
 
- fixed problem with '[' chars in commit messages in journal
 
- fixed #99 Unicode errors, on file node paths with non utf-8 characters
 
- journal fork fixes
 
- removed issue with space inside renamed repository after deletion
 
- fixed strange issue on formencode imports
 
- fixed #126 Deleting repository on Windows, rename used incompatible chars.
 
- #150 fixes for errors on repositories mapped in db but corrupted in
 
  filesystem
 
- fixed problem with ascendant characters in realm #181
 
- fixed problem with sqlite file based database connection pool
 
- whoosh indexer and code stats share the same dynamic extensions map
 
- fixes #188 - relationship delete of repo_to_perm entry on user removal
 
- fixes issue #189 Trending source files shows "show more" when no more exist
 
- fixes issue #197 Relative paths for pidlocks
 
- fixes issue #198 password will require only 3 chars now for login form
 
- fixes issue #199 wrong redirection for non admin users after creating a repository
 
- fixes issues #202, bad db constraint made impossible to attach same group
 
  more than one time. Affects only mysql/postgres
 
- fixes #218 os.kill patch for windows was missing sig param
 
- improved rendering of dag (they are not trimmed anymore when number of
 
  heads exceeds 5)
 

	
 

	
 
1.1.8 (**2011-04-12**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- improved windows support
 

	
 
fixes
 
+++++
 

	
 
- fixed #140 freeze of python dateutil library, since new version is python2.x
 
  incompatible
 
- setup-app will check for write permission in given path
 
- cleaned up license info issue #149
 
- fixes for issues #137,#116 and problems with unicode and accented characters.
 
- fixes crashes on gravatar, when passed in email as unicode
 
- fixed tooltip flickering problems
 
- fixed came_from redirection on windows
 
- fixed logging modules, and sql formatters
 
- windows fixes for os.kill issue #133
 
- fixes path splitting for windows issues #148
 
- fixed issue #143 wrong import on migration to 1.1.X
 
- fixed problems with displaying binary files, thanks to Thomas Waldmann
 
- removed name from archive files since it's breaking ui for long repo names
 
- fixed issue with archive headers sent to browser, thanks to Thomas Waldmann
 
- fixed compatibility for 1024px displays, and larger dpi settings, thanks to
 
  Thomas Waldmann
 
- fixed issue #166 summary pager was skipping 10 revisions on second page
 

	
 

	
 
1.1.7 (**2011-03-23**)
 
----------------------
 

	
 
news
 
++++
 

	
 
fixes
 
+++++
 

	
 
- fixed (again) #136 installation support for FreeBSD
 

	
 

	
 
1.1.6 (**2011-03-21**)
 
----------------------
 

	
 
news
 
++++
 

	
 
fixes
 
+++++
 

	
 
- fixed #136 installation support for FreeBSD
 
- RhodeCode will check for python version during installation
 

	
 

	
 
1.1.5 (**2011-03-17**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- basic windows support, by exchanging pybcrypt into sha256 for windows only
 
  highly inspired by idea of mantis406
 

	
 
fixes
 
+++++
 

	
 
- fixed sorting by author in main page
 
- fixed crashes with diffs on binary files
 
- fixed #131 problem with boolean values for LDAP
 
- fixed #122 mysql problems thanks to striker69
 
- fixed problem with errors on calling raw/raw_files/annotate functions
 
  with unknown revisions
 
- fixed returned rawfiles attachment names with international character
 
- cleaned out docs, big thanks to Jason Harris
 

	
 

	
 
1.1.4 (**2011-02-19**)
 
----------------------
 

	
 
news
 
++++
 

	
 
fixes
 
+++++
 

	
 
- fixed formencode import problem on settings page, that caused server crash
 
  when that page was accessed as first after server start
 
- journal fixes
 
- fixed option to access repository just by entering http://server/<repo_name>
 

	
 

	
 
1.1.3 (**2011-02-16**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- implemented #102 allowing the '.' character in username
 
- added option to access repository just by entering http://server/<repo_name>
 
- celery task ignores result for better performance
 

	
 
fixes
 
+++++
 

	
 
- fixed ehlo command and non auth mail servers on smtp_lib. Thanks to
 
  apollo13 and Johan Walles
 
- small fixes in journal
 
- fixed problems with getting setting for celery from .ini files
 
- registration, password reset and login boxes share the same title as main
 
  application now
 
- fixed #113: to high permissions to fork repository
 
- fixed problem with '[' chars in commit messages in journal
 
- removed issue with space inside renamed repository after deletion
 
- db transaction fixes when filesystem repository creation failed
 
- fixed #106 relation issues on databases different than sqlite
 
- fixed static files paths links to use of url() method
 

	
 

	
 
1.1.2 (**2011-01-12**)
 
----------------------
 

	
 
news
 
++++
 

	
 

	
 
fixes
 
+++++
 

	
 
- fixes #98 protection against float division of percentage stats
 
- fixed graph bug
 
- forced webhelpers version since it was making troubles during installation
 

	
 

	
 
1.1.1 (**2011-01-06**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- added force https option into ini files for easier https usage (no need to
 
  set server headers with this options)
 
- small css updates
 

	
 
fixes
 
+++++
 

	
 
- fixed #96 redirect loop on files view on repositories without changesets
 
- fixed #97 unicode string passed into server header in special cases (mod_wsgi)
 
  and server crashed with errors
 
- fixed large tooltips problems on main page
 
- fixed #92 whoosh indexer is more error proof
 

	
 

	
 
1.1.0 (**2010-12-18**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- rewrite of internals for vcs >=0.1.10
 
- uses mercurial 1.7 with dotencode disabled for maintaining compatibility
 
  with older clients
 
- anonymous access, authentication via ldap
 
- performance upgrade for cached repos list - each repository has its own
 
  cache that's invalidated when needed.
 
- performance upgrades on repositories with large amount of commits (20K+)
 
- main page quick filter for filtering repositories
 
- user dashboards with ability to follow chosen repositories actions
 
- sends email to admin on new user registration
 
- added cache/statistics reset options into repository settings
 
- more detailed action logger (based on hooks) with pushed changesets lists
 
  and options to disable those hooks from admin panel
 
- introduced new enhanced changelog for merges that shows more accurate results
 
- new improved and faster code stats (based on pygments lexers mapping tables,
 
  showing up to 10 trending sources for each repository. Additionally stats
 
  can be disabled in repository settings.
 
- gui optimizations, fixed application width to 1024px
 
- added cut off (for large files/changesets) limit into config files
 
- whoosh, celeryd, upgrade moved to paster command
 
- other than sqlite database backends can be used
 

	
 
fixes
 
+++++
 

	
 
- fixes #61 forked repo was showing only after cache expired
 
- fixes #76 no confirmation on user deletes
 
- fixes #66 Name field misspelled
 
- fixes #72 block user removal when he owns repositories
 
- fixes #69 added password confirmation fields
 
- fixes #87 RhodeCode crashes occasionally on updating repository owner
 
- fixes #82 broken annotations on files with more than 1 blank line at the end
 
- a lot of fixes and tweaks for file browser
 
- fixed detached session issues
 
- fixed when user had no repos he would see all repos listed in my account
 
- fixed ui() instance bug when global hgrc settings was loaded for server
 
  instance and all hgrc options were merged with our db ui() object
 
- numerous small bugfixes
 

	
 
(special thanks for TkSoh for detailed feedback)
 

	
 

	
 
1.0.2 (**2010-11-12**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- tested under python2.7
 
- bumped sqlalchemy and celery versions
 

	
 
fixes
 
+++++
 

	
 
- fixed #59 missing graph.js
 
- fixed repo_size crash when repository had broken symlinks
 
- fixed python2.5 crashes.
 

	
 

	
 
1.0.1 (**2010-11-10**)
 
----------------------
 

	
 
news
 
++++
 

	
 
- small css updated
 

	
 
fixes
 
+++++
 

	
 
- fixed #53 python2.5 incompatible enumerate calls
 
- fixed #52 disable mercurial extension for web
 
- fixed #51 deleting repositories don't delete it's dependent objects
 

	
 

	
 
1.0.0 (**2010-11-02**)
 
----------------------
 

	
 
news
 
++++
 

	
 

	
 
fixes
 
+++++
 
- security bugfix simplehg wasn't checking for permissions on commands
 
  other than pull or push.
 
- fixed doubled messages after push or pull in admin journal
 
- templating and css corrections, fixed repo switcher on chrome, updated titles
 
- admin menu accessible from options menu on repository view
 
- permissions cached queries
 

	
 

	
 
1.0.0rc4  (**2010-10-12**)
 
--------------------------
 

	
 
news
 
++++
 

	
 

	
 
fixes
 
+++++
 
- fixed python2.5 missing simplejson imports (thanks to Jens Bäckman)
 
- removed cache_manager settings from sqlalchemy meta
 
- added sqlalchemy cache settings to ini files
 
- validated password length and added second try of failure on paster setup-app
 
- fixed setup database destroy prompt even when there was no db
 

	
 

	
 
1.0.0rc3 (**2010-10-11**)
 
-------------------------
 

	
 
news
 
++++
 

	
 

	
 
fixes
 
+++++
 

	
 
- fixed i18n during installation.
 

	
 

	
 
1.0.0rc2 (**2010-10-11**)
 
-------------------------
 

	
 
news
 
++++
 

	
 

	
 
fixes
 
+++++
 

	
 
- Disabled dirsize in file browser, it's causing nasty bug when dir renames
 
  occure. After vcs is fixed it'll be put back again.
 
- templating/css rewrites, optimized css.
 
.. _logs: https://kallithea-scm.org/repos/kallithea/changelog
docs/conf.py
Show inline comments
 
# -*- coding: utf-8 -*-
 
#
 
# RhodeCode documentation build configuration file, created by
 
# Kallithea documentation build configuration file, created by
 
# sphinx-quickstart on Sun Oct 10 16:46:37 2010.
 
#
 
# This file is execfile()d with the current directory set to its containing dir.
 
@@ -44,8 +44,8 @@ source_suffix = '.rst'
 
master_doc = 'index'
 

	
 
# General information about the project.
 
project = u'RhodeCode'
 
copyright = u'%s, Marcin Kuzminski' % (datetime.datetime.now().year)
 
project = u'Kallithea'
 
copyright = u'2010-2014 by various authors, licensed as GPLv3.'
 

	
 
# The version info for the project you're documenting, acts as replacement for
 
# |version| and |release|, also used in various other places throughout the
 
@@ -54,7 +54,7 @@ copyright = u'%s, Marcin Kuzminski' % (d
 
# The short X.Y version.
 
root = os.path.dirname(os.path.dirname(__file__))
 
sys.path.append(root)
 
from rhodecode import __version__
 
from kallithea import __version__
 
version = __version__
 
# The full version, including alpha/beta/rc tags.
 
release = __version__
 
@@ -171,7 +171,7 @@ html_theme_path = ['theme']
 
#html_file_suffix = None
 

	
 
# Output file base name for HTML help builder.
 
htmlhelp_basename = 'RhodeCodedoc'
 
htmlhelp_basename = 'Kallithea-docs'
 

	
 

	
 
# -- Options for LaTeX output --------------------------------------------------
 
@@ -185,7 +185,7 @@ htmlhelp_basename = 'RhodeCodedoc'
 
# Grouping the document tree into LaTeX files. List of tuples
 
# (source start file, target name, title, author, documentclass [howto/manual]).
 
latex_documents = [
 
  ('index', 'RhodeCode.tex', u'RhodeCode Documentation',
 
  ('index', 'Kallithea.tex', u'Kallithea Documentation',
 
   u'Marcin Kuzminski', 'manual'),
 
]
 

	
 
@@ -218,7 +218,7 @@ latex_documents = [
 
# One entry per manual page. List of tuples
 
# (source start file, name, description, authors, manual section).
 
man_pages = [
 
    ('index', 'rhodecode', u'RhodeCode Documentation',
 
    ('index', 'kallithea', u'Kallithea Documentation',
 
     [u'Marcin Kuzminski'], 1)
 
]
 

	
docs/contributing.rst
Show inline comments
 
.. _contributing:
 

	
 
=========================
 
Contributing to RhodeCode
 
Contributing to Kallithea
 
=========================
 

	
 
If you would like to contribute to RhodeCode, please contact me, any help is
 
If you would like to contribute to Kallithea, please contact us, any help is
 
greatly appreciated!
 

	
 
Could I request that you make your source contributions by first forking the
 
RhodeCode repository on bitbucket_
 
https://bitbucket.org/marcinkuzminski/rhodecode and then make your changes to
 
Kallithea repository on bitbucket_
 
https://bitbucket.org/conservancy/kallithea and then make your changes to
 
your forked repository. Please post all fixes into **dev** bookmark since your
 
change might be already fixed there and i try to merge all fixes from dev into
 
stable, and not the other way. Finally, when you are finished with your changes,
 
please send me a pull request.
 
please send us a pull request.
 

	
 
To run RhodeCode in a development version you always need to install the latest
 
required libs. Simply clone rhodecode and switch to beta branch::
 
To run Kallithea in a development version you always need to install the latest
 
required libs. Simply clone Kallithea and switch to beta branch::
 

	
 
    hg clone -u dev https://secure.rhodecode.org/rhodecode
 
    hg clone https://kallithea-scm.org/repos/kallithea
 

	
 
after downloading/pulling RhodeCode make sure you run::
 
after downloading/pulling Kallithea make sure you run::
 

	
 
    python setup.py develop
 

	
 
@@ -41,13 +41,11 @@ to change your testing enviroment.
 
There's a special set of tests for push/pull operations, you can runn them using::
 

	
 
    paster serve test.ini --pid-file=test.pid --daemon
 
    RC_WHOOSH_TEST_DISABLE=1 RC_NO_TMP_PATH=1 nosetests -x rhodecode/tests/other/test_vcs_operations.py
 
    KALLITHEA_WHOOSH_TEST_DISABLE=1 KALLITHEA_NO_TMP_PATH=1 nosetests -x kallithea/tests/other/test_vcs_operations.py
 
    kill -9 $(cat test.pid)
 

	
 

	
 
| Thank you for any contributions!
 
|  Marcin
 

	
 

	
 

	
 
.. _bitbucket: http://bitbucket.org/
docs/index.rst
Show inline comments
 
@@ -11,6 +11,7 @@ Users Guide
 
   :maxdepth: 1
 

	
 
   installation
 
   installation_win
 
   setup
 
   upgrade
 

	
docs/installation.rst
Show inline comments
 
@@ -4,28 +4,28 @@
 
Installation
 
============
 

	
 
``RhodeCode`` is written entirely in Python. Before posting any issues make
 
``Kallithea`` is written entirely in Python. Before posting any issues make
 
sure, your not missing any system libraries and using right version of
 
libraries required by RhodeCode. There's also restriction in terms of mercurial
 
clients. Minimal version of hg client known working fine with RhodeCode is
 
libraries required by Kallithea. There's also restriction in terms of mercurial
 
clients. Minimal version of hg client known working fine with Kallithea is
 
**1.6**. If you're using older client, please upgrade.
 

	
 

	
 
Installing RhodeCode from PyPI (aka "Cheeseshop")
 
Installing Kallithea from PyPI (aka "Cheeseshop")
 
-------------------------------------------------
 

	
 
Rhodecode requires python version 2.5 or higher.
 
Kallithea requires python version 2.5 or higher.
 

	
 
The easiest way to install ``rhodecode`` is to run::
 
The easiest way to install ``kallithea`` is to run::
 

	
 
    easy_install rhodecode
 
    easy_install kallithea
 

	
 
Or::
 

	
 
    pip install rhodecode
 
    pip install kallithea
 

	
 
If you prefer to install RhodeCode manually simply grab latest release from
 
http://pypi.python.org/pypi/RhodeCode, decompress the archive and run::
 
If you prefer to install Kallithea manually simply grab latest release from
 
http://pypi.python.org/pypi/Kallithea, decompress the archive and run::
 

	
 
    python setup.py install
 

	
 
@@ -39,8 +39,8 @@ Step by step installation example for Li
 
-------------------------------------------
 

	
 

	
 
For installing RhodeCode i highly recommend using separate virtualenv_. This
 
way many required by RhodeCode libraries will remain sandboxed from your main
 
For installing Kallithea i highly recommend using separate virtualenv_. This
 
way many required by Kallithea libraries will remain sandboxed from your main
 
python and making things less problematic when doing system python updates.
 

	
 
Alternative very detailed installation instructions for Ubuntu Server with
 
@@ -50,64 +50,64 @@ celery, indexer and daemon scripts: http
 
- Assuming you have installed virtualenv_ create a new virtual environment
 
  using virtualenv command::
 

	
 
    virtualenv --no-site-packages /opt/rhodecode-venv
 
    virtualenv --no-site-packages /opt/kallithea-venv
 

	
 

	
 
.. note:: Using ``--no-site-packages`` when generating your
 
   virtualenv is **very important**. This flag provides the necessary
 
   isolation for running the set of packages required by
 
   RhodeCode.  If you do not specify ``--no-site-packages``,
 
   it's possible that RhodeCode will not install properly into
 
   Kallithea.  If you do not specify ``--no-site-packages``,
 
   it's possible that Kallithea will not install properly into
 
   the virtualenv, or, even if it does, may not run properly,
 
   depending on the packages you've already got installed into your
 
   Python's "main" site-packages dir.
 

	
 

	
 
- this will install new virtualenv_ into `/opt/rhodecode-venv`.
 
- this will install new virtualenv_ into `/opt/kallithea-venv`.
 
- Activate the virtualenv_ by running::
 

	
 
    source /opt/rhodecode-venv/bin/activate
 
    source /opt/kallithea-venv/bin/activate
 

	
 
.. note:: If you're using UNIX, *do not* use ``sudo`` to run the
 
   ``virtualenv`` script.  It's perfectly acceptable (and desirable)
 
   to create a virtualenv as a normal user.
 

	
 
- Make a folder for rhodecode data files, and configuration somewhere on the
 
- Make a folder for Kallithea data files, and configuration somewhere on the
 
  filesystem. For example::
 

	
 
    mkdir /opt/rhodecode
 
    mkdir /opt/kallithea
 

	
 

	
 
- Go into the created directory run this command to install rhodecode::
 
- Go into the created directory run this command to install kallithea::
 

	
 
    easy_install rhodecode
 
    easy_install kallithea
 

	
 
  or::
 

	
 
    pip install rhodecode
 
    pip install kallithea
 

	
 
- This will install rhodecode together with pylons and all other required
 
- This will install Kallithea together with pylons and all other required
 
  python libraries into activated virtualenv
 

	
 
Requirements for Celery (optional)
 
----------------------------------
 

	
 
In order to gain maximum performance
 
there are some third-party you must install. When RhodeCode is used
 
there are some third-party you must install. When Kallithea is used
 
together with celery you have to install some kind of message broker,
 
recommended one is rabbitmq_ to make the async tasks work.
 

	
 
Of course RhodeCode works in sync mode also and then you do not have to install
 
Of course Kallithea works in sync mode also and then you do not have to install
 
any third party applications. However, using Celery_ will give you a large
 
speed improvement when using many big repositories. If you plan to use
 
RhodeCode for say 7 to 10 repositories, RhodeCode will perform perfectly well
 
Kallithea for say 7 to 10 repositories, Kallithea will perform perfectly well
 
without celery running.
 

	
 
If you make the decision to run RhodeCode with celery make sure you run
 
If you make the decision to run Kallithea with celery make sure you run
 
celeryd using paster and message broker together with the application.
 

	
 
.. note::
 
   Installing message broker and using celery is optional, RhodeCode will
 
   Installing message broker and using celery is optional, Kallithea will
 
   work perfectly fine without them.
 

	
 

	
docs/installation_win.rst
Show inline comments
 
@@ -5,7 +5,7 @@ Step by step Installation for Windows
 
=====================================
 

	
 

	
 
RhodeCode step-by-step install Guide for Windows
 
Kallithea step-by-step install Guide for Windows
 

	
 
Target OS: Windows XP SP3 32bit English (Clean installation)
 
+ All Windows Updates until 24-may-2012
 
@@ -121,22 +121,22 @@ that came preinstalled in Vista/7 and ca
 
  Typically: C:\\Python27
 

	
 

	
 
Step5 - RhodeCode folder structure
 
Step5 - Kallithea folder structure
 
----------------------------------
 

	
 
Create a RhodeCode folder structure
 
Create a Kallithea folder structure
 

	
 
This is only a example to install RhodeCode, you can of course change
 
This is only a example to install Kallithea, you can of course change
 
it. However, this guide will follow the proposed structure, so please
 
later adapt the paths if you change them. My recommendation is to use
 
folders with NO SPACES. But you can try if you are brave...
 

	
 
Create the following folder structure::
 

	
 
  C:\RhodeCode
 
  C:\RhodeCode\Bin
 
  C:\RhodeCode\Env
 
  C:\RhodeCode\Repos
 
  C:\Kallithea
 
  C:\Kallithea\Bin
 
  C:\Kallithea\Env
 
  C:\Kallithea\Repos
 

	
 

	
 
Step6 - Install virtualenv
 
@@ -146,24 +146,24 @@ Install Virtual Env for Python
 

	
 
Navigate to: http://www.virtualenv.org/en/latest/index.html#installation
 
Right click on "virtualenv.py" file and choose "Save link as...".
 
Download to C:\\RhodeCode (or whatever you want)
 
Download to C:\\Kallithea (or whatever you want)
 
(the file is located at
 
https://raw.github.com/pypa/virtualenv/master/virtualenv.py)
 

	
 
Create a virtual Python environment in C:\\RhodeCode\\Env (or similar). To
 
Create a virtual Python environment in C:\\Kallithea\\Env (or similar). To
 
do so, open a CMD (Python Path should be included in Step3), navigate
 
where you downloaded "virtualenv.py", and write::
 

	
 
 python virtualenv.py C:\RhodeCode\Env
 
 python virtualenv.py C:\Kallithea\Env
 

	
 
(--no-site-packages is now the default behaviour of virtualenv, no need
 
to include it)
 

	
 

	
 
Step7 - Install RhodeCode
 
Step7 - Install Kallithea
 
-------------------------
 

	
 
Finally, install RhodeCode
 
Finally, install Kallithea
 

	
 
Close previously opened command prompt/s, and open a Visual Studio 2008
 
Command Prompt (**IMPORTANT!!**). To do so, go to Start Menu, and then open
 
@@ -186,31 +186,31 @@ to::
 

	
 
In that CMD (loaded with VS2008 PATHs) type::
 

	
 
  cd C:\RhodeCode\Env\Scripts (or similar)
 
  cd C:\Kallithea\Env\Scripts (or similar)
 
  activate
 

	
 
The prompt will change into "(Env) C:\\RhodeCode\\Env\\Scripts" or similar
 
The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar
 
(depending of your folder structure). Then type::
 

	
 
 pip install rhodecode
 
 pip install kallithea
 

	
 
(long step, please wait until fully complete)
 

	
 
Some warnings will appear, don't worry as they are normal.
 

	
 

	
 
Step8 - Configuring RhodeCode
 
Step8 - Configuring Kallithea
 
-----------------------------
 

	
 

	
 
steps taken from http://packages.python.org/RhodeCode/setup.html
 
steps taken from http://packages.python.org/Kallithea/setup.html
 

	
 
You have to use the same Visual Studio 2008 command prompt as Step7, so
 
if you closed it reopen it following the same commands (including the
 
"activate" one). When ready, just type::
 

	
 
  cd C:\RhodeCode\Bin
 
  paster make-config RhodeCode production.ini
 
  cd C:\Kallithea\Bin
 
  paster make-config Kallithea production.ini
 

	
 
Then, you must edit production.ini to fit your needs (ip address, ip
 
port, mail settings, database, whatever). I recommend using NotePad++
 
@@ -221,14 +221,14 @@ character differences between Unix and W
 
For the sake of simplicity lets run it with the default settings. After
 
your edits (if any), in the previous Command Prompt, type::
 

	
 
 paster setup-rhodecode production.ini
 
 paster setup-db production.ini
 

	
 
(this time a NEW database will be installed, you must follow a different
 
step to later UPGRADE to a newer RhodeCode version)
 
step to later UPGRADE to a newer Kallithea version)
 

	
 
The script will ask you for confirmation about creating a NEW database,
 
answer yes (y)
 
The script will ask you for repository path, answer C:\\RhodeCode\\Repos
 
The script will ask you for repository path, answer C:\\Kallithea\\Repos
 
(or similar)
 
The script will ask you for admin username and password, answer "admin"
 
+ "123456" (or whatever you want)
 
@@ -239,11 +239,11 @@ If you make some mistake and the script 
 
it again.
 

	
 

	
 
Step9 - Running RhodeCode
 
Step9 - Running Kallithea
 
-------------------------
 

	
 

	
 
In the previous command prompt, being in the C:\\RhodeCode\\Bin folder,
 
In the previous command prompt, being in the C:\\Kallithea\\Bin folder,
 
just type::
 

	
 
 paster serve production.ini
 
@@ -261,7 +261,7 @@ again. Don't forget the "http://" in Int
 
What this Guide does not cover:
 

	
 
- Installing Celery
 
- Running RhodeCode as Windows Service. You can investigate here:
 
- Running Kallithea as Windows Service. You can investigate here:
 

	
 
  - http://pypi.python.org/pypi/wsgisvc
 
  - http://ryrobes.com/python/running-python-scripts-as-a-windows-service/
 
@@ -275,18 +275,18 @@ What this Guide does not cover:
 
Upgrading
 
=========
 

	
 
Stop running RhodeCode
 
Stop running Kallithea
 
Open a CommandPrompt like in Step7 (VS2008 path + activate) and type::
 

	
 
 easy_install -U rhodecode
 
 cd \RhodeCode\Bin
 
 easy_install -U kallithea
 
 cd \Kallithea\Bin
 

	
 
{ backup your production.ini file now} ::
 

	
 
 paster make-config RhodeCode production.ini
 
 paster make-config Kallithea production.ini
 

	
 
(check changes and update your production.ini accordingly) ::
 

	
 
 paster upgrade-db production.ini (update database)
 

	
 
Full steps in http://packages.python.org/RhodeCode/upgrade.html
 
Full steps in http://packages.python.org/Kallithea/upgrade.html
docs/make.bat
Show inline comments
 
@@ -88,9 +88,9 @@ if "%1" == "qthelp" (
 
	echo.
 
	echo.Build finished; now you can run "qcollectiongenerator" with the ^
 
.qhcp project file in %BUILDDIR%/qthelp, like this:
 
	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\RhodeCode.qhcp
 
	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Kallithea.qhcp
 
	echo.To view the help file:
 
	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\RhodeCode.ghc
 
	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Kallithea.ghc
 
	goto end
 
)
 

	
docs/setup.rst
Show inline comments
 
@@ -5,66 +5,66 @@ Setup
 
=====
 

	
 

	
 
Setting up RhodeCode
 
Setting up Kallithea
 
--------------------
 

	
 
First, you will need to create a RhodeCode configuration file. Run the
 
First, you will need to create a Kallithea configuration file. Run the
 
following command to do this::
 

	
 
    paster make-config RhodeCode production.ini
 
    paster make-config Kallithea production.ini
 

	
 
- This will create the file `production.ini` in the current directory. This
 
  configuration file contains the various settings for RhodeCode, e.g proxy
 
  configuration file contains the various settings for Kallithea, e.g proxy
 
  port, email settings, usage of static files, cache, celery settings and
 
  logging.
 

	
 

	
 
Next, you need to create the databases used by RhodeCode. I recommend that you
 
Next, you need to create the databases used by Kallithea. I recommend that you
 
use postgresql or sqlite (default). If you choose a database other than the
 
default ensure you properly adjust the db url in your production.ini
 
configuration file to use this other database. RhodeCode currently supports
 
configuration file to use this other database. Kallithea currently supports
 
postgresql, sqlite and mysql databases. Create the database by running
 
the following command::
 

	
 
    paster setup-rhodecode production.ini
 
    paster setup-db production.ini
 

	
 
This will prompt you for a "root" path. This "root" path is the location where
 
RhodeCode will store all of its repositories on the current machine. After
 
entering this "root" path ``setup-rhodecode`` will also prompt you for a username
 
and password for the initial admin account which ``setup-rhodecode`` sets
 
Kallithea will store all of its repositories on the current machine. After
 
entering this "root" path ``setup-db`` will also prompt you for a username
 
and password for the initial admin account which ``setup-db`` sets
 
up for you.
 

	
 
setup process can be fully automated, example for lazy::
 

	
 
    paster setup-rhodecode production.ini --user=marcink --password=secret --email=marcin@rhodecode.org --repos=/home/marcink/my_repos
 
    paster setup-db production.ini --user=nn --password=secret --email=nn@your.kallithea.server --repos=/home/nn/my_repos
 

	
 

	
 
- The ``setup-rhodecode`` command will create all of the needed tables and an
 
- The ``setup-db`` command will create all of the needed tables and an
 
  admin account. When choosing a root path you can either use a new empty
 
  location, or a location which already contains existing repositories. If you
 
  choose a location which contains existing repositories RhodeCode will simply
 
  choose a location which contains existing repositories Kallithea will simply
 
  add all of the repositories at the chosen location to it's database.
 
  (Note: make sure you specify the correct path to the root).
 
- Note: the given path for mercurial_ repositories **must** be write accessible
 
  for the application. It's very important since the RhodeCode web interface
 
  for the application. It's very important since the Kallithea web interface
 
  will work without write access, but when trying to do a push it will
 
  eventually fail with permission denied errors unless it has write access.
 

	
 
You are now ready to use RhodeCode, to run it simply execute::
 
You are now ready to use Kallithea, to run it simply execute::
 

	
 
    paster serve production.ini
 

	
 
- This command runs the RhodeCode server. The web app should be available at the
 
- This command runs the Kallithea server. The web app should be available at the
 
  127.0.0.1:5000. This ip and port is configurable via the production.ini
 
  file created in previous step
 
- Use the admin account you created above when running ``setup-rhodecode``
 
- Use the admin account you created above when running ``setup-db``
 
  to login to the web app.
 
- The default permissions on each repository is read, and the owner is admin.
 
  Remember to update these if needed.
 
- In the admin panel you can toggle ldap, anonymous, permissions settings. As
 
  well as edit more advanced options on users and repositories
 

	
 
Optionally users can create `rcextensions` package that extends RhodeCode
 
Optionally users can create `rcextensions` package that extends Kallithea
 
functionality. To do this simply execute::
 

	
 
    paster make-rcext production.ini
 
@@ -77,36 +77,36 @@ Please see the `__init__.py` file inside
 
for more details.
 

	
 

	
 
Using RhodeCode with SSH
 
Using Kallithea with SSH
 
------------------------
 

	
 
RhodeCode currently only hosts repositories using http and https. (The addition
 
Kallithea currently only hosts repositories using http and https. (The addition
 
of ssh hosting is a planned future feature.) However you can easily use ssh in
 
parallel with RhodeCode. (Repository access via ssh is a standard "out of
 
parallel with Kallithea. (Repository access via ssh is a standard "out of
 
the box" feature of mercurial_ and you can use this to access any of the
 
repositories that RhodeCode is hosting. See PublishingRepositories_)
 
repositories that Kallithea is hosting. See PublishingRepositories_)
 

	
 
RhodeCode repository structures are kept in directories with the same name
 
Kallithea repository structures are kept in directories with the same name
 
as the project. When using repository groups, each group is a subdirectory.
 
This allows you to easily use ssh for accessing repositories.
 

	
 
In order to use ssh you need to make sure that your web-server and the users
 
login accounts have the correct permissions set on the appropriate directories.
 
(Note that these permissions are independent of any permissions you have set up
 
using the RhodeCode web interface.)
 
using the Kallithea web interface.)
 

	
 
If your main directory (the same as set in RhodeCode settings) is for example
 
set to **/home/hg** and the repository you are using is named `rhodecode`, then
 
If your main directory (the same as set in Kallithea settings) is for example
 
set to **/home/hg** and the repository you are using is named `kallithea`, then
 
to clone via ssh you should run::
 

	
 
    hg clone ssh://user@server.com/home/hg/rhodecode
 
    hg clone ssh://user@server.com/home/hg/kallithea
 

	
 
Using other external tools such as mercurial-server_ or using ssh key based
 
authentication is fully supported.
 

	
 
Note: In an advanced setup, in order for your ssh access to use the same
 
permissions as set up via the RhodeCode web interface, you can create an
 
authentication hook to connect to the rhodecode db and runs check functions for
 
permissions as set up via the Kallithea web interface, you can create an
 
authentication hook to connect to the Kallithea db and runs check functions for
 
permissions against that.
 

	
 
Setting up Whoosh full text search
 
@@ -116,7 +116,7 @@ Starting from version 1.1 the whoosh ind
 
command ``make-index``. To use ``make-index`` you must specify the configuration
 
file that stores the location of the index. You may specify the location of the
 
repositories (`--repo-location`).  If not specified, this value is retrieved
 
from the RhodeCode database.  This was required prior to 1.2.  Starting from
 
from the Kallithea database.  This was required prior to 1.2.  Starting from
 
version 1.2 it is also possible to specify a comma separated list of
 
repositories (`--index-only`) to build index only on chooses repositories
 
skipping any other found in repos location
 
@@ -135,14 +135,14 @@ For a full index rebuild use::
 

	
 
building index just for chosen repositories is possible with such command::
 

	
 
 paster make-index production.ini --index-only=vcs,rhodecode
 
 paster make-index production.ini --index-only=vcs,kallithea
 

	
 

	
 
In order to do periodical index builds and keep your index always up to date.
 
It's recommended to do a crontab entry for incremental indexing.
 
An example entry might look like this::
 

	
 
    /path/to/python/bin/paster make-index /path/to/rhodecode/production.ini
 
    /path/to/python/bin/paster make-index /path/to/kallithea/production.ini
 

	
 
When using incremental mode (the default) whoosh will check the last
 
modification date of each file and add it to be reindexed if a newer file is
 
@@ -156,7 +156,7 @@ or in the admin panel you can check `bui
 
Setting up LDAP support
 
-----------------------
 

	
 
RhodeCode starting from version 1.1 supports ldap authentication. In order
 
Kallithea starting from version 1.1 supports ldap authentication. In order
 
to use LDAP, you have to install the python-ldap_ package. This package is
 
available via pypi, so you can install it by running
 

	
 
@@ -314,7 +314,7 @@ LDAP Search Scope : required
 

	
 
Login Attribute : required
 
    The LDAP record attribute that will be matched as the USERNAME or
 
    ACCOUNT used to connect to RhodeCode.  This will be added to `LDAP
 
    ACCOUNT used to connect to Kallithea.  This will be added to `LDAP
 
    Filter`_ for locating the User object.  If `LDAP Filter`_ is specified as
 
    "LDAPFILTER", `Login Attribute`_ is specified as "uid" and the user has
 
    connected as "jsmith" then the `LDAP Filter`_ will be augmented as below
 
@@ -338,19 +338,19 @@ Email Attribute : required
 
    The LDAP record attribute which represents the user's email address.
 

	
 
If all data are entered correctly, and python-ldap_ is properly installed
 
users should be granted access to RhodeCode with ldap accounts.  At this
 
time user information is copied from LDAP into the RhodeCode user database.
 
users should be granted access to Kallithea with ldap accounts.  At this
 
time user information is copied from LDAP into the Kallithea user database.
 
This means that updates of an LDAP user object may not be reflected as a
 
user update in RhodeCode.
 
user update in Kallithea.
 

	
 
If You have problems with LDAP access and believe You entered correct
 
information check out the RhodeCode logs, any error messages sent from LDAP
 
information check out the Kallithea logs, any error messages sent from LDAP
 
will be saved there.
 

	
 
Active Directory
 
''''''''''''''''
 

	
 
RhodeCode can use Microsoft Active Directory for user authentication.  This
 
Kallithea can use Microsoft Active Directory for user authentication.  This
 
is done through an LDAP or LDAPS connection to Active Directory.  The
 
following LDAP configuration settings are typical for using Active
 
Directory ::
 
@@ -368,32 +368,32 @@ appropriately configured.
 
Authentication by container or reverse-proxy
 
--------------------------------------------
 

	
 
Starting with version 1.3, RhodeCode supports delegating the authentication
 
Starting with version 1.3, Kallithea supports delegating the authentication
 
of users to its WSGI container, or to a reverse-proxy server through which all
 
clients access the application.
 

	
 
When these authentication methods are enabled in RhodeCode, it uses the
 
When these authentication methods are enabled in Kallithea, it uses the
 
username that the container/proxy (Apache/Nginx/etc) authenticated and doesn't
 
perform the authentication itself. The authorization, however, is still done by
 
RhodeCode according to its settings.
 
Kallithea according to its settings.
 

	
 
When a user logs in for the first time using these authentication methods,
 
a matching user account is created in RhodeCode with default permissions. An
 
administrator can then modify it using RhodeCode's admin interface.
 
a matching user account is created in Kallithea with default permissions. An
 
administrator can then modify it using Kallithea's admin interface.
 
It's also possible for an administrator to create accounts and configure their
 
permissions before the user logs in for the first time.
 

	
 
Container-based authentication
 
''''''''''''''''''''''''''''''
 

	
 
In a container-based authentication setup, RhodeCode reads the user name from
 
In a container-based authentication setup, Kallithea reads the user name from
 
the ``REMOTE_USER`` server variable provided by the WSGI container.
 

	
 
After setting up your container (see `Apache's WSGI config`_), you'd need
 
to configure it to require authentication on the location configured for
 
RhodeCode.
 
Kallithea.
 

	
 
In order for RhodeCode to start using the provided username, you should set the
 
In order for Kallithea to start using the provided username, you should set the
 
following in the [app:main] section of your .ini file::
 

	
 
    container_auth_enabled = true
 
@@ -402,7 +402,7 @@ following in the [app:main] section of y
 
Proxy pass-through authentication
 
'''''''''''''''''''''''''''''''''
 

	
 
In a proxy pass-through authentication setup, RhodeCode reads the user name
 
In a proxy pass-through authentication setup, Kallithea reads the user name
 
from the ``X-Forwarded-User`` request header, which should be configured to be
 
sent by the reverse-proxy server.
 

	
 
@@ -420,8 +420,8 @@ reverse-proxy setup with basic auth::
 
      SetEnvIf X-Url-Scheme https HTTPS=1
 

	
 
      AuthType Basic
 
      AuthName "RhodeCode authentication"
 
      AuthUserFile /home/web/rhodecode/.htpasswd
 
      AuthName "Kallithea authentication"
 
      AuthUserFile /home/web/kallithea/.htpasswd
 
      require valid-user
 

	
 
      RequestHeader unset X-Forwarded-User
 
@@ -432,7 +432,7 @@ reverse-proxy setup with basic auth::
 
      RequestHeader set X-Forwarded-User %{RU}e
 
    </Location>
 

	
 
In order for RhodeCode to start using the forwarded username, you should set
 
In order for Kallithea to start using the forwarded username, you should set
 
the following in the [app:main] section of your .ini file::
 

	
 
    proxypass_auth_enabled = true
 
@@ -446,7 +446,7 @@ the following in the [app:main] section 
 
Integration with Issue trackers
 
-------------------------------
 

	
 
RhodeCode provides a simple integration with issue trackers. It's possible
 
Kallithea provides a simple integration with issue trackers. It's possible
 
to define a regular expression that will fetch issue id stored in commit
 
messages and replace that with an url to this issue. To enable this simply
 
uncomment following variables in the ini file::
 
@@ -477,24 +477,24 @@ There are 4 built in hooks that cannot b
 
checkboxes on previos section).
 
To add another custom hook simply fill in first section with
 
<name>.<hook_type> and the second one with hook path. Example hooks
 
can be found at *rhodecode.lib.hooks*.
 
can be found at *kallithea.lib.hooks*.
 

	
 

	
 
Changing default encoding
 
-------------------------
 

	
 
By default RhodeCode uses utf8 encoding, starting from 1.3 series this
 
By default Kallithea uses utf8 encoding, starting from 1.3 series this
 
can be changed, simply edit default_encoding in .ini file to desired one.
 
This affects many parts in rhodecode including committers names, filenames,
 
encoding of commit messages. In addition RhodeCode can detect if `chardet`
 
library is installed. If `chardet` is detected RhodeCode will fallback to it
 
This affects many parts in Kallithea including committers names, filenames,
 
encoding of commit messages. In addition Kallithea can detect if `chardet`
 
library is installed. If `chardet` is detected Kallithea will fallback to it
 
when there are encode/decode errors.
 

	
 

	
 
Setting Up Celery
 
-----------------
 

	
 
Since version 1.1 celery is configured by the rhodecode ini configuration files.
 
Since version 1.1 celery is configured by the Kallithea ini configuration files.
 
Simply set use_celery=true in the ini file then add / change the configuration
 
variables inside the ini file.
 

	
 
@@ -509,14 +509,14 @@ In order to start using celery run::
 

	
 
.. note::
 
   Make sure you run this command from the same virtualenv, and with the same
 
   user that rhodecode runs.
 
   user that Kallithea runs.
 

	
 
HTTPS support
 
-------------
 

	
 
There are two ways to enable https:
 

	
 
- Set HTTP_X_URL_SCHEME in your http server headers, than rhodecode will
 
- Set HTTP_X_URL_SCHEME in your http server headers, than Kallithea will
 
  recognize this headers and make proper https redirections
 
- Alternatively, change the `force_https = true` flag in the ini configuration
 
  to force using https, no headers are needed than to enable https
 
@@ -542,8 +542,8 @@ Sample config for nginx using proxy::
 
       error_log       /var/log/nginx/gist.error.log;
 

	
 
       ssl on;
 
       ssl_certificate     gist.rhodecode.myserver.com.crt;
 
       ssl_certificate_key gist.rhodecode.myserver.com.key;
 
       ssl_certificate     gist.your.kallithea.server.crt;
 
       ssl_certificate_key gist.your.kallithea.server.key;
 

	
 
       ssl_session_timeout 5m;
 

	
 
@@ -551,19 +551,19 @@ Sample config for nginx using proxy::
 
       ssl_ciphers DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:EDH-RSA-DES-CBC3-SHA:AES256-SHA:DES-CBC3-SHA:AES128-SHA:RC4-SHA:RC4-MD5;
 
       ssl_prefer_server_ciphers on;
 

	
 
       rewrite ^/(.+)$ https://rhodecode.myserver.com/_admin/gists/$1;
 
       rewrite (.*)    https://rhodecode.myserver.com/_admin/gists;
 
       rewrite ^/(.+)$ https://your.kallithea.server/_admin/gists/$1;
 
       rewrite (.*)    https://your.kallithea.server/_admin/gists;
 
    }
 

	
 
    server {
 
       listen          443;
 
       server_name     rhodecode.myserver.com;
 
       access_log      /var/log/nginx/rhodecode.access.log;
 
       error_log       /var/log/nginx/rhodecode.error.log;
 
       server_name     your.kallithea.server;
 
       access_log      /var/log/nginx/kallithea.access.log;
 
       error_log       /var/log/nginx/kallithea.error.log;
 

	
 
       ssl on;
 
       ssl_certificate     rhodecode.myserver.com.crt;
 
       ssl_certificate_key rhodecode.myserver.com.key;
 
       ssl_certificate     your.kallithea.server.crt;
 
       ssl_certificate_key your.kallithea.server.key;
 

	
 
       ssl_session_timeout 5m;
 

	
 
@@ -573,7 +573,7 @@ Sample config for nginx using proxy::
 

	
 
       ## uncomment root directive if you want to serve static files by nginx
 
       ## requires static_files = false in .ini file
 
       #root /path/to/installation/rhodecode/public;
 
       #root /path/to/installation/kallithea/public;
 
       include         /etc/nginx/proxy.conf;
 
       location / {
 
            try_files $uri @rhode;
 
@@ -626,7 +626,7 @@ Here is a sample configuration file for 
 
            #Directive to properly generate url (clone url) for pylons
 
            ProxyPreserveHost On
 

	
 
            #rhodecode instance
 
            #kallithea instance
 
            ProxyPass / http://127.0.0.1:5000/
 
            ProxyPassReverse / http://127.0.0.1:5000/
 

	
 
@@ -668,7 +668,7 @@ then change <someprefix> into your chose
 
Apache's WSGI config
 
--------------------
 

	
 
Alternatively, RhodeCode can be set up with Apache under mod_wsgi. For
 
Alternatively, Kallithea can be set up with Apache under mod_wsgi. For
 
that, you'll need to:
 

	
 
- Install mod_wsgi. If using a Debian-based distro, you can install
 
@@ -681,7 +681,7 @@ that, you'll need to:
 
    a2enmod wsgi
 

	
 
- Create a wsgi dispatch script, like the one below. Make sure you
 
  check the paths correctly point to where you installed RhodeCode
 
  check the paths correctly point to where you installed Kallithea
 
  and its Python Virtual Environment.
 
- Enable the WSGIScriptAlias directive for the wsgi dispatch script,
 
  as in the following example. Once again, check the paths are
 
@@ -691,8 +691,8 @@ Here is a sample excerpt from an Apache 
 

	
 
    WSGIDaemonProcess pylons \
 
        threads=4 \
 
        python-path=/home/web/rhodecode/pyenv/lib/python2.6/site-packages
 
    WSGIScriptAlias / /home/web/rhodecode/dispatch.wsgi
 
        python-path=/home/web/kallithea/pyenv/lib/python2.6/site-packages
 
    WSGIScriptAlias / /home/web/kallithea/dispatch.wsgi
 
    WSGIPassAuthorization On
 

	
 
.. note::
 
@@ -700,7 +700,7 @@ Here is a sample excerpt from an Apache 
 
   into above configuration
 

	
 
.. note::
 
   Running RhodeCode in multiprocess mode in apache is not supported,
 
   Running Kallithea in multiprocess mode in apache is not supported,
 
   make sure you don't specify `processes=num` directive in the config
 

	
 

	
 
@@ -708,22 +708,22 @@ Example wsgi dispatch script::
 

	
 
    import os
 
    os.environ["HGENCODING"] = "UTF-8"
 
    os.environ['PYTHON_EGG_CACHE'] = '/home/web/rhodecode/.egg-cache'
 
    os.environ['PYTHON_EGG_CACHE'] = '/home/web/kallithea/.egg-cache'
 

	
 
    # sometimes it's needed to set the curent dir
 
    os.chdir('/home/web/rhodecode/')
 
    os.chdir('/home/web/kallithea/')
 

	
 
    import site
 
    site.addsitedir("/home/web/rhodecode/pyenv/lib/python2.6/site-packages")
 
    site.addsitedir("/home/web/kallithea/pyenv/lib/python2.6/site-packages")
 

	
 
    from paste.deploy import loadapp
 
    from paste.script.util.logging_config import fileConfig
 

	
 
    fileConfig('/home/web/rhodecode/production.ini')
 
    application = loadapp('config:/home/web/rhodecode/production.ini')
 
    fileConfig('/home/web/kallithea/production.ini')
 
    application = loadapp('config:/home/web/kallithea/production.ini')
 

	
 
Note: when using mod_wsgi you'll need to install the same version of
 
Mercurial that's inside RhodeCode's virtualenv also on the system's Python
 
Mercurial that's inside Kallithea's virtualenv also on the system's Python
 
environment.
 

	
 

	
 
@@ -732,7 +732,7 @@ Other configuration files
 

	
 
Some example init.d scripts can be found in init.d directory::
 

	
 
  https://secure.rhodecode.org/rhodecode/files/beta/init.d
 
  https://kallithea-scm.org/repos/kallithea/files/tip/init.d/
 

	
 
.. _virtualenv: http://pypi.python.org/pypi/virtualenv
 
.. _python: http://www.python.org/
 
@@ -742,5 +742,4 @@ Some example init.d scripts can be found
 
.. _python-ldap: http://www.python-ldap.org/
 
.. _mercurial-server: http://www.lshift.net/mercurial-server.html
 
.. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
 
.. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues
 
.. _google group rhodecode: http://groups.google.com/group/rhodecode
 
.. _Issues tracker: https://bitbucket.org/conservancy/kallithea/issues
docs/theme/nature/layout.html
Show inline comments
 
{% extends "basic/layout.html" %}
 

	
 
{% block sidebarlogo %}
 
<h3>Support RhodeCode development.</h3>
 
<h3>Support Kallithea development</h3>
 
<div style="text-align:center">
 
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
 
        <input type="hidden" name="cmd" value="_s-xclick">
 
        <input type="hidden" name="hosted_button_id" value="8U2LLRPLBKWDU">
 
        <input style="border:0px !important" type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif"
 
        border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
 
        <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
 
    </form>
 
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
 
<input type="hidden" name="cmd" value="_s-xclick">
 
<input type="hidden" name="hosted_button_id" value="EYXFS3SQPHYUL">
 
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
 
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
 
</form>
 
    <div style="padding:5px">
 
     <a href="http://flattr.com/thing/167489/RhodeCode" target="_blank">
 
     <a href="https://flattr.com/thing/922714/Donate-to-Software-Freedom-Conservancy" target="_blank">
 
     <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
 
    </div>
 
</div>
docs/theme/nature/static/nature.css_t
Show inline comments
 
@@ -54,7 +54,7 @@ div.footer a {
 
}
 
 
 
div.related {
 
    background-color: #003367;
 
    background-color: #577632;
 
    line-height: 32px;
 
    color: #fff;
 
    text-shadow: 0px 1px 0 #444;
docs/upgrade.rst
Show inline comments
 
@@ -12,16 +12,16 @@ Upgrading from PyPI (aka "Cheeseshop")
 
   configuration backup before doing an upgrade.
 

	
 
   (These directions will use '{version}' to note that this is the version of
 
   Rhodecode that these files were used with.  If backing up your RhodeCode
 
   Kallithea that these files were used with.  If backing up your Kallithea
 
   instance from version 1.3.6 to 1.4.0, the ``production.ini`` file would be
 
   backed up to ``production.ini.1-3-6``.)
 

	
 

	
 
If using a sqlite database, stop the Rhodecode process/daemon/service, and
 
If using a sqlite database, stop the Kallithea process/daemon/service, and
 
then make a copy of the database file::
 

	
 
 service rhodecode stop
 
 cp rhodecode.db rhodecode.db.{version}
 
 service kallithea stop
 
 cp kallithea.db kallithea.db.{version}
 

	
 

	
 
Back up your configuration file::
 
@@ -30,30 +30,30 @@ Back up your configuration file::
 

	
 

	
 
Ensure that you are using the Python Virtual Environment that you'd originally
 
installed Rhodecode in::
 
installed Kallithea in::
 

	
 
 pip freeze
 

	
 
will list all packages installed in the current environment.  If Rhodecode
 
will list all packages installed in the current environment.  If Kallithea
 
isn't listed, change virtual environments to your venv location::
 

	
 
 source /opt/rhodecode-venv/bin/activate
 
 source /opt/kallithea-venv/bin/activate
 

	
 

	
 
Once you have verified the environment you can upgrade ``Rhodecode`` with::
 
Once you have verified the environment you can upgrade ``Kallithea`` with::
 

	
 
 easy_install -U rhodecode
 
 easy_install -U kallithea
 

	
 
Or::
 

	
 
 pip install --upgrade rhodecode
 
 pip install --upgrade kallithea
 

	
 

	
 
Then run the following command from the installation directory::
 

	
 
 paster make-config RhodeCode production.ini
 
 paster make-config Kallithea production.ini
 

	
 
This will display any changes made by the new version of RhodeCode to your
 
This will display any changes made by the new version of Kallithea to your
 
current configuration. It will try to perform an automerge. It's recommended
 
that you re-check the content after the automerge.
 

	
 
@@ -80,21 +80,21 @@ options that need to be set.
 
   DB schema upgrade library has some limitations and can sometimes fail if you try to
 
   upgrade from older major releases. In such case simply run upgrades sequentially, eg.
 
   upgrading from 1.2.X to 1.5.X should be done like that: 1.2.X. > 1.3.X > 1.4.X > 1.5.X
 
   You can always specify what version of RhodeCode you want to install for example in pip
 
   `pip install RhodeCode==1.3.6`
 
   You can always specify what version of Kallithea you want to install for example in pip
 
   `pip install Kallithea==1.3.6`
 

	
 
You may find it helpful to clear out your log file so that new errors are
 
readily apparent::
 

	
 
 echo > rhodecode.log
 
 echo > kallithea.log
 

	
 
Once that is complete, you may now start your upgraded Rhodecode Instance::
 
Once that is complete, you may now start your upgraded Kallithea Instance::
 

	
 
 service rhodecode start
 
 service kallithea start
 

	
 
Or::
 

	
 
 paster serve /var/www/rhodecode/production.ini
 
 paster serve /var/www/kallithea/production.ini
 

	
 
.. note::
 
   If you're using Celery, make sure you restart all instances of it after
docs/usage/backup.rst
Show inline comments
 
.. _backup:
 

	
 
====================
 
Backing up RhodeCode
 
Backing up Kallithea
 
====================
 

	
 

	
 
Settings
 
--------
 

	
 
Just copy your .ini file, it contains all RhodeCode settings.
 
Just copy your .ini file, it contains all Kallithea settings.
 

	
 
Whoosh index
 
------------
 

	
 
Whoosh index is located in **/data/index** directory where you installed
 
RhodeCode ie. the same place where the ini file is located
 
Kallithea ie. the same place where the ini file is located
 

	
 

	
 
Database
 
--------
 

	
 
When using sqlite just copy rhodecode.db.
 
When using sqlite just copy kallithea.db.
 
Any other database engine requires a manual backup operation.
 

	
 
Database backup will contain all gathered statistics
docs/usage/debugging.rst
Show inline comments
 
.. _debugging:
 

	
 
===================
 
Debugging RhodeCode
 
Debugging Kallithea
 
===================
 

	
 
If you encountered problems with RhodeCode here are some instructions how to
 
If you encountered problems with Kallithea here are some instructions how to
 
possibly debug them.
 

	
 
** First make sure you're using the latest version available.**
 
@@ -12,7 +12,7 @@ possibly debug them.
 
enable detailed debug
 
---------------------
 

	
 
RhodeCode uses standard python logging modules to log it's output.
 
Kallithea uses standard python logging modules to log it's output.
 
By default only loggers with INFO level are displayed. To enable full output
 
change `level = DEBUG` for all logging handlers in currently used .ini file.
 
This change will allow to see much more detailed output in the logfile or
docs/usage/general.rst
Show inline comments
 
.. _general:
 

	
 
=======================
 
General RhodeCode usage
 
General Kallithea usage
 
=======================
 

	
 

	
 
Repository deleting
 
-------------------
 

	
 
Currently when admin/owner deletes a repository, RhodeCode does not physically
 
Currently when admin/owner deletes a repository, Kallithea does not physically
 
delete a repository from filesystem, it renames it in a special way so it's
 
not possible to push,clone or access repository. It's worth a notice that,
 
even if someone will be given administrative access to RhodeCode and will
 
even if someone will be given administrative access to Kallithea and will
 
delete a repository You can easy restore such action by restoring `rm__<date>`
 
from the repository name, and internal repository storage (.hg/.git). There
 
is also a special command for cleaning such archived repos::
 
@@ -60,7 +60,7 @@ example::
 

	
 
This can be an issue for build systems and any other hardcoded scripts, moving
 
repository to a group leads to a need for changing external systems. To
 
overcome this RhodeCode introduces a non changable replacement url. It's
 
overcome this Kallithea introduces a non changable replacement url. It's
 
simply an repository ID prefixed with `_` above urls are also accessible as::
 

	
 
  http://server.com/_<ID>
 
@@ -74,13 +74,13 @@ Mailing
 
-------
 

	
 
When administrator will fill up the mailing settings in .ini files
 
RhodeCode will send mails on user registration, or when RhodeCode errors occur
 
Kallithea will send mails on user registration, or when Kallithea errors occur
 
on errors the mails will have a detailed traceback of error.
 

	
 

	
 
Mails are also sent for code comments. If someone comments on a changeset
 
mail is sent to all participants, the person who commited the changeset
 
(if present in RhodeCode), and to all people mentioned with @mention system.
 
(if present in Kallithea), and to all people mentioned with @mention system.
 

	
 

	
 
Trending source files
 
@@ -89,13 +89,13 @@ Trending source files
 
Trending source files are calculated based on pre defined dict of known
 
types and extensions. If You miss some extension or Would like to scan some
 
custom files it's possible to add new types in `LANGUAGES_EXTENSIONS_MAP` dict
 
located in `/rhodecode/lib/celerylib/tasks.py`
 
located in `/kallithea/lib/celerylib/tasks.py`
 

	
 

	
 
Cloning remote repositories
 
---------------------------
 

	
 
RhodeCode has an ability to clone remote repos from given remote locations.
 
Kallithea has an ability to clone remote repos from given remote locations.
 
Currently it support following options:
 

	
 
- hg  -> hg clone
 
@@ -109,9 +109,9 @@ Currently it support following options:
 

	
 
If you need to clone repositories that are protected via basic auth, you
 
might pass the url with stored credentials inside eg.
 
`http://user:passw@remote.server/repo`, RhodeCode will try to login and clone
 
`http://user:passw@remote.server/repo`, Kallithea will try to login and clone
 
using given credentials. Please take a note that they will be stored as
 
plaintext inside the database. RhodeCode will remove auth info when showing the
 
plaintext inside the database. Kallithea will remove auth info when showing the
 
clone url in summary page.
 

	
 

	
 
@@ -120,7 +120,7 @@ Visual settings in admin pannel
 
-------------------------------
 

	
 

	
 
Visualisation settings in RhodeCode settings view are extra customizations
 
Visualisation settings in Kallithea settings view are extra customizations
 
of server behavior. There are 3 main section in the settings.
 

	
 
General
 
@@ -133,7 +133,7 @@ define company specific information into
 
key that would add give info about a manager of each repository. There's no
 
limit for adding custom fields. Newly created fields are accessible via API.
 

	
 
`Show RhodeCode version` option toggles displaying exact RhodeCode version in
 
`Show Kallithea version` option toggles displaying exact Kallithea version in
 
the footer
 

	
 

	
 
@@ -153,7 +153,7 @@ public/private icons should be shown in 
 
Meta-Tagging
 
~~~~~~~~~~~~
 

	
 
With this option enabled, special metatags that are recognisible by RhodeCode
 
With this option enabled, special metatags that are recognisible by Kallithea
 
will be turned into colored tags. Currently available tags are::
 

	
 
    [featured]
docs/usage/git_support.rst
Show inline comments
 
@@ -5,18 +5,18 @@ GIT support
 
===========
 

	
 

	
 
Git support in RhodeCode 1.3 was enabled by default. You need to have a git
 
Git support in Kallithea 1.3 was enabled by default. You need to have a git
 
client installed on the machine to make git fully work.
 

	
 
Although There is one limitation on git usage.
 

	
 
- large pushes requires a http server with chunked encoding support.
 

	
 
if you plan to use git you need to run RhodeCode with some
 
if you plan to use git you need to run Kallithea with some
 
http server that supports chunked encoding which git http protocol uses,
 
i recommend using waitress_ or gunicorn_ (linux only) for `paste` wsgi app
 
replacement. Starting from version 1.4 waitress_ is the default wsgi server
 
used in RhodeCode.
 
used in Kallithea.
 

	
 
To use, simply change change the following in the .ini file::
 

	
 
@@ -42,7 +42,7 @@ You can simply run `paster serve` as usu
 

	
 

	
 
You can always disable git/hg support by editing a
 
file **rhodecode/__init__.py** and commenting out backends
 
file **kallithea/__init__.py** and commenting out backends
 

	
 
.. code-block:: python
 

	
docs/usage/locking.rst
Show inline comments
 
.. _locking:
 

	
 
===================================
 
RhodeCode repository locking system
 
Kallithea repository locking system
 
===================================
 

	
 

	
 
@@ -20,7 +20,7 @@ influence this state:
 
  user has write/admin permissions on this repo
 

	
 

	
 
RhodeCode will remember the user id who locked the repo
 
Kallithea will remember the user id who locked the repo
 
only this specific user can unlock the repo (locked=false) by calling
 

	
 
- `hg/git push <repo>`
docs/usage/performance.rst
Show inline comments
 
.. _performance:
 

	
 
================================
 
Optimizing RhodeCode Performance
 
Optimizing Kallithea Performance
 
================================
 

	
 
When serving large amount of big repositories RhodeCode can start
 
When serving large amount of big repositories Kallithea can start
 
performing slower than expected. Because of demanding nature of handling large
 
amount of data from version control systems here are some tips how to get
 
the best performance.
 

	
 
* RhodeCode will perform better on machines with faster disks (SSD/SAN). It's
 
* Kallithea will perform better on machines with faster disks (SSD/SAN). It's
 
  more important to have faster disk than faster CPU.
 

	
 
* Slowness on initial page can be easily fixed by grouping repositories, and/or
 
@@ -17,7 +17,7 @@ the best performance.
 
  option and vcs_full_cache setting in .ini file
 

	
 

	
 
Follow these few steps to improve performance of RhodeCode system.
 
Follow these few steps to improve performance of Kallithea system.
 

	
 

	
 
1. Increase cache
 
@@ -30,7 +30,7 @@ Follow these few steps to improve perfor
 
    few hundreds of repositories on main page can sometimes make the system
 
    to behave slow when cache expires for all of them. Increasing `expire`
 
    option to day (86400) or a week (604800) will improve general response
 
    times for the main page. RhodeCode has an intelligent cache expiration
 
    times for the main page. Kallithea has an intelligent cache expiration
 
    system and it will expire cache for repositories that had been changed.
 

	
 
2. Switch from sqlite to postgres or mysql
 
@@ -40,10 +40,10 @@ Follow these few steps to improve perfor
 
    setup. Switching to mysql or postgres will result in a immediate
 
    performance increase.
 

	
 
3. Scale RhodeCode horizontally
 
3. Scale Kallithea horizontally
 

	
 
    Scaling horizontally can give huge performance increase when dealing with
 
    large traffic (large amount of users, CI servers etc). RhodeCode can be
 
    large traffic (large amount of users, CI servers etc). Kallithea can be
 
    scaled horizontally on one (recommended) or multiple machines. In order
 
    to scale horizontally you need to do the following:
 

	
 
@@ -53,7 +53,7 @@ Follow these few steps to improve perfor
 
      dir contains template caches, sessions, whoosh index and it's used for
 
      tasks locking (so it's safe across multiple instances). Set the
 
      `cache_dir`, `index_dir`, `beaker.cache.data_dir`, `beaker.cache.lock_dir`
 
      variables in each .ini file to shared location across RhodeCode instances
 
      variables in each .ini file to shared location across Kallithea instances
 
    - if celery is used each instance should run separate celery instance, but
 
      the message broken should be common to all of them (ex one rabbitmq
 
      shared server)
docs/usage/statistics.rst
Show inline comments
 
@@ -4,9 +4,9 @@
 
Statistics
 
==========
 

	
 
The RhodeCode statistics system makes heavy demands of the server resources, so
 
The Kallithea statistics system makes heavy demands of the server resources, so
 
in order to keep a balance between usability and performance, the statistics are
 
cached inside db and are gathered incrementally, this is how RhodeCode does
 
cached inside db and are gathered incrementally, this is how Kallithea does
 
this:
 

	
 
With Celery disabled
 
@@ -16,14 +16,14 @@ With Celery disabled
 
  updates statistics cache.
 
- This happens on each single visit to the statistics page until all commits are
 
  fetched. Statistics are kept cached until additional commits are added to the
 
  repository. In such a case RhodeCode will only fetch the new commits when
 
  repository. In such a case Kallithea will only fetch the new commits when
 
  updating it's cache.
 

	
 

	
 
With Celery enabled
 
-------------------
 

	
 
- On the first visit to the summary page RhodeCode will create tasks that will
 
- On the first visit to the summary page Kallithea will create tasks that will
 
  execute on celery workers. This task will gather all of the stats until all
 
  commits are parsed, each task will parse 250 commits, and run the next task to
 
  parse next 250 commits, until all of the commits are parsed.
docs/usage/subrepos.rst
Show inline comments
 
.. _subrepos:
 

	
 
=============================================
 
working with RhodeCode and mercurial subrepos
 
working with Kallithea and mercurial subrepos
 
=============================================
 

	
 
example usage of Subrepos with RhodeCode::
 
example usage of Subrepos with Kallithea::
 

	
 
    ## init a simple repo
 
    hg init repo1
 
@@ -16,7 +16,7 @@ example usage of Subrepos with RhodeCode
 
    #clone subrepo we want to add
 
    hg clone http://rc.local/subrepo
 

	
 
    ## use path like url to existing repo in RhodeCode
 
    ## use path like url to existing repo in Kallithea
 
    echo "subrepo = http://rc.local/subrepo" > .hgsub
 

	
 
    hg add .hgsub
 
@@ -26,11 +26,11 @@ example usage of Subrepos with RhodeCode
 

	
 
In file list of repo1 you will see a connected subrepo at revision it was
 
during cloning.
 
Clicking in subrepos link should send you to proper repository in RhodeCode
 
Clicking in subrepos link should send you to proper repository in Kallithea
 

	
 
cloning repo1 will also clone attached subrepository.
 

	
 
Next we can edit the subrepo data, and push back to RhodeCode. This will update
 
Next we can edit the subrepo data, and push back to Kallithea. This will update
 
both of repositories.
 

	
 
see http://mercurial.aragost.com/kick-start/en/subrepositories/ for more
docs/usage/troubleshooting.rst
Show inline comments
 
@@ -9,19 +9,19 @@ Troubleshooting
 
:A: Make sure either to set the `static_files = true` in the .ini file or
 
   double check the root path for your http setup. It should point to
 
   for example:
 
   /home/my-virtual-python/lib/python2.6/site-packages/rhodecode/public
 
   /home/my-virtual-python/lib/python2.6/site-packages/kallithea/public
 

	
 
|
 

	
 
:Q: **Can't install celery/rabbitmq?**
 
:A: Don't worry RhodeCode works without them too. No extra setup is required.
 
:A: Don't worry Kallithea works without them too. No extra setup is required.
 
    Try out great celery docs for further help.
 

	
 
|
 

	
 
:Q: **Long lasting push timeouts?**
 
:A: Make sure you set a longer timeouts in your proxy/fcgi settings, timeouts
 
    are caused by https server and not RhodeCode.
 
    are caused by https server and not Kallithea.
 

	
 
|
 

	
 
@@ -43,16 +43,16 @@ Troubleshooting
 

	
 
|
 

	
 
:Q: **How i use hooks in RhodeCode?**
 
:Q: **How i use hooks in Kallithea?**
 
:A: It's easy if they are python hooks just use advanced link in hooks section
 
    in Admin panel, that works only for Mercurial. If you want to use githooks,
 
    just install proper one in repository eg. create file in
 
    `/gitrepo/hooks/pre-receive`. You can also use RhodeCode-extensions to
 
    `/gitrepo/hooks/pre-receive`. You can also use Kallithea-extensions to
 
    connect to callback hooks, for both Git and Mercurial.
 

	
 
|
 

	
 
:Q: **RhodeCode is slow for me, how can i make it faster?**
 
:Q: **Kallithea is slow for me, how can i make it faster?**
 
:A: See the :ref:`performance` section
 

	
 
|
 
@@ -67,9 +67,6 @@ Troubleshooting
 
    you have installed latest windows patches (especially KB2789397)
 

	
 

	
 
For further questions search the `Issues tracker`_, or post a message in the
 
`google group rhodecode`_
 

	
 
.. _virtualenv: http://pypi.python.org/pypi/virtualenv
 
.. _python: http://www.python.org/
 
.. _mercurial: http://mercurial.selenic.com/
 
@@ -78,5 +75,4 @@ For further questions search the `Issues
 
.. _python-ldap: http://www.python-ldap.org/
 
.. _mercurial-server: http://www.lshift.net/mercurial-server.html
 
.. _PublishingRepositories: http://mercurial.selenic.com/wiki/PublishingRepositories
 
.. _Issues tracker: https://bitbucket.org/marcinkuzminski/rhodecode/issues
 
.. _google group rhodecode: http://groups.google.com/group/rhodecode
 
.. _Issues tracker: https://bitbucket.org/conservancy/kallithea/issues
init.d/celeryd-upstart.conf
Show inline comments
 
# celeryd - run the celeryd daemon as an upstart job for rhodecode
 
# celeryd - run the celeryd daemon as an upstart job for kallithea
 
# Change variables/paths as necessary and place file /etc/init/celeryd.conf
 
# start/stop/restart as normal upstart job (ie: $ start celeryd)
 

	
 
description	"Celery for RhodeCode Mercurial Server"
 
description	"Celery for Kallithea Mercurial Server"
 
author		"Matt Zuba <matt.zuba@goodwillaz.org"
 

	
 
start on starting rhodecode
 
stop on stopped rhodecode
 
start on starting kallithea
 
stop on stopped kallithea
 

	
 
respawn
 

	
 
umask 0022
 

	
 
env PIDFILE=/tmp/celeryd.pid
 
env APPINI=/var/hg/rhodecode/production.ini
 
env APPINI=/var/hg/kallithea/production.ini
 
env HOME=/var/hg
 
env USER=hg
 
# To use group (if different from user), you must edit sudoers file and change
 
@@ -21,7 +21,7 @@ env USER=hg
 
# env GROUP=hg
 

	
 
script
 
    COMMAND="/var/hg/.virtualenvs/rhodecode/bin/paster celeryd $APPINI --pidfile=$PIDFILE"
 
    COMMAND="/var/hg/.virtualenvs/kallithea/bin/paster celeryd $APPINI --pidfile=$PIDFILE"
 
    if [ -z "$GROUP" ]; then
 
        exec sudo -u $USER $COMMAND
 
    else
init.d/kallithea-daemon-arch
Show inline comments
 
file renamed from init.d/rhodecode-daemon4 to init.d/kallithea-daemon-arch
 
@@ -6,7 +6,7 @@
 
. /etc/rc.conf
 
. /etc/rc.d/functions
 

	
 
DAEMON=rhodecode
 
DAEMON=kallithea
 
APP_HOMEDIR="/srv"
 
APP_PATH="$APP_HOMEDIR/$DAEMON"
 
CONF_NAME="production.ini"
init.d/kallithea-daemon-debian
Show inline comments
 
file renamed from init.d/rhodecode-daemon2 to init.d/kallithea-daemon-debian
 
@@ -4,16 +4,16 @@
 
########################################
 
 
 
### BEGIN INIT INFO
 
# Provides:          rhodecode          
 
# Provides:          kallithea          
 
# Required-Start:    $all
 
# Required-Stop:     $all
 
# Default-Start:     2 3 4 5
 
# Default-Stop:      0 1 6
 
# Short-Description: starts instance of rhodecode
 
# Description:       starts instance of rhodecode using start-stop-daemon
 
# Short-Description: starts instance of kallithea
 
# Description:       starts instance of kallithea using start-stop-daemon
 
### END INIT INFO
 
 
 
APP_NAME="rhodecode"
 
APP_NAME="kallithea"
 
APP_HOMEDIR="opt"
 
APP_PATH="/$APP_HOMEDIR/$APP_NAME"
 
 
init.d/kallithea-daemon-gentoo
Show inline comments
 
file renamed from init.d/rhodecode-daemon to init.d/kallithea-daemon-gentoo
 
@@ -3,8 +3,8 @@
 
#### THIS IS AN GENTOO INIT.D SCRIPT####
 
########################################
 

	
 
APP_NAME="rhodecode"
 
APP_HOMEDIR="marcink/python_workspace"
 
APP_NAME="kallithea"
 
APP_HOMEDIR="username/python_workspace"
 
APP_PATH="/home/$APP_HOMEDIR/$APP_NAME"
 

	
 
CONF_NAME="production.ini"
 
@@ -14,7 +14,7 @@ LOG_PATH="$APP_PATH/$APP_NAME.log"
 

	
 
PYTHON_PATH="/home/$APP_HOMEDIR/v-env"
 

	
 
RUN_AS="marcink"
 
RUN_AS="username"
 

	
 
DAEMON="$PYTHON_PATH/bin/paster"
 

	
init.d/kallithea-daemon-redhat
Show inline comments
 
file renamed from init.d/rhodecode-daemon3 to init.d/kallithea-daemon-redhat
 
@@ -5,14 +5,14 @@
 

	
 
##################################################
 
#
 
# RhodeCode server startup script
 
# Kallithea server startup script
 
# Recommended default-startup: 2 3 4 5
 
# Recommended default-stop: 0 1 6
 
#
 
##################################################
 

	
 

	
 
APP_NAME="rhodecode"
 
APP_NAME="kallithea"
 
# the location of your app
 
# since this is a web app, it should go in /var/www
 
APP_PATH="/var/www/$APP_NAME"
 
@@ -22,14 +22,14 @@ CONF_NAME="production.ini"
 
# write to wherever the PID should be stored, just ensure
 
# that the user you run paster as has the appropriate permissions
 
# same goes for the log file
 
PID_PATH="/var/run/rhodecode/pid"
 
LOG_PATH="/var/log/rhodecode/rhodecode.log"
 
PID_PATH="/var/run/kallithea/pid"
 
LOG_PATH="/var/log/kallithea/kallithea.log"
 

	
 
# replace this with the path to the virtual environment you
 
# made for RhodeCode
 
PYTHON_PATH="/opt/python_virtualenvironments/rhodecode-venv"
 
# made for Kallithea
 
PYTHON_PATH="/opt/python_virtualenvironments/kallithea-venv"
 

	
 
RUN_AS="rhodecode"
 
RUN_AS="kallithea"
 

	
 
DAEMON="$PYTHON_PATH/bin/paster"
 

	
 
@@ -39,7 +39,7 @@ DAEMON_OPTS="serve --daemon \
 
    --pid-file=$PID_PATH \
 
    --log-file=$LOG_PATH $APP_PATH/$CONF_NAME"
 

	
 
DESC="rhodecode-server"
 
DESC="kallithea-server"
 
LOCK_FILE="/var/lock/subsys/$APP_NAME"
 

	
 
# source CentOS init functions
 
@@ -61,7 +61,7 @@ ensure_pid_dir () {
 
  fi
 
}
 

	
 
start_rhodecode () {
 
start_kallithea () {
 
    ensure_pid_dir
 
    PYTHON_EGG_CACHE="/tmp" daemon --pidfile $PID_PATH \
 
        --user $RUN_AS "$DAEMON $DAEMON_OPTS"
 
@@ -70,7 +70,7 @@ start_rhodecode () {
 
    return $RETVAL
 
}
 

	
 
stop_rhodecode () {
 
stop_kallithea () {
 
    if [ -e $LOCK_FILE ]; then
 
      killproc -p $PID_PATH
 
      RETVAL=$?
 
@@ -82,7 +82,7 @@ stop_rhodecode () {
 
    return $RETVAL
 
}
 

	
 
status_rhodecode() {
 
status_kallithea() {
 
  if [ -e $LOCK_FILE ]; then
 
    # exit with non-zero to indicate failure
 
    RETVAL=1
 
@@ -92,35 +92,35 @@ status_rhodecode() {
 
  return $RETVAL
 
}
 

	
 
restart_rhodecode () {
 
    stop_rhodecode
 
    start_rhodecode
 
restart_kallithea () {
 
    stop_kallithea
 
    start_kallithea
 
    RETVAL=$?
 
}
 

	
 
case "$1" in
 
  start)
 
    echo -n $"Starting $DESC: "
 
    start_rhodecode
 
    start_kallithea
 
    echo
 
    ;;
 
  stop)
 
    echo -n $"Stopping $DESC: "
 
    stop_rhodecode
 
    stop_kallithea
 
    echo
 
    ;;
 
  status)
 
    status_rhodecode
 
    status_kallithea
 
    RETVAL=$?
 
    if [ ! $RETVAL -eq 0 ]; then
 
      echo "RhodeCode server is running..."
 
      echo "Kallithea server is running..."
 
    else
 
      echo "RhodeCode server is stopped."
 
      echo "Kallithea server is stopped."
 
    fi
 
    ;;
 
  restart)
 
    echo -n $"Restarting $DESC: "
 
    restart_rhodecode
 
    restart_kallithea
 
    echo
 
    ;;
 
  *)
init.d/kallithea-upstart.conf
Show inline comments
 
file renamed from init.d/rhodecode-upstart.conf to init.d/kallithea-upstart.conf
 
# rhodecode - run the rhodecode daemon as an upstart job
 
# Change variables/paths as necessary and place file /etc/init/rhodecode.conf
 
# start/stop/restart as normal upstart job (ie: $ start rhodecode)
 
# kallithea - run the kallithea daemon as an upstart job
 
# Change variables/paths as necessary and place file /etc/init/kallithea.conf
 
# start/stop/restart as normal upstart job (ie: $ start kallithea)
 

	
 
description	"RhodeCode Mercurial Server"
 
description	"Kallithea Mercurial Server"
 
author		"Matt Zuba <matt.zuba@goodwillaz.org"
 

	
 
start on (local-filesystems and runlevel [2345])
 
@@ -12,14 +12,14 @@ respawn
 

	
 
umask 0022
 

	
 
env PIDFILE=/var/hg/rhodecode/rhodecode.pid
 
env LOGFILE=/var/hg/rhodecode/log/rhodecode.log
 
env APPINI=/var/hg/rhodecode/production.ini
 
env PIDFILE=/var/hg/kallithea/kallithea.pid
 
env LOGFILE=/var/hg/kallithea/log/kallithea.log
 
env APPINI=/var/hg/kallithea/production.ini
 
env HOME=/var/hg
 
env USER=hg
 
env GROUP=hg
 

	
 
exec /var/hg/.virtualenvs/rhodecode/bin/paster serve --user=$USER --group=$GROUP --pid-file=$PIDFILE --log-file=$LOGFILE $APPINI
 
exec /var/hg/.virtualenvs/kallithea/bin/paster serve --user=$USER --group=$GROUP --pid-file=$PIDFILE --log-file=$LOGFILE $APPINI
 

	
 
post-stop script
 
	rm -f $PIDFILE
init.d/supervisord.conf
Show inline comments
 
; RhodeCode Supervisord
 
; Kallithea Supervisord
 
; ##########################
 
; for help see http://supervisord.org/configuration.html
 
; ##########################
 
@@ -9,21 +9,21 @@ port=127.0.0.1:9001        ; (ip_address
 
;password=123               ; (default is no password (open server))
 

	
 
[supervisord]
 
logfile=/%(here)s/supervisord_rhodecode.log ; (main log file;default $CWD/supervisord.log)
 
logfile=/%(here)s/supervisord_kallithea.log ; (main log file;default $CWD/supervisord.log)
 
logfile_maxbytes=50MB        ; (max main logfile bytes b4 rotation;default 50MB)
 
logfile_backups=10           ; (num of main logfile rotation backups;default 10)
 
loglevel=info                ; (log level;default info; others: debug,warn,trace)
 
pidfile=/%(here)s/supervisord_rhodecode.pid ; (supervisord pidfile;default supervisord.pid)
 
pidfile=/%(here)s/supervisord_kallithea.pid ; (supervisord pidfile;default supervisord.pid)
 
nodaemon=true               ; (start in foreground if true;default false)
 
minfds=1024                  ; (min. avail startup file descriptors;default 1024)
 
minprocs=200                 ; (min. avail process descriptors;default 200)
 
umask=022                    ; (process file creation umask;default 022)
 
user=marcink                  ; (default is current user, required if root)
 
user=username                  ; (default is current user, required if root)
 
;identifier=supervisor       ; (supervisord identifier, default is 'supervisor')
 
;directory=/tmp              ; (default is not to cd during start)
 
;nocleanup=true              ; (don't clean up tempfiles at start;default false)
 
;childlogdir=/tmp            ; ('AUTO' child log dir, default $TEMP)
 
environment=HOME=/home/marcink       ; (key value pairs to add to environment)
 
environment=HOME=/home/username       ; (key value pairs to add to environment)
 
;strip_ansi=false            ; (strip ansi escape codes in logs; def. false)
 

	
 
; the below section must remain in the config file for RPC
 
@@ -40,12 +40,12 @@ serverurl=http://127.0.0.1:9001 ; use an
 
;history_file=~/.sc_history  ; use readline history if available
 

	
 

	
 
; restart with supervisorctl restart rhodecode:*
 
[program:rhodecode]
 
; restart with supervisorctl restart kallithea:*
 
[program:kallithea]
 
numprocs = 1
 
numprocs_start = 5000 # possible should match ports
 
directory=/home/marcink/rhodecode-dir
 
command = /home/marcink/v-env/bin/paster serve rc.ini
 
directory=/home/username/kallithea-dir
 
command = /home/username/v-env/bin/paster serve rc.ini
 
process_name = %(program_name)s_%(process_num)04d
 
redirect_stderr=true 
 
stdout_logfile=/%(here)s/rhodecode.log 
 
\ No newline at end of file
 
stdout_logfile=/%(here)s/kallithea.log 
 
\ No newline at end of file
kallithea/__init__.py
Show inline comments
 
file renamed from rhodecode/__init__.py to kallithea/__init__.py
 
# -*- coding: utf-8 -*-
 
"""
 
    rhodecode.__init__
 
    ~~~~~~~~~~~~~~~~~~
 

	
 
    RhodeCode, a web based repository management based on pylons
 
    versioning implementation: http://www.python.org/dev/peps/pep-0386/
 

	
 
    :created_on: Apr 9, 2010
 
    :author: marcink
 
    :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com>
 
    :license: GPLv3, see COPYING for more details.
 
"""
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
@@ -23,10 +11,25 @@
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
kallithea.__init__
 
~~~~~~~~~~~~~~~~~~
 

	
 
Kallithea, a web based repository management based on pylons
 
versioning implementation: http://www.python.org/dev/peps/pep-0386/
 

	
 
This file was forked by the Kallithea project in July 2014.
 
Original author and date, and relevant copyright and licensing information is below:
 
:created_on: Apr 9, 2010
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH, (C) 2014 Bradley M. Kuhn, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
 

	
 
import sys
 
import platform
 

	
 
VERSION = (1, 7, 1)
 
VERSION = (0,)
 
BACKENDS = {
 
    'hg': 'Mercurial repository',
 
    'git': 'Git repository',
 
@@ -41,22 +44,52 @@ CONFIG = {}
 
# Linked module for extensions
 
EXTENSIONS = {}
 

	
 
# BRAND controls internal references in database and config to the products
 
# own name.
 
#
 
# NOTE: If you want compatibility with a database that was originally created
 
#  for use with the RhodeCode software product, change BRAND to "rhodecode",
 
#  either by editing here or by creating a new file:
 
#  echo "BRAND = 'rhodecode'" > kallithea/brand.py
 

	
 
BRAND = "kallithea"
 
try:
 
    from rhodecode.lib import get_current_revision
 
    from kallithea.brand import BRAND
 
except ImportError:
 
    pass
 

	
 
# Prefix for the ui and settings table names
 
DB_PREFIX = (BRAND + "_") if BRAND != "kallithea" else ""
 

	
 
# Users.extern_type and .extern_name value for local users
 
EXTERN_TYPE_INTERNAL = BRAND if BRAND != 'kallithea' else 'internal'
 

	
 
# db_migrate_version.repository_id value, same as kallithea/lib/dbmigrate/migrate.cfg
 
DB_MIGRATIONS = BRAND + "_db_migrations"
 

	
 
try:
 
    from kallithea.lib import get_current_revision
 
    _rev = get_current_revision(quiet=True)
 
    if _rev and len(VERSION) > 3:
 
        VERSION += ('%s' % _rev[0],)
 
except ImportError:
 
    pass
 

	
 
__version__ = ('.'.join((str(each) for each in VERSION[:3])) +
 
               '.'.join(VERSION[3:]))
 
__dbversion__ = 14  # defines current db version for migrations
 
__version__ = ('.'.join((str(each) for each in VERSION[:3])))
 
__dbversion__ = 31  # defines current db version for migrations
 
__platform__ = platform.system()
 
__license__ = 'GPLv3'
 
__py_version__ = sys.version_info
 
__author__ = 'Marcin Kuzminski'
 
__url__ = 'http://rhodecode.org'
 
__author__ = "Various Authors"
 
__url__ = 'https://kallithea-scm.org/'
 

	
 
is_windows = __platform__ in ['Windows']
 
is_unix = not is_windows
 

	
 
if len(VERSION) > 3:
 
    __version__ += '.'+VERSION[3]
 

	
 
    if len(VERSION) > 4:
 
        __version__ += VERSION[4]
 
    else:
 
        __version__ += '0'
kallithea/bin/__init__.py
Show inline comments
 
file renamed from rhodecode/bin/__init__.py to kallithea/bin/__init__.py
 
# -*- coding: utf-8 -*-
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
kallithea.bin.__init__
 
~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Binary scripts for Kallithea
 

	
 
This file was forked by the Kallithea project in July 2014.
 
Original author and date, and relevant copyright and licensing information is below:
 
:created_on: Jun 03, 2012
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
kallithea/bin/base.py
Show inline comments
 
file renamed from rhodecode/bin/base.py to kallithea/bin/base.py
 
# -*- coding: utf-8 -*-
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
kallithea.bin.base
 
~~~~~~~~~~~~~~~~~~
 

	
 
Base utils for shell scripts
 

	
 
This file was forked by the Kallithea project in July 2014.
 
Original author and date, and relevant copyright and licensing information is below:
 
:created_on: May 09, 2013
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
 

	
 
import os
 
import sys
 
import random
 
@@ -8,21 +32,21 @@ import urllib2
 
import pprint
 

	
 
try:
 
    from rhodecode.lib.ext_json import json
 
    from kallithea.lib.ext_json import json
 
except ImportError:
 
    try:
 
        import simplejson as json
 
    except ImportError:
 
        import json
 

	
 
CONFIG_NAME = '.rhodecode'
 
CONFIG_NAME = '.config/kallithea'
 
FORMAT_PRETTY = 'pretty'
 
FORMAT_JSON = 'json'
 

	
 

	
 
def api_call(apikey, apihost, method=None, **kw):
 
    """
 
    Api_call wrapper for RhodeCode.
 
    Api_call wrapper for Kallithea.
 

	
 
    :param apikey:
 
    :param apihost:
 
@@ -46,7 +70,7 @@ def api_call(apikey, apihost, method=Non
 

	
 
    if not method:
 
        raise Exception('please specify method name !')
 

	
 
    apihost = apihost.rstrip('/')
 
    id_ = random.randrange(1, 9999)
 
    req = urllib2.Request('%s/_admin/api' % apihost,
 
                      data=json.dumps(_build_data(id_)),
 
@@ -67,7 +91,7 @@ def api_call(apikey, apihost, method=Non
 

	
 
class RcConf(object):
 
    """
 
    RhodeCode config for API
 
    Kallithea config for API
 

	
 
    conf = RcConf()
 
    conf['key']
kallithea/bin/kallithea_api.py
Show inline comments
 
modified file chmod 100755 => 100644
 
file renamed from rhodecode/bin/rhodecode_api.py to kallithea/bin/kallithea_api.py
 
# -*- coding: utf-8 -*-
 
"""
 
    rhodecode.bin.api
 
    ~~~~~~~~~~~~~~~~~
 

	
 
    Api CLI client for RhodeCode
 

	
 
    :created_on: Jun 3, 2012
 
    :author: marcink
 
    :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com>
 
    :license: GPLv3, see COPYING for more details.
 
"""
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
@@ -22,23 +11,36 @@
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
kallithea.bin.api
 
~~~~~~~~~~~~~~~~~
 

	
 
Api CLI client for Kallithea
 

	
 
This file was forked by the Kallithea project in July 2014.
 
Original author and date, and relevant copyright and licensing information is below:
 
:created_on: Jun 3, 2012
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
 

	
 
from __future__ import with_statement
 
import sys
 
import argparse
 

	
 
from rhodecode.bin.base import json, api_call, RcConf, FORMAT_JSON, FORMAT_PRETTY
 
from kallithea.bin.base import json, api_call, RcConf, FORMAT_JSON, FORMAT_PRETTY
 

	
 

	
 
def argparser(argv):
 
    usage = (
 
      "rhodecode-api [-h] [--format=FORMAT] [--apikey=APIKEY] [--apihost=APIHOST] "
 
      "kallithea-api [-h] [--format=FORMAT] [--apikey=APIKEY] [--apihost=APIHOST] "
 
      "[--config=CONFIG] [--save-config] "
 
      "METHOD <key:val> <key2:val> ...\n"
 
      "Create config file: rhodecode-gist --apikey=<key> --apihost=http://rhodecode.server --save-config"
 
      "Create config file: kallithea-api --apikey=<key> --apihost=http://your.kallithea.server --save-config"
 
    )
 

	
 
    parser = argparse.ArgumentParser(description='RhodeCode API cli',
 
    parser = argparse.ArgumentParser(description='Kallithea API cli',
 
                                     usage=usage)
 

	
 
    ## config
 
@@ -106,15 +108,18 @@ def main(argv=None):
 
        print 'Calling method %s => %s' % (method, apihost)
 

	
 
    json_resp = api_call(apikey, apihost, method, **margs)
 
    error_prefix = ''
 
    if json_resp['error']:
 
        error_prefix = 'ERROR:'
 
        json_data = json_resp['error']
 
    else:
 
        json_data = json_resp['result']
 
    if args.format == FORMAT_JSON:
 
        print json.dumps(json_data)
 
    elif args.format == FORMAT_PRETTY:
 
        print 'Server response \n%s' % (
 
                json.dumps(json_data, indent=4, sort_keys=True))
 
        print 'Server response \n%s%s' % (
 
            error_prefix, json.dumps(json_data, indent=4, sort_keys=True)
 
        )
 
    return 0
 

	
 
if __name__ == '__main__':
kallithea/bin/kallithea_backup.py
Show inline comments
 
modified file chmod 100755 => 100644
 
file renamed from rhodecode/bin/rhodecode_backup.py to kallithea/bin/kallithea_backup.py
 
# -*- coding: utf-8 -*-
 
"""
 
    rhodecode.bin.backup_manager
 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
    Repositories backup manager, it allows to backups all
 
    repositories and send it to backup server using RSA key via ssh.
 

	
 
    :created_on: Feb 28, 2010
 
    :author: marcink
 
    :copyright: (C) 2010-2012 Marcin Kuzminski <marcin@python-works.com>
 
    :license: GPLv3, see COPYING for more details.
 
"""
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
@@ -23,6 +11,20 @@
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
kallithea.bin.backup_manager
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Repositories backup manager, it allows to backups all
 
repositories and send it to backup server using RSA key via ssh.
 

	
 
This file was forked by the Kallithea project in July 2014.
 
Original author and date, and relevant copyright and licensing information is below:
 
:created_on: Feb 28, 2010
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
 

	
 
import os
 
import sys
 
@@ -39,7 +41,7 @@ logging.basicConfig(level=logging.DEBUG,
 
class BackupManager(object):
 
    def __init__(self, repos_location, rsa_key, backup_server):
 
        today = datetime.datetime.now().weekday() + 1
 
        self.backup_file_name = "rhodecode_repos.%s.tar.gz" % today
 
        self.backup_file_name = "repos.%s.tar.gz" % today
 

	
 
        self.id_rsa_path = self.get_id_rsa(rsa_key)
 
        self.repos_path = self.get_repos_path(repos_location)
kallithea/bin/kallithea_config.py
Show inline comments
 
modified file chmod 100644 => 100755
 
file renamed from rhodecode/bin/rhodecode_config.py to kallithea/bin/kallithea_config.py
 
# -*- coding: utf-8 -*-
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
config generator
 
kallithea.bin.kallithea_config
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
configuration generator for Kallithea
 

	
 
This file was forked by the Kallithea project in July 2014.
 
Original author and date, and relevant copyright and licensing information is below:
 
:created_on: Jun 18, 2013
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
 

	
 

	
 
from __future__ import with_statement
 
import os
 
import sys
 
@@ -13,14 +37,14 @@ here = os.path.dirname(os.path.abspath(_
 

	
 
def argparser(argv):
 
    usage = (
 
      "rhodecode-config [-h] [--filename=FILENAME] [--template=TEMPLATE] \n"
 
      "kallithea-config [-h] [--filename=FILENAME] [--template=TEMPLATE] \n"
 
      "VARS optional specify extra template variable that will be available in "
 
      "template. Use comma separated key=val format eg.\n"
 
      "key1=val1,port=5000,host=127.0.0.1,elements='a\,b\,c'\n"
 
    )
 

	
 
    parser = argparse.ArgumentParser(
 
        description='RhodeCode CONFIG generator with variable replacement',
 
        description='Kallithea CONFIG generator with variable replacement',
 
        usage=usage
 
    )
 

	
 
@@ -77,7 +101,7 @@ def _run(argv):
 
        'database_engine': 'sqlite',
 
        'host': '127.0.0.1',
 
        'port': 5000,
 
        'error_aggregation_service': None
 
        'error_aggregation_service': None,
 
    }
 
    if other:
 
        # parse arguments, we assume only first is correct
kallithea/bin/kallithea_gist.py
Show inline comments
 
modified file chmod 100755 => 100644
 
file renamed from rhodecode/bin/rhodecode_gist.py to kallithea/bin/kallithea_gist.py
 
# -*- coding: utf-8 -*-
 
"""
 
    rhodecode.bin.gist
 
    ~~~~~~~~~~~~~~~~~~
 

	
 
    Gist CLI client for RhodeCode
 

	
 
    :created_on: May 9, 2013
 
    :author: marcink
 
    :copyright: (C) 2010-2013 Marcin Kuzminski <marcin@python-works.com>
 
    :license: GPLv3, see COPYING for more details.
 
"""
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
@@ -22,6 +11,19 @@
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
kallithea.bin.kallithea_gist
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Gist CLI client for Kallithea
 

	
 
This file was forked by the Kallithea project in July 2014.
 
Original author and date, and relevant copyright and licensing information is below:
 
:created_on: May 9, 2013
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
 

	
 
from __future__ import with_statement
 
import os
 
@@ -30,25 +32,25 @@ import stat
 
import argparse
 
import fileinput
 

	
 
from rhodecode.bin.base import json, api_call, RcConf, FORMAT_JSON, FORMAT_PRETTY
 
from kallithea.bin.base import json, api_call, RcConf, FORMAT_JSON, FORMAT_PRETTY
 

	
 

	
 
def argparser(argv):
 
    usage = (
 
      "rhodecode-gist [-h] [--format=FORMAT] [--apikey=APIKEY] [--apihost=APIHOST] "
 
      "kallithea-gist [-h] [--format=FORMAT] [--apikey=APIKEY] [--apihost=APIHOST] "
 
      "[--config=CONFIG] [--save-config] [GIST OPTIONS] "
 
      "[filename or stdin use - for terminal stdin ]\n"
 
      "Create config file: rhodecode-gist --apikey=<key> --apihost=http://rhodecode.server --save-config"
 
      "Create config file: kallithea-gist --apikey=<key> --apihost=http://your.kallithea.server --save-config"
 
    )
 

	
 
    parser = argparse.ArgumentParser(description='RhodeCode Gist cli',
 
    parser = argparse.ArgumentParser(description='Kallithea Gist cli',
 
                                     usage=usage)
 

	
 
    ## config
 
    group = parser.add_argument_group('config')
 
    group.add_argument('--apikey', help='api access key')
 
    group.add_argument('--apihost', help='api host')
 
    group.add_argument('--config', help='config file path DEFAULT: ~/.rhodecode')
 
    group.add_argument('--config', help='config file path DEFAULT: ~/.config/kallithea')
 
    group.add_argument('--save-config', action='store_true',
 
                       help='save the given config into a file')
 

	
kallithea/bin/ldap_sync.conf
Show inline comments
 
file renamed from rhodecode/bin/ldap_sync.conf to kallithea/bin/ldap_sync.conf
 
[default]
 
api_url = http://your.rhodecode.server:5000/_admin/api
 
api_url = http://your.kallithea.server:5000/_admin/api
 
api_user = admin
 
api_key = XXXXXXXXXXXX
 

	
 
ldap_uri = ldap://your.ldap.server:389
 
ldap_user = cn=rhodecode,ou=binders,dc=linaro,dc=org
 
ldap_user = cn=kallithea,ou=binders,dc=linaro,dc=org
 
ldap_key = XXXXXXXXX
 
base_dn = dc=linaro,dc=org
 

	
kallithea/bin/ldap_sync.py
Show inline comments
 
modified file chmod 100644 => 100755
 
file renamed from rhodecode/bin/ldap_sync.py to kallithea/bin/ldap_sync.py
 
# -*- coding: utf-8 -*-
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
@@ -10,13 +11,26 @@
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
kallithea.bin.__init__
 
~~~~~~~~~~~~~~~~~~~~~~
 

	
 
LDAP sync script
 

	
 
This file was forked by the Kallithea project in July 2014.
 
Original author and date, and relevant copyright and licensing information is below:
 
:created_on: Mar 06, 2013
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
 

	
 
import ldap
 
import urllib2
 
import uuid
 

	
 
try:
 
    from rhodecode.lib.compat import json
 
    from kallithea.lib.compat import json
 
except ImportError:
 
    try:
 
        import simplejson as json
 
@@ -33,7 +47,7 @@ class InvalidResponseIDError(Exception):
 
    """ Request and response don't have the same UUID. """
 

	
 

	
 
class RhodecodeResponseError(Exception):
 
class ResponseError(Exception):
 
    """ Response has an error, something went wrong with request execution. """
 

	
 

	
 
@@ -45,7 +59,7 @@ class UserNotInGroupError(Exception):
 
    """ User is not a member of the target group. """
 

	
 

	
 
class RhodecodeAPI():
 
class API(object):
 

	
 
    def __init__(self, url, key):
 
        self.url = url
 
@@ -60,8 +74,8 @@ class RhodecodeAPI():
 
            "args": args
 
        }
 

	
 
    def rhodecode_api_post(self, method, args):
 
        """Send a generic API post to Rhodecode.
 
    def post(self, method, args):
 
        """Send a generic API post to Kallithea.
 

	
 
        This will generate the UUID for validation check after the
 
        response is returned. Handle errors and get the result back.
 
@@ -80,17 +94,17 @@ class RhodecodeAPI():
 
            raise InvalidResponseIDError("UUID does not match.")
 

	
 
        if response["error"] is not None:
 
            raise RhodecodeResponseError(response["error"])
 
            raise ResponseError(response["error"])
 

	
 
        return response["result"]
 

	
 
    def create_group(self, name, active=True):
 
        """Create the Rhodecode user group."""
 
        """Create the Kallithea user group."""
 
        args = {
 
            "group_name": name,
 
            "active": str(active)
 
        }
 
        self.rhodecode_api_post("create_users_group", args)
 
        self.post("create_user_group", args)
 

	
 
    def add_membership(self, group, username):
 
        """Add specific user to a group."""
 
@@ -98,7 +112,7 @@ class RhodecodeAPI():
 
            "usersgroupid": group,
 
            "userid": username
 
        }
 
        result = self.rhodecode_api_post("add_user_to_users_group", args)
 
        result = self.post("add_user_to_user_group", args)
 
        if not result["success"]:
 
            raise UserAlreadyInGroupError("User %s already in group %s." %
 
                                          (username, group))
 
@@ -109,7 +123,7 @@ class RhodecodeAPI():
 
            "usersgroupid": group,
 
            "userid": username
 
        }
 
        result = self.rhodecode_api_post("remove_user_from_users_group", args)
 
        result = self.post("remove_user_from_user_group", args)
 
        if not result["success"]:
 
            raise UserNotInGroupError("User %s not in group %s." %
 
                                      (username, group))
 
@@ -117,7 +131,7 @@ class RhodecodeAPI():
 
    def get_group_members(self, name):
 
        """Get the list of member usernames from a user group."""
 
        args = {"usersgroupid": name}
 
        members = self.rhodecode_api_post("get_users_group", args)['members']
 
        members = self.post("get_user_group", args)['members']
 
        member_list = []
 
        for member in members:
 
            member_list.append(member["username"])
 
@@ -126,15 +140,15 @@ class RhodecodeAPI():
 
    def get_group(self, name):
 
        """Return group info."""
 
        args = {"usersgroupid": name}
 
        return self.rhodecode_api_post("get_users_group", args)
 
        return self.post("get_user_group", args)
 

	
 
    def get_user(self, username):
 
        """Return user info."""
 
        args = {"userid": username}
 
        return self.rhodecode_api_post("get_user", args)
 
        return self.post("get_user", args)
 

	
 

	
 
class LdapClient():
 
class LdapClient(object):
 

	
 
    def __init__(self, uri, user, key, base_dn):
 
        self.client = ldap.initialize(uri, trace_level=0)
 
@@ -190,16 +204,16 @@ class LdapSync(object):
 
                                      config.get("default", "ldap_user"),
 
                                      config.get("default", "ldap_key"),
 
                                      config.get("default", "base_dn"))
 
        self.rhodocode_api = RhodecodeAPI(config.get("default", "api_url"),
 
        self.rhodocode_api = API(config.get("default", "api_url"),
 
                                          config.get("default", "api_key"))
 

	
 
    def update_groups_from_ldap(self):
 
        """Add all the groups from LDAP to Rhodecode."""
 
        """Add all the groups from LDAP to Kallithea."""
 
        added = existing = 0
 
        groups = self.ldap_client.get_groups()
 
        for group in groups:
 
            try:
 
                self.rhodecode_api.create_group(group)
 
                self.kallithea_api.create_repo_group(group)
 
                added += 1
 
            except Exception:
 
                existing += 1
 
@@ -207,25 +221,25 @@ class LdapSync(object):
 
        return added, existing
 

	
 
    def update_memberships_from_ldap(self, group):
 
        """Update memberships in rhodecode based on the LDAP groups."""
 
        """Update memberships based on the LDAP groups."""
 
        groups = self.ldap_client.get_groups()
 
        group_users = self.ldap_client.get_group_users(groups, group)
 

	
 
        # Delete memberships first from each group which are not part
 
        # of the group any more.
 
        rhodecode_members = self.rhodecode_api.get_group_members(group)
 
        for rhodecode_member in rhodecode_members:
 
            if rhodecode_member not in group_users:
 
        members = self.kallithea_api.get_group_members(group)
 
        for member in members:
 
            if member not in group_users:
 
                try:
 
                    self.rhodocode_api.remove_membership(group,
 
                                                         rhodecode_member)
 
                                                         member)
 
                except UserNotInGroupError:
 
                    pass
 

	
 
        # Add memberships.
 
        for member in group_users:
 
            try:
 
                self.rhodecode_api.add_membership(group, member)
 
                self.kallithea_api.add_membership(group, member)
 
            except UserAlreadyInGroupError:
 
                # TODO: handle somehow maybe..
 
                pass
 
@@ -240,5 +254,5 @@ if __name__ == '__main__':
 
        # How should we handle this.. Either sync users as well at this step,
 
        # or just ignore those who don't exist. If we want the second case,
 
        # we need to find a way to recognize the right exception (we always get
 
        # RhodecodeResponseError with no error code so maybe by return msg (?)
 
        # ResponseError with no error code so maybe by return msg (?)
 
        sync.update_memberships_from_ldap(gr)
kallithea/bin/rebranddb.py
Show inline comments
 
new file 100755
 
#!/usr/bin/env python
 

	
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
Script for rebranding of database to and from what Kallithea expects
 

	
 
Works on databases from v1.7.2 to v2.2.5
 
"""
 

	
 
import os
 
import sys
 
from sqlalchemy import *
 
import sqlalchemy.orm
 
import sqlalchemy.ext.declarative
 
import migrate.changeset # a part of sqlalchemy-migrate which is available on pypi
 

	
 
def do_migrate(db, old, new):
 
    print 'Migrating %s from %s to %s' % (db, old or '?', new)
 
    metadata = MetaData()
 
    metadata.bind = create_engine(db)
 
    metadata.reflect()
 
    assert metadata.tables, 'Cannot reflect table names from db'
 

	
 
    if not old:
 
        assert 'db_migrate_version' in metadata.tables, 'Cannot reflect db_migrate_version from db'
 
        t = metadata.tables['db_migrate_version']
 
        l = t.select().where(t.c.repository_path == 'versions').execute().fetchall()
 
        assert len(l) == 1, 'Cannot find a single versions entry in db_migrate_version'
 
        assert l[0].repository_id.endswith('_db_migrations')
 
        old = l[0].repository_id[:-len('_db_migrations')]
 
        print 'Detected migration from old name %s' % old
 
        if new != old:
 
            assert not t.select().where(t.c.repository_id == new + '_db_migrations').execute().fetchall(), 'db_migrate_version has entries for both old and new name'
 

	
 
    def tablename(brand, s):
 
        return s if brand == 'kallithea' else (brand + '_' + s)
 
    new_ui_name = tablename(new, 'ui')
 
    old_ui_name = tablename(old, 'ui')
 
    new_settings_name = tablename(new, 'settings')
 
    old_settings_name = tablename(old, 'settings')
 

	
 
    # Table renames using sqlalchemy-migrate (available on pypi)
 
    if new_ui_name == old_ui_name:
 
        print 'No renaming of %s' % new_ui_name
 
    else:
 
        try:
 
            t = metadata.tables[old_ui_name]
 
            print 'Renaming', t, 'to', new_ui_name
 
            migrate.changeset.rename_table(t, new_ui_name)
 
        except KeyError, e:
 
            print 'Not renaming ui:', e
 

	
 
    if new_settings_name == old_settings_name:
 
        print 'No renaming of %s' % new_settings_name
 
    else:
 
        try:
 
            t = metadata.tables[old_settings_name]
 
            print 'Renaming', t, 'to', new_settings_name
 
            migrate.changeset.rename_table(t, new_settings_name)
 
        except KeyError, e:
 
            print 'Not renaming settings:', e
 

	
 
    # using this API because ... dunno ... it is simple and works
 
    conn = metadata.bind.connect()
 
    trans = conn.begin()
 
    t = metadata.tables['users']
 

	
 
    print 'Bulk fixing of User extern_name'
 
    try:
 
        t.c.extern_name
 
    except AttributeError:
 
        print 'No extern_name to rename'
 
    else:
 
        t.update().where(t.c.extern_name == old).values(extern_name=new).execute()
 

	
 
    print 'Bulk fixing of User extern_type'
 
    try:
 
        t.c.extern_type
 
    except AttributeError:
 
        print 'No extern_type to rename'
 
    else:
 
        t.update().where(t.c.extern_type == old).values(extern_type=new).execute()
 

	
 
    trans.commit()
 

	
 
    # For the following conversions, use ORM ... and create stub models that works for that purpose
 
    Base = sqlalchemy.ext.declarative.declarative_base()
 

	
 
    class Ui(Base):
 
        __tablename__ = new_ui_name
 
        ui_id = Column("ui_id", Integer(), primary_key=True)
 
        ui_section = Column("ui_section", String())
 
        ui_key = Column("ui_key", String())
 
        ui_value = Column("ui_value", String())
 
        ui_active = Column("ui_active", Boolean())
 

	
 
    class Setting(Base):
 
        __tablename__ = new_settings_name
 
        app_settings_id = Column("app_settings_id", Integer(), primary_key=True)
 
        app_settings_name = Column("app_settings_name", String())
 
        app_settings_value = Column("app_settings_value", String())
 
        #app_settings_type = Column("app_settings_type", String()) # not present in v1.7.2
 

	
 
    class DbMigrateVersion(Base):
 
        __tablename__ = 'db_migrate_version'
 
        repository_id = Column('repository_id', String(), primary_key=True)
 
        repository_path = Column('repository_path', Text)
 
        version = Column('version', Integer)
 

	
 
    Session = sqlalchemy.orm.sessionmaker(bind=metadata.bind)
 
    session = Session()
 

	
 
    print 'Fixing hook names'
 

	
 
    oldhooks = u'python:%s.lib.hooks.' % old
 
    newhooks = u'python:%s.lib.hooks.' % new
 
    for u in session.query(Ui).filter(Ui.ui_section == 'hooks').all():
 
        if u.ui_value.startswith(oldhooks):
 
            print '- fixing %s' % u.ui_key
 
            u.ui_value = newhooks + u.ui_value[len(oldhooks):]
 
            session.add(u)
 
    session.commit()
 

	
 
    print 'Fixing auth module names'
 
    old_auth_name = 'internal' if old == 'kallithea' else old
 
    new_auth_name = 'internal' if new == 'kallithea' else new
 
    for s in session.query(Setting).filter(Setting.app_settings_name == 'auth_plugins').all():
 
        print '- fixing %s' % s.app_settings_name
 
        s.app_settings_value = (s.app_settings_value
 
                                .replace(old + '.lib.auth_modules.auth_', new + '.lib.auth_modules.auth_')
 
                                .replace('.auth_modules.auth_' + old_auth_name, '.auth_modules.auth_' + new_auth_name))
 
        session.add(s)
 
    for s in session.query(Setting).filter(Setting.app_settings_name == 'auth_' + old_auth_name + '_enabled').all():
 
        print '- fixing %s' % s.app_settings_name
 
        s.app_settings_name = 'auth_' + new_auth_name + '_enabled'
 
        session.add(s)
 
    session.commit()
 

	
 
    print 'Fixing db migration version number'
 
    for s in session.query(DbMigrateVersion).filter(DbMigrateVersion.repository_id == old + '_db_migrations', DbMigrateVersion.repository_path == 'versions').all():
 
        print '- fixing %s' % s.repository_id
 
        s.repository_id = new + '_db_migrations'
 
    session.commit()
 

	
 
    print 'Done'
 

	
 
def main(argv):
 
    if len(argv) < 2 or argv[1] in ['-h', '--help']:
 
        print 'usage: kallithea/bin/rebranddb.py DBSTRING [NEW] [OLD]'
 
        print '  where DBSTRING is the value of sqlalchemy.db1.url from the .ini,'
 
        print '  NEW defaults to "kallithea", OLD is by default detected from the db"'
 
        raise SystemExit(0)
 
    db = argv[1]
 
    new = 'kallithea'
 
    if len(argv) > 2:
 
        new = argv[2]
 
    old = None
 
    if len(argv) > 3:
 
        old = argv[3]
 
    do_migrate(argv[1], old, new)
 

	
 
if __name__ == '__main__':
 
    main(sys.argv)
kallithea/bin/template.ini.mako
Show inline comments
 
file renamed from rhodecode/bin/template.ini.mako to kallithea/bin/template.ini.mako
 
## -*- coding: utf-8 -*-
 
<%text>
 
################################################################################
 
<%text>################################################################################
 
################################################################################
 
# RhodeCode - Example config                                                   #
 
# Built-in functions and variables                                             #
 
# The ${here} variable will be replaced with the parent directory of this file #
 
# ${uuid()} function will generate a unique hash                               #
 
# Kallithea - config file generated with kallithea-config                      #
 
################################################################################
 
################################################################################
 
</%text>
 
[DEFAULT]
 
@@ -15,14 +12,13 @@ pdebug = false
 
################################################################################
 
## Uncomment and replace with the address which should receive                ##
 
## any error reports after application crash                                  ##
 
## Additionally those settings will be used by RhodeCode mailing system       ##
 
################################################################################
 
</%text>
 
## Additionally those settings will be used by Kallithea mailing system       ##
 
################################################################################</%text>
 
#email_to = admin@localhost
 
#error_email_from = paste_error@localhost
 
#app_email_from = rhodecode-noreply@localhost
 
#app_email_from = kallithea-noreply@localhost
 
#error_message =
 
#email_prefix = [RhodeCode]
 
#email_prefix = [Kallithea]
 

	
 
#smtp_server = mail.server.com
 
#smtp_username =
 
@@ -62,7 +58,7 @@ use = egg:gunicorn#main
 
<%text>## is set to more than one worker</%text>
 
workers = 1
 
<%text>## process name</%text>
 
proc_name = rhodecode
 
proc_name = kallithea
 
<%text>## type of worker class, one of sync, eventlet, gevent, tornado</%text>
 
<%text>## recommended for bigger setup is using of of other than sync one</%text>
 
worker_class = sync
 
@@ -77,16 +73,16 @@ timeout = 3600
 
[uwsgi]
 
socket = /tmp/uwsgi.sock
 
master = true
 
http = 0.0.0.0:5000
 
http = 127.0.0.1:5000
 

	
 
<%text>## set as deamon and redirect all output to file</%text>
 
#daemonize = ./uwsgi_rhodecode.log
 
#daemonize = ./uwsgi_kallithea.log
 

	
 
<%text>## master process PID</%text>
 
pidfile = ./uwsgi_rhodecode.pid
 
pidfile = ./uwsgi_kallithea.pid
 

	
 
<%text>## stats server with workers statistics, use uwsgitop</%text>
 
<%text>## for monitoring</%text>
 
<%text>## for monitoring, `uwsgitop 127.0.0.1:1717`</%text>
 
stats = 127.0.0.1:1717
 
memory-report = true
 

	
 
@@ -142,14 +138,14 @@ port = ${port}
 
#prefix = /<your-prefix>
 

	
 
[app:main]
 
use = egg:rhodecode
 
use = egg:kallithea
 
<%text>## enable proxy prefix middleware</%text>
 
#filter-with = proxy-prefix
 

	
 
full_stack = true
 
static_files = true
 
<%text>## Optional Languages</%text>
 
<%text>## en, fr, ja, pt_BR, zh_CN, zh_TW, pl, ru</%text>
 
<%text>## Available Languages:</%text>
 
<%text>## de en fr ja pl pt_BR ru zh_CN zh_TW</%text>
 
lang = ${lang}
 
cache_dir = ${here}/data
 
index_dir = ${here}/data/index
 
@@ -170,7 +166,7 @@ cut_off_limit = 256000
 
<%text>## use cache version of scm repo everywhere</%text>
 
vcs_full_cache = true
 

	
 
<%text>## force https in RhodeCode, fixes https redirects, assumes it's always https</%text>
 
<%text>## force https in Kallithea, fixes https redirects, assumes it's always https</%text>
 
force_https = false
 

	
 
<%text>## use Strict-Transport-Security headers</%text>
 
@@ -187,7 +183,7 @@ git_path = git
 

	
 
<%text>## git rev filter option, --all is the default filter, if you need to</%text>
 
<%text>## hide all refs in changelog switch this to --branches --tags</%text>
 
git_rev_filter=--branches --tags
 
#git_rev_filter = --branches --tags
 

	
 
<%text>## RSS feed options</%text>
 
rss_cut_off_limit = 256000
 
@@ -200,8 +196,8 @@ show_revision_number = true
 

	
 
<%text>## gist URL alias, used to create nicer urls for gist. This should be an</%text>
 
<%text>## url that does rewrites to _admin/gists/<gistid>.</%text>
 
<%text>## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal</%text>
 
<%text>## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid></%text>
 
<%text>## example: http://gist.kallithea.server/{gistid}. Empty means use the internal</%text>
 
<%text>## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid></%text>
 
gist_alias_url =
 

	
 
<%text>## white list of API enabled controllers. This allows to add list of</%text>
 
@@ -209,15 +205,20 @@ gist_alias_url =
 
<%text>## api access to raw_files put `FilesController:raw`, to enable access to patches</%text>
 
<%text>## add `ChangesetController:changeset_patch`. This list should be "," separated</%text>
 
<%text>## Syntax is <ControllerClass>:<function>. Check debug logs for generated names</%text>
 
<%text>## Recommended settings below are commented out:</%text>
 
api_access_controllers_whitelist =
 
#    ChangesetController:changeset_patch,
 
#    ChangesetController:changeset_raw,
 
#    FilesController:raw,
 
#    FilesController:archivefile
 

	
 
<%text>## alternative_gravatar_url allows you to use your own avatar server application</%text>
 
<%text>## the following parts of the URL will be replaced</%text>
 
<%text>## {email}        user email</%text>
 
<%text>## {md5email}     md5 hash of the user email (like at gravatar.com)</%text>
 
<%text>## {size}         size of the image that is expected from the server application</%text>
 
<%text>## {scheme}       http/https from RhodeCode server</%text>
 
<%text>## {netloc}       network location from RhodeCode server</%text>
 
<%text>## {scheme}       http/https from Kallithea server</%text>
 
<%text>## {netloc}       network location from Kallithea server</%text>
 
#alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
 
#alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
 

	
 
@@ -240,8 +241,8 @@ default_encoding = utf8
 

	
 
#clone_uri = {scheme}://{user}{pass}{netloc}{path}
 

	
 
<%text>## issue tracker for RhodeCode (leave blank to disable, absent for default)</%text>
 
#bugtracker = http://bitbucket.org/marcinkuzminski/rhodecode/issues
 
<%text>## issue tracker for Kallithea (leave blank to disable, absent for default)</%text>
 
#bugtracker = https://bitbucket.org/conservancy/kallithea/issues
 

	
 
<%text>## issue tracking mapping for commits messages</%text>
 
<%text>## comment out issue_pat, issue_server, issue_prefix to enable</%text>
 
@@ -266,7 +267,7 @@ issue_prefix = #
 
<%text>## issue_pat, issue_server_link, issue_prefix can have suffixes to specify</%text>
 
<%text>## multiple patterns, to other issues server, wiki or others</%text>
 
<%text>## below an example how to create a wiki pattern</%text>
 
<%text>## wiki-some-id -> https://mywiki.com/some-id</%text>
 
# wiki-some-id -> https://mywiki.com/some-id
 

	
 
#issue_pat_wiki = (?:wiki-)(.+)
 
#issue_server_link_wiki = https://mywiki.com/{id}
 
@@ -275,8 +276,8 @@ issue_prefix = #
 

	
 
<%text>## instance-id prefix</%text>
 
<%text>## a prefix key for this instance used for cache invalidation when running</%text>
 
<%text>## multiple instances of rhodecode, make sure it's globally unique for</%text>
 
<%text>## all running rhodecode instances. Leave empty if you don't use it</%text>
 
<%text>## multiple instances of kallithea, make sure it's globally unique for</%text>
 
<%text>## all running kallithea instances. Leave empty if you don't use it</%text>
 
instance_id =
 

	
 
<%text>## alternative return HTTP header for failed authentication. Default HTTP</%text>
 
@@ -306,7 +307,7 @@ broker.port = 5672
 
broker.user = rabbitmq
 
broker.password = qweqwe
 

	
 
celery.imports = rhodecode.lib.celerylib.tasks
 
celery.imports = kallithea.lib.celerylib.tasks
 

	
 
celery.result.backend = amqp
 
celery.result.dburi = amqp://
 
@@ -366,7 +367,7 @@ beaker.cache.sql_cache_long.key_length =
 
</%text>
 
<%text>## db session ##</%text>
 
#beaker.session.type = ext:database
 
#beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
 
#beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
 
#beaker.session.table_name = db_session
 

	
 
<%text>## encrypted cookie client side session, good for many instances ##</%text>
 
@@ -375,7 +376,7 @@ beaker.cache.sql_cache_long.key_length =
 
<%text>## file based cookies (default) ##</%text>
 
#beaker.session.type = file
 

	
 
beaker.session.key = rhodecode
 
beaker.session.key = kallithea
 
beaker.session.secret = ${uuid()}
 

	
 
<%text>## Secure encrypted cookie. Requires AES and AES python libraries</%text>
 
@@ -407,7 +408,7 @@ beaker.session.auto = False
 
### [errormator] ###
 
####################
 

	
 
## Errormator is tailored to work with RhodeCode, see
 
## Errormator is tailored to work with Kallithea, see
 
## http://errormator.com for details how to obtain an account
 
## you must install python package `errormator_client` to make it work
 
</%text>
 
@@ -484,8 +485,7 @@ sentry.exclude_paths =
 
## WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*  ##
 
## Debug mode will enable the interactive debugging tool, allowing ANYONE to  ##
 
## execute malicious code after an exception is raised.                       ##
 
################################################################################
 
</%text>
 
################################################################################</%text>
 
set debug = false
 
<%text>
 
##################################
 
@@ -502,13 +502,13 @@ logview.pylons.util = #eee
 
</%text>
 
%if database_engine == 'sqlite':
 
# SQLITE [default]
 
sqlalchemy.db1.url = sqlite:///${here}/rhodecode.db?timeout=60
 
sqlalchemy.db1.url = sqlite:///${here}/kallithea.db?timeout=60
 
%elif database_engine == 'postgres':
 
# POSTGRESQL
 
sqlalchemy.db1.url = postgresql://user:pass@localhost/rhodecode
 
sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
 
%elif database_engine == 'mysql':
 
# MySQL
 
sqlalchemy.db1.url = mysql://user:pass@localhost/rhodecode
 
sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
 
%endif
 
# see sqlalchemy docs for others
 

	
 
@@ -521,7 +521,7 @@ sqlalchemy.db1.convert_unicode = true
 
################################
 
</%text>
 
[loggers]
 
keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
 
keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
 

	
 
[handlers]
 
keys = console, console_sql
 
@@ -556,10 +556,10 @@ handlers =
 
qualname = pylons.templating
 
propagate = 1
 

	
 
[logger_rhodecode]
 
[logger_kallithea]
 
level = DEBUG
 
handlers =
 
qualname = rhodecode
 
qualname = kallithea
 
propagate = 1
 

	
 
[logger_sqlalchemy]
 
@@ -599,11 +599,11 @@ format = %(asctime)s.%(msecs)03d %(level
 
datefmt = %Y-%m-%d %H:%M:%S
 

	
 
[formatter_color_formatter]
 
class=rhodecode.lib.colored_formatter.ColorFormatter
 
class=kallithea.lib.colored_formatter.ColorFormatter
 
format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
 

	
 
[formatter_color_formatter_sql]
 
class=rhodecode.lib.colored_formatter.ColorFormatterSql
 
class=kallithea.lib.colored_formatter.ColorFormatterSql
 
format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
kallithea/config/__init__.py
Show inline comments
 
file renamed from rhodecode/config/__init__.py to kallithea/config/__init__.py
 
# -*- coding: utf-8 -*-
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
kallithea/config/conf.py
Show inline comments
 
file renamed from rhodecode/config/conf.py to kallithea/config/conf.py
 
# -*- coding: utf-8 -*-
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
    package.rhodecode.config.conf
 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
    Various config settings for RhodeCode
 
kallithea.config.conf
 
~~~~~~~~~~~~~~~~~~~~~
 

	
 
    :created_on: Mar 7, 2012
 
    :author: marcink
 
    :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
 
    :license: <name>, see LICENSE_FILE for more details.
 
Various config settings for Kallithea
 

	
 
This file was forked by the Kallithea project in July 2014.
 
Original author and date, and relevant copyright and licensing information is below:
 
:created_on: Mar 7, 2012
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
 
from rhodecode import EXTENSIONS
 
from kallithea import EXTENSIONS
 

	
 
from rhodecode.lib.utils2 import __get_lem
 
from kallithea.lib.utils2 import __get_lem
 

	
 

	
 
# language map is also used by whoosh indexer, which for those specified
kallithea/config/deployment.ini_tmpl
Show inline comments
 
file renamed from rhodecode/config/deployment.ini_tmpl to kallithea/config/deployment.ini_tmpl
 
################################################################################
 
################################################################################
 
# RhodeCode - Pylons environment configuration                                 #
 
# Kallithea - Example config                                                   #
 
#                                                                              #
 
# The %(here)s variable will be replaced with the parent directory of this file#
 
################################################################################
 
################################################################################
 

	
 
[DEFAULT]
 
debug = true
 
pdebug = false
 

	
 
################################################################################
 
## Uncomment and replace with the address which should receive                ##
 
## any error reports after application crash                                  ##
 
## Additionally those settings will be used by RhodeCode mailing system       ##
 
## Additionally those settings will be used by Kallithea mailing system       ##
 
################################################################################
 
#email_to = admin@localhost
 
#error_email_from = paste_error@localhost
 
#app_email_from = rhodecode-noreply@localhost
 
#app_email_from = kallithea-noreply@localhost
 
#error_message =
 
#email_prefix = [RhodeCode]
 
#email_prefix = [Kallithea]
 

	
 
#smtp_server = mail.server.com
 
#smtp_username =
 
@@ -54,11 +56,11 @@ max_request_body_size = 107374182400
 
## is set to more than one worker
 
#workers = 1
 
## process name
 
#proc_name = rhodecode
 
#proc_name = kallithea
 
## type of worker class, one of sync, eventlet, gevent, tornado
 
## recommended for bigger setup is using of of other than sync one
 
#worker_class = sync
 
#max_requests = 5
 
#max_requests = 1000
 
## ammount of time a worker can handle request before it gets killed and
 
## restarted
 
#timeout = 3600
 
@@ -71,10 +73,10 @@ max_request_body_size = 107374182400
 
#http = 127.0.0.1:5000
 

	
 
## set as deamon and redirect all output to file
 
#daemonize = ./uwsgi_rhodecode.log
 
#daemonize = ./uwsgi_kallithea.log
 

	
 
## master process PID
 
#pidfile = ./uwsgi_rhodecode.pid
 
#pidfile = ./uwsgi_kallithea.pid
 

	
 
## stats server with workers statistics, use uwsgitop
 
## for monitoring, `uwsgitop 127.0.0.1:1717`
 
@@ -133,24 +135,24 @@ port = 5000
 
#prefix = /<your-prefix>
 

	
 
[app:main]
 
use = egg:rhodecode
 
use = egg:kallithea
 
## enable proxy prefix middleware
 
#filter-with = proxy-prefix
 

	
 
full_stack = true
 
static_files = true
 
## Optional Languages
 
## en, fr, ja, pt_BR, zh_CN, zh_TW, pl
 
## Available Languages:
 
## de en fr ja pl pt_BR ru zh_CN zh_TW
 
lang = en
 
cache_dir = %(here)s/data
 
index_dir = %(here)s/data/index
 

	
 
## perform a full repository scan on each server start, this should be
 
## set to false after first startup, to allow faster server restarts.
 
initial_repo_scan = true
 
initial_repo_scan = false
 

	
 
## uncomment and set this path to use archive download cache
 
#archive_cache_dir = /tmp/tarballcache
 
archive_cache_dir = %(here)s/tarballcache
 

	
 
## change this to unique ID for security
 
app_instance_uuid = ${app_instance_uuid}
 
@@ -161,7 +163,7 @@ cut_off_limit = 256000
 
## use cache version of scm repo everywhere
 
vcs_full_cache = true
 

	
 
## force https in RhodeCode, fixes https redirects, assumes it's always https
 
## force https in Kallithea, fixes https redirects, assumes it's always https
 
force_https = false
 

	
 
## use Strict-Transport-Security headers
 
@@ -178,7 +180,7 @@ git_path = git
 

	
 
## git rev filter option, --all is the default filter, if you need to
 
## hide all refs in changelog switch this to --branches --tags
 
git_rev_filter=--all
 
#git_rev_filter = --branches --tags
 

	
 
## RSS feed options
 
rss_cut_off_limit = 256000
 
@@ -191,8 +193,8 @@ show_revision_number = true
 

	
 
## gist URL alias, used to create nicer urls for gist. This should be an
 
## url that does rewrites to _admin/gists/<gistid>.
 
## example: http://gist.rhodecode.org/{gistid}. Empty means use the internal
 
## RhodeCode url, ie. http[s]://rhodecode.server/_admin/gists/<gistid>
 
## example: http://gist.kallithea.server/{gistid}. Empty means use the internal
 
## Kallithea url, ie. http[s]://your.kallithea.server/_admin/gists/<gistid>
 
gist_alias_url =
 

	
 
## white list of API enabled controllers. This allows to add list of
 
@@ -200,7 +202,7 @@ gist_alias_url =
 
## api access to raw_files put `FilesController:raw`, to enable access to patches
 
## add `ChangesetController:changeset_patch`. This list should be "," separated
 
## Syntax is <ControllerClass>:<function>. Check debug logs for generated names
 
## Recommended settings bellow are commented out:
 
## Recommended settings below are commented out:
 
api_access_controllers_whitelist =
 
#    ChangesetController:changeset_patch,
 
#    ChangesetController:changeset_raw,
 
@@ -212,8 +214,8 @@ api_access_controllers_whitelist =
 
## {email}        user email
 
## {md5email}     md5 hash of the user email (like at gravatar.com)
 
## {size}         size of the image that is expected from the server application
 
## {scheme}       http/https from RhodeCode server
 
## {netloc}       network location from RhodeCode server
 
## {scheme}       http/https from Kallithea server
 
## {netloc}       network location from Kallithea server
 
#alternative_gravatar_url = http://myavatarserver.com/getbyemail/{email}/{size}
 
#alternative_gravatar_url = http://myavatarserver.com/getbymd5/{md5email}?s={size}
 

	
 
@@ -236,8 +238,8 @@ default_encoding = utf8
 

	
 
#clone_uri = {scheme}://{user}{pass}{netloc}{path}
 

	
 
## issue tracker for RhodeCode (leave blank to disable, absent for default)
 
#bugtracker = http://bitbucket.org/marcinkuzminski/rhodecode/issues
 
## issue tracker for Kallithea (leave blank to disable, absent for default)
 
#bugtracker = https://bitbucket.org/conservancy/kallithea/issues
 

	
 
## issue tracking mapping for commits messages
 
## comment out issue_pat, issue_server, issue_prefix to enable
 
@@ -262,7 +264,7 @@ issue_prefix = #
 
## issue_pat, issue_server_link, issue_prefix can have suffixes to specify
 
## multiple patterns, to other issues server, wiki or others
 
## below an example how to create a wiki pattern
 
#  #wiki-some-id -> https://mywiki.com/some-id
 
# wiki-some-id -> https://mywiki.com/some-id
 

	
 
#issue_pat_wiki = (?:wiki-)(.+)
 
#issue_server_link_wiki = https://mywiki.com/{id}
 
@@ -271,8 +273,8 @@ issue_prefix = #
 

	
 
## instance-id prefix
 
## a prefix key for this instance used for cache invalidation when running
 
## multiple instances of rhodecode, make sure it's globally unique for
 
## all running rhodecode instances. Leave empty if you don't use it
 
## multiple instances of kallithea, make sure it's globally unique for
 
## all running kallithea instances. Leave empty if you don't use it
 
instance_id =
 

	
 
## alternative return HTTP header for failed authentication. Default HTTP
 
@@ -294,6 +296,7 @@ allow_custom_hooks_settings = True
 
####################################
 
###        CELERY CONFIG        ####
 
####################################
 

	
 
use_celery = false
 
broker.host = localhost
 
broker.vhost = rabbitmqhost
 
@@ -301,7 +304,7 @@ broker.port = 5672
 
broker.user = rabbitmq
 
broker.password = qweqwe
 

	
 
celery.imports = rhodecode.lib.celerylib.tasks
 
celery.imports = kallithea.lib.celerylib.tasks
 

	
 
celery.result.backend = amqp
 
celery.result.dburi = amqp://
 
@@ -321,6 +324,7 @@ celery.always.eager = false
 
####################################
 
###         BEAKER CACHE        ####
 
####################################
 

	
 
beaker.cache.data_dir=%(here)s/data/cache/data
 
beaker.cache.lock_dir=%(here)s/data/cache/lock
 

	
 
@@ -360,7 +364,7 @@ beaker.cache.sql_cache_long.key_length =
 

	
 
## db session ##
 
#beaker.session.type = ext:database
 
#beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
 
#beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
 
#beaker.session.table_name = db_session
 

	
 
## encrypted cookie client side session, good for many instances ##
 
@@ -369,7 +373,7 @@ beaker.cache.sql_cache_long.key_length =
 
## file based cookies (default) ##
 
#beaker.session.type = file
 

	
 
beaker.session.key = rhodecode
 
beaker.session.key = kallithea
 
beaker.session.secret = ${app_instance_uuid}
 

	
 
## Secure encrypted cookie. Requires AES and AES python libraries
 
@@ -400,7 +404,7 @@ beaker.session.auto = False
 
### [errormator] ###
 
####################
 

	
 
## Errormator is tailored to work with RhodeCode, see
 
## Errormator is tailored to work with Kallithea, see
 
## http://errormator.com for details how to obtain an account
 
## you must install python package `errormator_client` to make it work
 

	
 
@@ -483,6 +487,7 @@ set debug = false
 
##################################
 
###       LOGVIEW CONFIG       ###
 
##################################
 

	
 
logview.sqlalchemy = #faa
 
logview.pylons.templating = #bfb
 
logview.pylons.util = #eee
 
@@ -492,13 +497,13 @@ logview.pylons.util = #eee
 
#########################################################
 

	
 
# SQLITE [default]
 
sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db?timeout=30
 
sqlalchemy.db1.url = sqlite:///%(here)s/kallithea.db?timeout=60
 

	
 
# POSTGRESQL
 
# sqlalchemy.db1.url = postgresql://user:pass@localhost/rhodecode
 
# sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea
 

	
 
# MySQL
 
# sqlalchemy.db1.url = mysql://user:pass@localhost/rhodecode
 
# sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea
 

	
 
# see sqlalchemy docs for others
 

	
 
@@ -509,8 +514,9 @@ sqlalchemy.db1.convert_unicode = true
 
################################
 
### LOGGING CONFIGURATION   ####
 
################################
 

	
 
[loggers]
 
keys = root, routes, rhodecode, sqlalchemy, beaker, templates, whoosh_indexer
 
keys = root, routes, kallithea, sqlalchemy, beaker, templates, whoosh_indexer
 

	
 
[handlers]
 
keys = console, console_sql
 
@@ -521,6 +527,7 @@ keys = generic, color_formatter, color_f
 
#############
 
## LOGGERS ##
 
#############
 

	
 
[logger_root]
 
level = NOTSET
 
handlers = console
 
@@ -544,10 +551,10 @@ handlers =
 
qualname = pylons.templating
 
propagate = 1
 

	
 
[logger_rhodecode]
 
[logger_kallithea]
 
level = DEBUG
 
handlers =
 
qualname = rhodecode
 
qualname = kallithea
 
propagate = 1
 

	
 
[logger_sqlalchemy]
 
@@ -587,11 +594,11 @@ format = %(asctime)s.%(msecs)03d %(level
 
datefmt = %Y-%m-%d %H:%M:%S
 

	
 
[formatter_color_formatter]
 
class=rhodecode.lib.colored_formatter.ColorFormatter
 
class=kallithea.lib.colored_formatter.ColorFormatter
 
format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
 

	
 
[formatter_color_formatter_sql]
 
class=rhodecode.lib.colored_formatter.ColorFormatterSql
 
class=kallithea.lib.colored_formatter.ColorFormatterSql
 
format= %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
 
datefmt = %Y-%m-%d %H:%M:%S
kallithea/config/environment.py
Show inline comments
 
file renamed from rhodecode/config/environment.py to kallithea/config/environment.py
 
"""Pylons environment configuration"""
 
# -*- coding: utf-8 -*-
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
    Pylons environment configuration
 
"""
 

	
 
import os
 
import logging
 
import rhodecode
 
import kallithea
 
import platform
 

	
 
from mako.lookup import TemplateLookup
 
from pylons.configuration import PylonsConfig
 
from pylons.error import handle_mako_error
 

	
 
# don't remove this import it does magic for celery
 
from rhodecode.lib import celerypylons
 
from kallithea.lib import celerypylons
 

	
 
import rhodecode.lib.app_globals as app_globals
 
import kallithea.lib.app_globals as app_globals
 

	
 
from rhodecode.config.routing import make_map
 
from kallithea.config.routing import make_map
 

	
 
from rhodecode.lib import helpers
 
from rhodecode.lib.auth import set_available_permissions
 
from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config,\
 
from kallithea.lib import helpers
 
from kallithea.lib.auth import set_available_permissions
 
from kallithea.lib.utils import repo2db_mapper, make_ui, set_app_settings,\
 
    load_rcextensions, check_git_version, set_vcs_config
 
from rhodecode.lib.utils2 import engine_from_config, str2bool
 
from rhodecode.lib.db_manage import DbManage
 
from rhodecode.model import init_model
 
from rhodecode.model.scm import ScmModel
 
from kallithea.lib.utils2 import engine_from_config, str2bool
 
from kallithea.lib.db_manage import DbManage
 
from kallithea.model import init_model
 
from kallithea.model.scm import ScmModel
 

	
 
log = logging.getLogger(__name__)
 

	
 

	
 
def load_environment(global_conf, app_conf, initial=False):
 
def load_environment(global_conf, app_conf, initial=False,
 
                     test_env=None, test_index=None):
 
    """
 
    Configure the Pylons environment via the ``pylons.config``
 
    object
 
@@ -44,16 +61,16 @@ def load_environment(global_conf, app_co
 
    )
 

	
 
    # Initialize config with the basic options
 
    config.init_app(global_conf, app_conf, package='rhodecode', paths=paths)
 
    config.init_app(global_conf, app_conf, package='kallithea', paths=paths)
 

	
 
    # store some globals into rhodecode
 
    rhodecode.CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
 
    rhodecode.CELERY_EAGER = str2bool(config['app_conf'].get('celery.always.eager'))
 
    # store some globals into kallithea
 
    kallithea.CELERY_ON = str2bool(config['app_conf'].get('use_celery'))
 
    kallithea.CELERY_EAGER = str2bool(config['app_conf'].get('celery.always.eager'))
 

	
 
    config['routes.map'] = make_map(config)
 
    config['pylons.app_globals'] = app_globals.Globals(config)
 
    config['pylons.h'] = helpers
 
    rhodecode.CONFIG = config
 
    kallithea.CONFIG = config
 

	
 
    load_rcextensions(root_path=config['here'])
 

	
 
@@ -73,18 +90,22 @@ def load_environment(global_conf, app_co
 
    config['pylons.strict_tmpl_context'] = True
 
    test = os.path.split(config['__file__'])[-1] == 'test.ini'
 
    if test:
 
        if test_env is None:
 
            test_env = not int(os.environ.get('KALLITHEA_NO_TMP_PATH', 0))
 
        if test_index is None:
 
            test_index = not int(os.environ.get('KALLITHEA_WHOOSH_TEST_DISABLE', 0))
 
        if os.environ.get('TEST_DB'):
 
            # swap config if we pass enviroment variable
 
            config['sqlalchemy.db1.url'] = os.environ.get('TEST_DB')
 

	
 
        from rhodecode.lib.utils import create_test_env, create_test_index
 
        from rhodecode.tests import  TESTS_TMP_PATH
 
        # set RC_NO_TMP_PATH=1 to disable re-creating the database and
 
        # test repos
 
        if not int(os.environ.get('RC_NO_TMP_PATH', 0)):
 
        from kallithea.lib.utils import create_test_env, create_test_index
 
        from kallithea.tests import TESTS_TMP_PATH
 
        #set KALLITHEA_NO_TMP_PATH=1 to disable re-creating the database and
 
        #test repos
 
        if test_env:
 
            create_test_env(TESTS_TMP_PATH, config)
 
        # set RC_WHOOSH_TEST_DISABLE=1 to disable whoosh index during tests
 
        if not int(os.environ.get('RC_WHOOSH_TEST_DISABLE', 0)):
 
        #set KALLITHEA_WHOOSH_TEST_DISABLE=1 to disable whoosh index during tests
 
        if test_index:
 
            create_test_index(TESTS_TMP_PATH, config, True)
 

	
 
    DbManage.check_waitress()
 
@@ -96,20 +117,20 @@ def load_environment(global_conf, app_co
 
    set_available_permissions(config)
 
    repos_path = make_ui('db').configitems('paths')[0][1]
 
    config['base_path'] = repos_path
 
    set_rhodecode_config(config)
 
    set_app_settings(config)
 

	
 
    instance_id = rhodecode.CONFIG.get('instance_id')
 
    instance_id = kallithea.CONFIG.get('instance_id')
 
    if instance_id == '*':
 
        instance_id = '%s-%s' % (os.uname()[1], os.getpid())
 
        rhodecode.CONFIG['instance_id'] = instance_id
 
        instance_id = '%s-%s' % (platform.uname()[1], os.getpid())
 
        kallithea.CONFIG['instance_id'] = instance_id
 

	
 
    # CONFIGURATION OPTIONS HERE (note: all config options will override
 
    # any Pylons config options)
 

	
 
    # store config reference into our module to skip import magic of
 
    # pylons
 
    rhodecode.CONFIG.update(config)
 
    set_vcs_config(rhodecode.CONFIG)
 
    kallithea.CONFIG.update(config)
 
    set_vcs_config(kallithea.CONFIG)
 

	
 
    #check git version
 
    check_git_version()
kallithea/config/middleware.py
Show inline comments
 
file renamed from rhodecode/config/middleware.py to kallithea/config/middleware.py
 
"""Pylons middleware initialization"""
 
# -*- coding: utf-8 -*-
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
    Pylons middleware initialization
 
"""
 

	
 
from beaker.middleware import SessionMiddleware
 
from routes.middleware import RoutesMiddleware
 
@@ -11,11 +26,11 @@ from paste.gzipper import make_gzip_midd
 
from pylons.middleware import ErrorHandler, StatusCodeRedirect
 
from pylons.wsgiapp import PylonsApp
 

	
 
from rhodecode.lib.middleware.simplehg import SimpleHg
 
from rhodecode.lib.middleware.simplegit import SimpleGit
 
from rhodecode.lib.middleware.https_fixup import HttpsFixup
 
from rhodecode.config.environment import load_environment
 
from rhodecode.lib.middleware.wrapper import RequestWrapper
 
from kallithea.lib.middleware.simplehg import SimpleHg
 
from kallithea.lib.middleware.simplegit import SimpleGit
 
from kallithea.lib.middleware.https_fixup import HttpsFixup
 
from kallithea.config.environment import load_environment
 
from kallithea.lib.middleware.wrapper import RequestWrapper
 

	
 

	
 
def make_app(global_conf, full_stack=True, static_files=True, **app_conf):
 
@@ -49,13 +64,13 @@ def make_app(global_conf, full_stack=Tru
 

	
 
    # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares)
 
    if asbool(config['pdebug']):
 
        from rhodecode.lib.profiler import ProfilingMiddleware
 
        from kallithea.lib.profiler import ProfilingMiddleware
 
        app = ProfilingMiddleware(app)
 

	
 
    if asbool(full_stack):
 

	
 
        from rhodecode.lib.middleware.sentry import Sentry
 
        from rhodecode.lib.middleware.errormator import Errormator
 
        from kallithea.lib.middleware.sentry import Sentry
 
        from kallithea.lib.middleware.errormator import Errormator
 
        if Errormator and asbool(config['app_conf'].get('errormator')):
 
            app = Errormator(app, config)
 
        elif Sentry:
kallithea/config/post_receive_tmpl.py
Show inline comments
 
file renamed from rhodecode/config/post_receive_tmpl.py to kallithea/config/post_receive_tmpl.py
 
@@ -3,28 +3,31 @@ import os
 
import sys
 

	
 
try:
 
    import rhodecode
 
    RC_HOOK_VER = '_TMPL_'
 
    os.environ['RC_HOOK_VER'] = RC_HOOK_VER
 
    from rhodecode.lib.hooks import handle_git_post_receive
 
    import kallithea
 
    KALLITHEA_HOOK_VER = '_TMPL_'
 
    os.environ['KALLITHEA_HOOK_VER'] = KALLITHEA_HOOK_VER
 
    from kallithea.lib.hooks import handle_git_post_receive as _handler
 
except ImportError:
 
    rhodecode = None
 
    if os.environ.get('RC_DEBUG_GIT_HOOK'):
 
        import traceback
 
        print traceback.format_exc()
 
    kallithea = None
 

	
 

	
 
def main():
 
    if rhodecode is None:
 
        # exit with success if we cannot import rhodecode !!
 
    if kallithea is None:
 
        # exit with success if we cannot import kallithea !!
 
        # this allows simply push to this repo even without
 
        # rhodecode
 
        # kallithea
 
        sys.exit(0)
 

	
 
    repo_path = os.path.abspath('.')
 
    push_data = sys.stdin.readlines()
 
    # os.environ is modified here by a subprocess call that
 
    # runs git and later git executes this hook.
 
    # Environ gets some additional info from rhodecode system
 
    # Environ gets some additional info from kallithea system
 
    # like IP or username from basic-auth
 
    handle_git_post_receive(repo_path, push_data, os.environ)
 
    _handler(repo_path, push_data, os.environ)
 
    sys.exit(0)
 

	
 
if __name__ == '__main__':
kallithea/config/pre_receive_tmpl.py
Show inline comments
 
file renamed from rhodecode/config/pre_receive_tmpl.py to kallithea/config/pre_receive_tmpl.py
 
@@ -3,28 +3,31 @@ import os
 
import sys
 

	
 
try:
 
    import rhodecode
 
    RC_HOOK_VER = '_TMPL_'
 
    os.environ['RC_HOOK_VER'] = RC_HOOK_VER
 
    from rhodecode.lib.hooks import handle_git_pre_receive
 
    import kallithea
 
    KALLITHEA_HOOK_VER = '_TMPL_'
 
    os.environ['KALLITHEA_HOOK_VER'] = KALLITHEA_HOOK_VER
 
    from kallithea.lib.hooks import handle_git_pre_receive as _handler
 
except ImportError:
 
    rhodecode = None
 
    if os.environ.get('RC_DEBUG_GIT_HOOK'):
 
        import traceback
 
        print traceback.format_exc()
 
    kallithea = None
 

	
 

	
 
def main():
 
    if rhodecode is None:
 
        # exit with success if we cannot import rhodecode !!
 
    if kallithea is None:
 
        # exit with success if we cannot import kallithea !!
 
        # this allows simply push to this repo even without
 
        # rhodecode
 
        # kallithea
 
        sys.exit(0)
 

	
 
    repo_path = os.path.abspath('.')
 
    push_data = sys.stdin.readlines()
 
    # os.environ is modified here by a subprocess call that
 
    # runs git and later git executes this hook.
 
    # Environ gets some additional info from rhodecode system
 
    # Environ gets some additional info from kallithea system
 
    # like IP or username from basic-auth
 
    handle_git_pre_receive(repo_path, push_data, os.environ)
 
    _handler(repo_path, push_data, os.environ)
 
    sys.exit(0)
 

	
 
if __name__ == '__main__':
kallithea/config/rcextensions/__init__.py
Show inline comments
 
file renamed from rhodecode/config/rcextensions/__init__.py to kallithea/config/rcextensions/__init__.py
 
@@ -173,7 +173,7 @@ DELETE_USER_HOOK = _dluserhook
 
#==============================================================================
 

	
 
# this function will be executed after each push it's executed after the
 
# build-in hook that RhodeCode uses for logging pushes
 
# build-in hook that Kallithea uses for logging pushes
 
def _pushhook(*args, **kwargs):
 
    """
 
    Post push hook
 
@@ -197,7 +197,7 @@ PUSH_HOOK = _pushhook
 
#==============================================================================
 

	
 
# this function will be executed after each push it's executed after the
 
# build-in hook that RhodeCode uses for logging pulls
 
# build-in hook that Kallithea uses for logging pulls
 
def _pullhook(*args, **kwargs):
 
    """
 
    Post pull hook

Changeset was too big and was cut off... Show full diff anyway

0 comments (0 inline, 0 general)