Skip to content

馃懘馃徎hint[old-version]: Freshly built binary reports version is 600,000+ days old馃聽#1468

Open

Description

@vegerot

Description

After building and installing Sapling from source using make install-oss (or build.py), running sl produces a warning claiming the newly installed binary is hundreds of thousands of days old:

hint[old-version]: WARNING! Your version of Sapling is 682491 days old. Please upgrade your installation.
hint[hint-ack]: use 'sl hint --ack old-version' to silence these hints

For example, on a build completed today with version 20261007_015833_2923544b8955, Sapling reports that the version is 682,491 days old (~1,868 years).

Culprit Commit

The issue was introduced in commit 2a6f939 ("build: add build.py") and switched on for make targets in 25b41e7 ("Makefile: use build.py for building").

Cause

In the legacy setup.py, pickversion() formatted versions with a Mercurial compatibility prefix:
4.4.2_YYYYMMDD_HHMMSS_<hash>

Commit 2a6f939 introduced build.py, where auto_version() omitted the 4.4.2_ prefix and outputs:
YYYYMMDD_HHMMSS_<hash>

However, eden/scm/sapling/util.py:versionagedays() still assumes the date is located at index 1 after splitting on _:

parts = remod.split("_", v)
approxbuilddate = datetime.datetime.strptime(parts[1], "%Y%m%d")

Because of the dropped prefix, parts[1] now contains HHMMSS (the build time) rather than YYYYMMDD (the build date). Whenever Python's strptime successfully parses the 6-digit time string with %Y%m%d (treating HHMM as the year and SS as month/day), it resolves to an ancient year (e.g., 0158-03-03), resulting in a calculation of 600,000+ days elapsed.

Activity

  1. changed the title [-]hint[old-version]: Freshly built binary reports version is 600,000+ days old[/-] [+]馃懘馃徎hint[old-version]: Freshly built binary reports version is 600,000+ days old馃[/+] on Oct 7, 2026
  2. added 2 commits that reference this issue on Oct 7, 2026
    9d39e9b
    ad03036
  3. added 2 commits that reference this issue on Oct 15, 2026
    210e5b6
    c3df244
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions