revlog: add exception when linkrev == nullrev
When we deployed the latest crew mercurial to our users, a few of them
had issues where a filelog would have an entry with a -1 linkrev. This
caused operations like rebase and amend to create a bundle containing the
entire repository, which took a long time.
I don't know what the issue is, but adding this check should prevent repos
from getting in this state, and should help us pinpoint the issue next time
it happens.
changegroup: fix fastpath during commit
Change
627cd7842e5d dropped the 'revset' variable which kept track of
which changesets were being bundled. Instead, it used "not in
commonset" to decide which changesets were outgoing.. which ran into
trouble when a commit was in progress.
tests: do not print hgrc in test
This lets test-rebase-cache.t pass also when --inotify or --extra-config-opt is
specified.
contrib: delete setup3k in favor of setup --c2to3
setup3k was merged into setup in
7a7a1c594d. Now finally get rid of it.
tests: check-code more python files without py extension
files found by running
$ hg manifest | grep -v "\." | xargs file | grep python
test-pathencode: randomize length of each path component
This makes it possible for long and short components to exist in the same path.
This also makes shorter path components more likely. For
randint(1, randint(1, n)), the likelihood that one sees a number k
(1 <= k <= n) is 1/n * (\sum_{k=i}^n 1/i). This decreases with k, much like in
the real world where shorter paths are more common than longer ones.
The previous fix and this one together cause
issue3958 to be detected by this
test with reasonable frequency. When this test was run 100 times in a loop, the
issue was detected 30 of those times.
test-pathencode: reduce makepart length requirement by 1
This allows path components of length 1 to be generated.
pathencode: fix hashmangle short dir limit (
issue3958)
The Python version of this (see mercurial/store.py:_hashencode) copies path
components up to a limit of maxshortdirslen bytes. The Python version does not
consider the initial "dh/" to be part of the this, though, while the C version
currently does. Adding len("dh/") == 3 to the limit for the C version brings it
in line with the Python version.
This was not caught by the randomized testing scheme in test-pathencode.py
because of a couple of flaws with the test. Upcoming patches will fix those
problems.
docs: change description to synopsis in hgrc.5
Spotted by Eric S. Raymond.
run-tests: sort missing files first instead of raising an error
sort first for early telling typos in test names
filectx: remove dependencies on filerev
Removing dependencies on filectx.filerev() makes it easier to create a filelog
implementation that doesn't have rev numbers.