branch: strip whitespace before testing known branch name
Because dirstate._branch() strips leading/trailing spaces from .hg/branch,
"hg branch ' foo '" should abort if branch "foo" exists in another head.
tag command had a similar bug and fixed by
3d0a9c8d7184.
copies: refactor checkcopies() into a top level method
This moves checkcopies() out of mergecopies() and makes it a top level
function in the copies module. This allows extensions to override it. For
example, I'm developing a filelog replacement that doesn't have rev numbers
so all the rev number dependent implementation here needs to be replaced
by the extension.
No logic is changed in this commit.
store: move top file walk to a separate function
Some extensions find it useful to be able to walk the non-data files in the
repo, so I'm moving that part of the walk to a separate function.
In particular, this allows an extension to interact with only the non-filelog
store data (for instance, when cloning everything but filelogs).
clone: move file stream walk to a separate function
Moves the file walk out of the stream method so that extensions can override it.
This allows an extension to decide what files should be streamed, and in
particular allows a stream without filelogs.