Mercurial > hg
view tests/dummyssh @ 27593:bc97b9af4e62
dirstate: call the C implementation of nonnonormalentries when available
Before this patch, we were using python code for computing the nonnormal
dirstate entries. This patch makes us use the C implementation of the function
when it is available.
Using the nonnormal set in hgwatchman improves hg status performance. Below
are the numbers for mozilla-central.
with the changes:
$ hg perfstatus
! wall 0.010632 comb 0.000000 user 0.000000 sys 0.000000 (best of 246)
without the changes:
$ hg perfstatus
! wall 0.036442 comb 0.030000 user 0.030000 sys 0.000000 (best of 100)
On mozilla-central the improvement to hg status is ~20% (0.25s to 0.2s),
on our big repos at Facebook, the win is ~40% (1.2s to 0.72s).
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Wed, 23 Dec 2015 13:16:03 -0800 |
parents | f266cb3f1c2b |
children | 26d4ce8ca2bd |
line wrap: on
line source
#!/usr/bin/env python import sys import os os.chdir(os.getenv('TESTTMP')) if sys.argv[1] != "user@dummy": sys.exit(-1) os.environ["SSH_CLIENT"] = "127.0.0.1 1 2" log = open("dummylog", "ab") log.write("Got arguments") for i, arg in enumerate(sys.argv[1:]): log.write(" %d:%s" % (i + 1, arg)) log.write("\n") log.close() hgcmd = sys.argv[2] if os.name == 'nt': # hack to make simple unix single quote quoting work on windows hgcmd = hgcmd.replace("'", '"') r = os.system(hgcmd) sys.exit(bool(r))