namespaces: introduce a generic way to map between names and nodes
This patch begins the work to provide a way to register a namespace to handle
'names'. Benefits of this would be,
- improved templating: This would provide {name} which could output any branch,
bookmark, tag, or any extension registered namespace all without having the
extension doing any extra work
- improved tab completion: Since this provides a single source of all 'names',
tab completion would not need to know of each namespace
- changeset lookup: Similar to before, a unified place to get all 'names' will
allow finding changesets without any extension code having to reimplement
this
Also,
d226fe36e362 has shown us that for internal code which expects a certain
type of method or behavior, we should provide an easy way for extensions to
check this behavior.
statichttprepo: update profile of __call__ in mock vfs object
New code paths could fail because the old statichttprepo profile couldn't
handle the usual parameters.
Instead, reuse a more generic profile also used in readonlyvfs.
tests: avoid git diffstat singular/plural output difference
'git diff --stat' output changed with regard to the amount
of changes/insertions/deletions shown.
In older git versions (1.7.7.6), output was shown as:
2 files changed, 2 insertions(+), 1 deletions(-)
In newer versions, output is shown as:
2 files changed, 2 insertions(+), 1 deletion(-)
This patch uses a regex to handle both cases.
subrepo: add revert support without backup for git subrepos
Previously, git subrepos did not support reverting.
This change adds basic support for reverting
when '--no-backup' is specified.
A warning is given (and the current state is kept)
when a revert is done without the '--no-backup' flag.
match: make 'always' and 'exact' functions, not classes
There is no reason for classes 'always' and 'exact' not to be just
functions that return instances the plain 'match' class.
share: implement shared bookmark functionality
This does not cause any behavioral change unless a 'bookmarks.shared' marker
file exists. A future change will add UI to create this file when a repository
is shared.