Skip to content

Commit

Permalink
robustcheckout: handle share-safe requirement and .hg/store/requires …
Browse files Browse the repository at this point in the history
…file r=sheehan

hg 6.1 moved most requirements to a separate file, so we need to look
for them there, or we'll delete the store re-clone every time.

Differential Revision: https://phabricator.services.mozilla.com/D159269

--HG--
extra : moz-landing-system : lando
  • Loading branch information
jcristau committed Oct 13, 2022
1 parent 78673ee commit 2d38bd5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hgext/robustcheckout/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,11 @@ def handlepullerror(e):

if storevfs.exists(b".hg/requires"):
requires = set(storevfs.read(b".hg/requires").splitlines())
# "share-safe" (enabled by default as of hg 6.1) moved most
# requirements to a new file, so we need to look there as well to avoid
# deleting and re-cloning each time
if b"share-safe" in requires:
requires |= set(storevfs.read(b".hg/store/requires").splitlines())
# FUTURE when we require generaldelta, this is where we can check
# for that.
required = {b"dotencode", b"fncache"}
Expand Down

0 comments on commit 2d38bd5

Please sign in to comment.