Mercurial > kallithea
diff rhodecode/lib/helpers.py @ 1776:22333ddd1a40 beta
implements #307, configurable diffs
- global context increase and whitespace
- perfile context and whitespace
- fixed anchor links support
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 11 Dec 2011 00:51:53 +0200 |
parents | 025f3333c769 |
children | 089c81cf04d9 |
line wrap: on
line diff
--- a/rhodecode/lib/helpers.py Sat Dec 10 14:49:12 2011 +0200 +++ b/rhodecode/lib/helpers.py Sun Dec 11 00:51:53 2011 +0200 @@ -52,6 +52,17 @@ reset = _reset safeid = _make_safe_id_component + +def FID(raw_id,path): + """ + Creates a uniqe ID for filenode based on it's path and revision + + :param raw_id: + :param path: + """ + return 'C-%s-%s' % (short_id(raw_id), safeid(safe_unicode(path))) + + def get_token(): """Return the current authentication token, creating one if one doesn't already exist.