Yuya Nishihara <yuya@tcha.org> [Sun, 07 Oct 2018 15:36:34 +0900] rev 44680
rust-chg: add interface to run "validate" request
Differential Revision: https://phab.mercurial-scm.org/D8379
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Oct 2018 15:21:54 +0900] rev 44679
rust-chg: add helper to parse instructions sent from server
This is well structured version of runinstructions() of chg.c.
Differential Revision: https://phab.mercurial-scm.org/D8378
Martin von Zweigbergk <martinvonz@google.com> [Thu, 02 Apr 2020 13:53:33 -0700] rev 44678
tests: move verification closer to setup in test-copies-chain-merge.t
I found this test case really hard to read because it requires
scrolling back and forth between the setup and the verification. This
patch moves them closer together. There was also duplicated
descriptions for each test case (duplicated between setup and
verification). They had already become out of sync. I picked the
description from the verification, partly so the differences would be
highlighted in this patch.
Differential Revision: https://phab.mercurial-scm.org/D8377
Martin von Zweigbergk <martinvonz@google.com> [Thu, 02 Apr 2020 13:45:10 -0700] rev 44677
tests: collect all branch creation in one place in test-copies-chain-merge.t
I found this test case really hard to read because it requires
scrolling back and forth between the setup and the verification. The
next patch will move the verification close to the merge commits they
test. This patch prepares for that by moving all branch creation first
so they are separate from the merge commits (because many merge
commits reuse the same branches).
Differential Revision: https://phab.mercurial-scm.org/D8376
Kyle Lippincott <spectral@google.com> [Mon, 06 Apr 2020 15:19:09 -0700] rev 44676
hgk: remove a "b" used on a kwargs expansion, the keys are strs
Differential Revision: https://phab.mercurial-scm.org/D8385
Yuya Nishihara <yuya@tcha.org> [Thu, 04 Oct 2018 23:07:48 +0900] rev 44675
rust-chg: send client-side environment variables to server
This is also needed to run config validation.
The "validate" request and its response handling will be implemented in
the next batch.
Differential Revision: https://phab.mercurial-scm.org/D8364
Yuya Nishihara <yuya@tcha.org> [Thu, 04 Oct 2018 23:01:34 +0900] rev 44674
rust-chg: add helper to pack environment variables
On my machine, "printenv | wc -c" says 3422. That's the only reason why
the initial buffer capacity is set to 4kB.
Differential Revision: https://phab.mercurial-scm.org/D8363
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Oct 2018 10:23:57 +0900] rev 44673
rust-chg: move set_current_dir() to Locator
This is necessary to run config validation in proper environment.
Differential Revision: https://phab.mercurial-scm.org/D8362
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Oct 2018 10:12:22 +0900] rev 44672
rust-chg: abort if server doesn't have required capabilities
It's checked at Locator::connect() since we'll have to do more stuff in
this function.
Differential Revision: https://phab.mercurial-scm.org/D8361
Yuya Nishihara <yuya@tcha.org> [Sat, 06 Oct 2018 20:10:44 +0900] rev 44671
rust-chg: spawn server process if not running
This is the minimal reimplementation of gethgcmd(), execcmdserver(),
retryconnectcmdserver(), and connectcmdserver() in chg.c.
No config validation is implemented yet. And some Py3 workarounds would
be missing as this is the code I wrote in 2018.
Differential Revision: https://phab.mercurial-scm.org/D8360
Yuya Nishihara <yuya@tcha.org> [Tue, 31 Mar 2020 23:13:13 +0900] rev 44670
rust-chg: update dependencies
Differential Revision: https://phab.mercurial-scm.org/D8359
Yuya Nishihara <yuya@tcha.org> [Sat, 03 Nov 2018 12:30:46 +0900] rev 44669
rust-chg: depend on released version of tokio-process
Still it is futures-0.1 based.
Differential Revision: https://phab.mercurial-scm.org/D8358
Yuya Nishihara <yuya@tcha.org> [Sun, 14 Oct 2018 14:41:14 +0200] rev 44668
rust-chg: add brief comment about initial capacity of temp_sock_path()
I don't know if it can be expressed as a compile-time constant, so it's
a comment for now.
About this series:
This is quite old patches for rust-chg. I heard from Octobus people that
there's a plan to do an experiment on merging hgcli + chg + some Rust?,
so I decided to respin the rust-chg series.
Maybe we'll rewrite the core to leverage the recent async/await functionality,
but I want to first make my old patches in so the rust-chg can be a drop-in
replacement for the chg of C. Compiler warnings will be removed later, and
the codebase will be upgraded to the 2018 edition later.
Differential Revision: https://phab.mercurial-scm.org/D8357
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Apr 2020 00:24:57 +0200] rev 44667
discovery: avoid wrongly saying there are nothing to pull
We can get in a situation where a revision passed through `hg pull --rev REV`
are available on the server, but not a descendant of the advertised server
heads.
For example the server could lying be during heads advertisement, to hide some
pull request. Or obsolete/hidden content could be explicitly pulled.
So in this case the lookup associated to `REV` returned successfully, but the
normal discovery will find all advertised heads already known locally. This flip
a special boolean `anyinc` that will prevent any fetch attempt, preventing `REV`
to be pulled over.
We add three line of code to detect this case and make sure a pull actually
happens.
My main target is to make some third party extensions happy (I expect the
associated test to move upstream with the extension). However this fix already
make some of the `infinitepush` test happier.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 01 Apr 2020 14:34:21 -0700] rev 44666
rebase: don't create merge when continuing rebase interrupted by old hg
This fixes the bug described and demonstrated in the previous
commit. It does so by practically undoing
8082a77cc3a2 (rebase: remove
some redundant setting of dirstate parents, 2020-01-10).
Differential Revision: https://phab.mercurial-scm.org/D8356