largefiles: drop partial support for not having a user cache
971c55ce03b8 introduced support for not having a "global" user cache.
In the rare cases where the environment didn't provide the location of the
current home directory, the usercachepath function could return None.
That functionality has since bitrotten and several code paths did not correctly
check for usercachepath returning None:
$ HOME= XDG_CACHE_HOME= hg up --config extensions.largefiles=
getting changed largefiles
abort: unknown largefiles usercache location
Dropping the partial support for it is thus not really a backward compatibility
breaking change.
Thus: consistently fail early if the usercache location is unknown.
It is relevant to be able to control where the largefiles are stored and how
they propagate, but that should probably be done differently. The dysfunctional
code just gets in the way.
largefiles: refactor usercachepath - extract user cache path function
It is convenient to have the user cache location explicitly.
shelve: adds restoring newly created branch (
issue5048) (BC)
Before this patch shelve never preserved branch information,
so after applying unshelve branch was the same as it was
on working copy no matter in which branch shelve took place.
This patch makes bare shelving(with no files specified, without
interactive,include and exclude option) remembers information if
the working directory was on newly created branch ,in other words
working directory was on different branch than its first parent.
In this situation unshelving restores branch information to the working
directory.