subrepo: use sharepath if available when locating the source repo
This is an alternative fix for
issue3518, enabling sharing of repositories with
subrepos, without unconditionally setting the default path in the resulting
repo's hgrc file. Better test coverage is added here, but won't prove this code
is working until
fd903f89e42b is backed out.
The problem with the original fix is, if a default path is not available to be
copied over from the share source, the default path on the resulting repo is set
to the source location. Since that's where the actual repository is stored, the
path is essentially self-referential, so push, pull, incoming and outgoing
effectively operate on itself. While incoming and outgoing make it look like
nothing was changed, push currently hangs (see
issue3657). In this case where
there is not a real default path, these operations should abort with
"default(-push) not found", like the source repo would. Note this problem with
the original fix affected repos without subrepos too.
test-histedit: add tests for dropping head changeset
I got bug report from user in this specific case. I was unable to reproduce in
test situation. Testing this situation is still valuable.
histedit: prevent parent guessed via --outgoing from being a revset (
issue3770)
If the binary hash of the parent node guessed via --outgoing happened
to contain a special revset character (":" was specified in the bug),
the revset parser would abort. Hexlifying the node before passing it
to the revsingle call should fix that.
merge: fix UnboundLocalError (
issue3791)
A wrong variable name was introduced in
384df4db6520 for a case without test
coverage.
The variable name is fixed and a test case is introduced.
parsers: fix memleak of revlog cache entries on strip
Since
12a852c7c763, raw_length can be reduced on strip, but corresponding cache
entries still have refcount. They are not dereferenced by _index_clearcache(),
and never freed.
To reproduce the problem, run "hg pull" and "hg strip null" several times
in the same process.
hgweb: fix navigation label (
issue3792)
Latest refactoring (
6da1e979340a) was buggy and used a variable from
another loop. Tests are run on repo too small to cache that.
OS X: try cheap ascii .lower() in normcase before making full unicode dance
This is similar to what is done in encoding.lower, introduced in
c481761033bd.
This has been seen making 'hg up' and 'hg st' in a 50000+ files repo 13%
faster.
This might make Mercurial slightly slower for users who mainly use non-ASCII
filenames. That is a reasonable trade-off.