Mercurial and Git clients can push and pull from this alias URL to interact with this repository. You can change to which repository an alias points by going to the Aliases link on the project page.
## development and stub-testing module for overlay icon handlers#importos,sys,time,atexitfrommercurialimportuifrommercurial.i18nimport_# FIXMEL: quick & dirty hack to add tortoise to module search pathimport__init__moddir=os.path.dirname(__init__.__file__)sys.path.insert(0,os.path.join(moddir,os.pardir))fromiconoverlayimportIconOverlayExtensiondeflsprof(checkargs):try:frommercurialimportlsprofexceptImportError:raiseutil.Abort(_('lsprof not available - install from ''http://codespeak.net/svn/user/arigo/hack/misc/lsprof/'))p=lsprof.Profiler()p.enable(subcalls=True)try:returncheckargs()finally:p.disable()stats=lsprof.Stats(p.getstats())stats.sort()stats.pprint(top=10,file=sys.stderr,climit=5)defprofile(checkargs):importhotshot,hotshot.statsprof=hotshot.Profile("hg.prof")try:try:returnprof.runcall(checkargs)except:try:ui.warn(_('exception raised - generating ''profile anyway\n'))except:passraisefinally:prof.close()stats=hotshot.stats.load("hg.prof")stats.strip_dirs()stats.sort_stats('cumulative','time','calls')stats.print_stats(40)deftimeit():u=ui.ui()defget_times():t=os.times()ift[4]==0.0:# Windows leaves this as zero, so use time.clock()t=(t[0],t[1],t[2],t[3],time.clock())returnts=get_times()defprint_time():t=get_times()u.warn(_("Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n")%(t[4]-s[4],t[0]-s[0],t[2]-s[2],t[1]-s[1],t[3]-s[3]))atexit.register(print_time)defget_option(args):importgetoptlong_opt_list=('time','lsprof','profile')opts,args=getopt.getopt(args,"",long_opt_list)options={}foro,ainopts:options[o]=areturnoptions,argsif__name__=='__main__':ovh=IconOverlayExtension()option,argv=get_option(sys.argv[1:])path=len(argv)andargv[0]oros.getcwd()path=os.path.abspath(path)# get the list of files residing in the target directorydirname=os.path.dirname(path)ifdirname==path:dirlist=[path]else:dirlist=[os.path.join(dirname,x)forxinos.listdir(dirname)]# first call to _get_state() is usually longer...defget_state_1st():ovh._get_state(path)# subsequent call to _get_state() using the files in# the target directorydefget_state_2nd():forfindirlist:ovh._get_state(f)# 'master' function for profiling purposedefget_states():get_state_1st()get_state_2nd() if option.has_key('--time'):
timeit()
- if option.has_key('--lsprod'):
- lsprof(get_states) # fixme: lsprof traceback on win32 (only?)+ if option.has_key('--lsprof'):
+ lsprof(get_states)
elif option.has_key('--profile'):
profile(get_states)
else:
get_states()
Attach a Trello Card
Add a tag
Your session has expired
You are no longer logged in. Please log in and try your request again.
Filter RSS Feed
This RSS feed URL allows you to see the contents of your current filter using any feed reader.
This link includes a special authentication token. If you share the URL with anyone else, they can see this RSS feed's activity. You can disable these tokens when needed.
Your current filter is unsaved; changing it won't affect this RSS feed.