filemerge: only copy to backup during premerge step
The premerge might leave the original file in an unclean state. Therefore it's
important to only copy the file in the beginning.
filemerge: only print out "merging f" output at premerge step
We're soon going to call this function twice, once for premerge and once for
merge. This makes sure the "merging" output only gets printed during the
premerge step.
filemerge: deindent the parts of filemerge outside the try block
It is no longer necessary to indent these parts.
filemerge: introduce a premerge flag and function
This flag will let us get to our overall goal of performing all premerges
before any merges.
filemerge: also return whether the merge is complete
In future patches, we'll pause merges after the premerge step. After the
premerge step we'll return complete = False.
filemerge: add a wrapper around the filemerge function
We'll introduce a separate premerge function that calls the same code.
context: don't hex encode all unknown 20 char revision specs (
issue4890)
d3908c911d5e introduced nice hexified display of missing nodes. It did however
also make missing 20 character revision specifications be shown as hex - very
confusing.
Users are often wrong and somehow specify revisions that don't exist. Nodes
will however rarely be missing ... and they will only look like a user provided
revision specification and be all ascii in 1 of 4*10**9.
With this change, missing revisions will only be hexified if they really look
like binary nodes. This change will thus improve the error reporting UI in the
common case and only very rarely make it confusing in the opposite direction of
how it was before.
discovery: put trivial branch first
Having the simple and tiny branch of the conditional first help readability. The
"else" that appears after a screen of code is harder to relate to a conditional.
shelve: rename 'publicancestors' to something accurate (
issue4737)
That function is actually not returning public ancestors at all. This is
pointed by the second line of the docstring...
The bundling behavior was made correct in
a5141977198d but with confusion
remaining regarding what each function was doing.
This close
issue4737, because this highlight that shelve is actually -not-
bundling too much data (this was actually properly tested).