diff options
| author | Russ Cox <rsc@golang.org> | 2025-08-19 15:27:39 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-11-11 07:21:02 -0800 |
| commit | 426ef30ecf2d2b6eadd962358884ed68220b9cc5 (patch) | |
| tree | 1a9b8246de6309f2ca84b7744cb2ed6114d66d10 /src/os/exec/exec.go | |
| parent | 5241d114f55cfa69a4bf8f2051f5d83d1f618859 (diff) | |
| download | go-426ef30ecf2d2b6eadd962358884ed68220b9cc5.tar.xz | |
cmd/go: implement -reuse for Mercurial repos
When we added -reuse in CL 411398, we only handled Git repos.
This was partly because we were focused on Git traffic,
partly because Git is the dominant module VCS, and
partly because I couldn't see how to retrieve the metadata needed
in other version control systems.
This CL adds -reuse support for Mercurial, the second
most popular VCS for modules, now that I see how to
implement it. Although the Mercurial command line does
not have sufficient information, the Mercurial Python API does,
so we ship and invoke a Mercurial extension written in Python
that can compute a hash of the remote repo without downloading
it entirely, as well as resolve a remote name to a hash or check
the continued existence of a hash. Then we can avoid
downloading the repo at all if it hasn't changed since the last check
or if the specific reference we need still resolves or exists.
Fixes #75119.
Change-Id: Ia47d89b15c1091c44efef9d325270fc400a412c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/718382
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/os/exec/exec.go')
0 files changed, 0 insertions, 0 deletions
