Staging
v0.5.1
v0.5.1
https://foss.heptapod.net/mercurial/hgview
Revision 55f48628bfca0b1c83f0d6348812ce7b80a0344a authored by Pierre-Yves David on 23 April 2012, 12:53:52 UTC, committed by Pierre-Yves David on 23 April 2012, 12:53:52 UTC
but keep standard order inside them. Having all non public heads at the top of the history helps to not forget about them. :note: Also fix the first revision which is `len(repo)-1` not `len(repo)`. I do not know why this did not crash but this patches make it a better version.
1 parent 58fe577
Tip revision: 55f48628bfca0b1c83f0d6348812ce7b80a0344a authored by Pierre-Yves David on 23 April 2012, 12:53:52 UTC
[lib] phases: display changets with higher phase value on top (wip #92312)
[lib] phases: display changets with higher phase value on top (wip #92312)
Tip revision: 55f4862
decorators.py
# -*- coding: utf-8 -*-
"""
Some useful decorator functions
"""
import time
def timeit(func):
"""Decorator used to time the execution of a function"""
def timefunc(*args, **kwargs):
"""wrapper"""
t_1 = time.time()
t_2 = time.clock()
res = func(*args, **kwargs)
t_3 = time.clock()
t_4 = time.time()
print "%s: %.2fms (time) %.2fms (clock)" % \
(func.func_name, 1000*(t_3 - t_2), 1000*(t_4 - t_1))
return res
return timefunc
Computing file changes ...