inotify: don't fall over just because of a dangling symlink
Previously, the inotify server failed to start if .hg/inotify.sock was
a symlink that pointed to a non-existent path. This behaviour does not
seem to make any sense.
Now, if we encounter a broken symlink, we unlink it and continue.
test-inotify: test symlink indirection for unix sockets
The inotify code performs a delicate dance to work around the 108-byte
limit on unix domain socket path names on Linux.
This change sets us up to safely refactor that code without breaking
it. (It is redundant with part of test-inotify-
issue1208.t, but we will
shortly make that test go away.)
test-pathencode: compare current pathencoding implementations
We already have two implementations of the pathencoding (C and
Python) and this test can perfectly well be used to probabilistically
test them instead of just wasting CPU cycles and test time.
rebase: use lazy ancestor membership testing
For a repository with over 400,000 commits, rebasing one revision near tip,
this avoids one walk up the DAG, speeding the operation up by around 0.8
seconds.
localrepo: use lazy ancestor membership testing
For a repository with over 400,000 commits, rebasing one revision near tip,
this avoids two treks up the DAG, speeding the operation up by around 1.6
seconds.
ancestor: add lazy membership testing to lazyancestors
This also makes the perfancestorset command use lazy membership testing. In a
linear repository with over 400,000 commits, without this patch, hg
perfancestorset takes 0.80 seconds no matter how far behind we're looking.
With this patch, hg perfancestorset -- X takes:
Rev X Time
-1 0.00s
-4000 0.01s
-20000 0.04s
-80000 0.17s
-200000 0.43s
-300000 0.69s
0 0.88s
Thus, for revisions close to tip, we're up to several orders of magnitude
faster. At 0 we're around 10% slower.
revlog: move ancestor generation out to a new class
This refactoring is to prepare for implementing lazy membership.