Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .github/workflows/mononoke_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
name: Mononoke Linux

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch

permissions:
contents: read # to fetch code (actions/checkout)
Expand Down
3 changes: 3 additions & 0 deletions eden/scm/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ def cargo_env(args):
env["OPENSSL_DIR"] = str(openssl)
env.pop("OPENSSL_STATIC", None)
env["RUSTFLAGS"] = (env.get("RUSTFLAGS", "") + " -Anon_local_definitions").strip()
# Allow nightly features (smallvec specialization, once_cell_try) on stable Rust.
# Required for `make oss` / cargo oss builds. Buck builds use nightly toolchain internally.
env.setdefault("RUSTC_BOOTSTRAP", "1")
set_windows_python_path(env, args.python)
return env

Expand Down
14 changes: 10 additions & 4 deletions eden/scm/sapling/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,16 @@ def versionagedays() -> int:
"""Returns approximate age in days of the current version, or 0 if not available."""
try:
v = version()
parts = remod.split("_", v)
approxbuilddate = datetime.datetime.strptime(parts[1], "%Y%m%d")
now = datetime.datetime.now()
return (now - approxbuilddate).days
parts = remod.split(r"[_\.\-+]", v)
for part in parts:
if len(part) == 8 and part.isdigit():
try:
approxbuilddate = datetime.datetime.strptime(part, "%Y%m%d")
now = datetime.datetime.now()
return max(0, (now - approxbuilddate).days)
except ValueError:
pass
return 0
except Exception:
return 0

Expand Down
Loading