rebase: fix issue 5494 also with --collapse
Differential Revision: https://phab.mercurial-scm.org/D2759
rebase: also include commit of collapsed commits in single transaction
When rebase.singletransaction is set, we still used to create a second
transaction when committing with --collapse. It's simpler to create a
single transaction.
Note that in the affected .t file, the test that uses --collapse still
appears to create two transactions (it prints "rebase status stored"
twice). However, only a single transaction is actually created and the
second printout comes from cmdutil.commitforceeditor() that explicitly
calls tr.writepending().
Also note the that we now roll back any commits if the user closes the
commit message editor with an error code (or leaves the message
empty). That might be unfortunate, but it's consistent with how we
behave in the --no-collapse case (if the user passed --edit). If we
want to change that, I think it should be done consistently in a
separate patch.
Differential Revision: https://phab.mercurial-scm.org/D2728
lfs: debug print HTTP headers and JSON payload received from the server
This has been extremely valuable to show divergences between `hg serve` and
`lfs-test-server`. Once the `hg serve` code lands, there will be a certain
amount of conditionalizing that needs to be done, because `lfs-test-server`
doesn't always follow its spec.
The $ISO_8601_DATE_TIME$ pattern masks the fact that `lfs-test-serve` is sending
out an expires_at value of "0001-01-01T00:00:00Z". `hg serve` will (probably)
use current time + 10 minutes or similar. The $HTTP_DATE$ is the current time.
test-lfs: dial up the debugging on commands that interact with the server
This will be useful to let the client print out the HTTP headers and JSON in a
future patch, so we can compare native LFS serving against test-lfs-server
behavior. There tends to be a lot of debug stuff that we don't care about here
in a push, so I was tempted to print this output with a [devel] config. But
this will be useful for field debugging too, so just put up with the extra
output here.
It would have been nice to be able to set ui.debug once, but
issue5815 prevents
that.
tests: add a substitution pattern for dates in HTTP headers and LFS payload
This will be useful when printing HTTP headers and JSON payload received from an
LFS server. The RFC 1123 date masking has uses elsewhere too.
xdiff: fix a hard crash on Windows
The xdiff case of test-diff-antipatience.t started crashing in the C extension
with
882657a9f768 (with
6a71a5ba666b backported so it compiles). There are a
few more instances of 'long', but this resolves the crashing.
templater: split template functions to new module
It has grown enough to be a dedicated module.
templater: move hybrid class and functions to templateutil module
And make _hybrid and _mappable classes public. _showlist() is still marked
as private since it's weird and third-party codes shouldn't depend on it.