Changeset - ef3114b01c7c
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2012-02-24 19:53:11
marcin@python-works.com
fixed issues when urlify commit created empty links when link_ param was empty
1 file changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/helpers.py
Show inline comments
 
@@ -824,12 +824,21 @@ def urlify_changesets(text_, repository)
 
    newtext = URL_PAT.sub(url_func, text_)
 

	
 
    return newtext
 

	
 

	
 
def urlify_commit(text_, repository=None, link_=None):
 
    """
 
    Parses given text message and makes proper links.
 
    issues are linked to given issue-server, and rest is a changeset link
 
    if link_ is given, in other case it's a plain text
 

	
 
    :param text_:
 
    :param repository:
 
    :param link_: changeset link
 
    """
 
    import re
 
    import traceback
 

	
 
    # urlify changesets
 
    text_ = urlify_changesets(text_, repository)
 

	
 
@@ -875,12 +884,13 @@ def urlify_commit(text_, repository=None
 
                     'issue-prefix': ISSUE_PREFIX,
 
                     'serv': ISSUE_SERVER_LNK,
 
                }
 

	
 
            newtext = URL_PAT.sub(url_func, text_)
 

	
 
            if link_:
 
            # wrap not links into final link => link_
 
            newtext = linkify_others(newtext, link_)
 

	
 
            return literal(newtext)
 
    except:
 
        log.error(traceback.format_exc())
0 comments (0 inline, 0 general)