Changeset - 950110f3f99f
[Not reviewed]
beta
0 3 0
Marcin Kuzminski - 14 years ago 2012-02-26 17:08:37
marcin@python-works.com
merged changes from stable into beta
3 files changed with 12 insertions and 3 deletions:
0 comments (0 inline, 0 general)
docs/contributing.rst
Show inline comments
 
@@ -8,18 +8,26 @@ 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
 
your forked repository. Please post all fixes into **BETA** branch since your 
 
fix might be already fixed there and i try to merge all fixes from beta into
 
stable, and not the other way. Finally, when you are finished making a change, 
 
please send me a pull request.
 

	
 
To run RhodeCode in a development version you always need to install the tip
 
version of RhodeCode and the VCS library.
 

	
 
after downloading RhodeCode make sure you run::
 

	
 
    python setup.py develop
 

	
 
command to install all required packages, and prepare development enviroment
 

	
 

	
 

	
 
| Thank you for any contributions!
 
|  Marcin
 

	
 

	
 

	
 
.. _bitbucket: http://bitbucket.org/
docs/theme/nature/layout.html
Show inline comments
 
{% extends "basic/layout.html" %}
 

	
 
{% block sidebarlogo %}
 
<h3>Support RhodeCode 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>
 
    <div style="padding:5px">
 
     <a href="http://flattr.com/thing/167489/RhodeCode" target="_blank">
 
     <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
 
   </div>  
 
</div>
 
{% endblock %}}
rhodecode/lib/__init__.py
Show inline comments
 
@@ -223,27 +223,24 @@ def safe_unicode(str_, from_encoding=Non
 
def safe_str(unicode_, to_encoding=None):
 
    """
 
    safe str function. Does few trick to turn unicode_ into string
 

	
 
    In case of UnicodeEncodeError we try to return it with encoding detected
 
    by chardet library if it fails fallback to string with errors replaced
 

	
 
    :param unicode_: unicode to encode
 
    :rtype: str
 
    :returns: str object
 
    """
 

	
 
    if not isinstance(unicode_, basestring):
 
        return str(unicode_)
 

	
 
    if isinstance(unicode_, str):
 
        return unicode_
 

	
 
    if not to_encoding:
 
        import rhodecode
 
        DEFAULT_ENCODING = rhodecode.CONFIG.get('default_encoding','utf8')
 
        to_encoding = DEFAULT_ENCODING
 

	
 
    try:
 
        return unicode_.encode(to_encoding)
 
    except UnicodeEncodeError:
 
        pass
0 comments (0 inline, 0 general)