Page MenuHomeFreeBSD

Fix newvers.sh to no longer print an outdated SVN rev
ClosedPublic

Authored by uqs on Dec 23 2020, 9:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 7:40 AM
Unknown Object (File)
Sun, Nov 24, 12:39 PM
Unknown Object (File)
Nov 21 2024, 6:35 AM
Unknown Object (File)
Nov 21 2024, 5:22 AM
Unknown Object (File)
Nov 16 2024, 12:50 PM
Unknown Object (File)
Nov 16 2024, 11:51 AM
Unknown Object (File)
Nov 16 2024, 9:42 AM
Unknown Object (File)
Nov 7 2024, 4:51 AM
Subscribers

Details

Summary

We have stopped using SVN, so the notes containing the old SVN revisions
are no longer populated, so fall back to purely counting the number of
commits (currently at about 255126).

Also turn the format more into what git-describe produces, with a name
first, then potentially a number of commits on top of that and the hash
last. Note that as we don't tag anything on main, git describe will
never produce something useful there and finds the newest vendor tag
that was merged in instead.

Sample output: FreeBSD 13.0-CURRENT #6 main-c255126-gb81783dc98e6-dirty

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

uqs requested review of this revision.Dec 23 2020, 9:37 PM

what will this look like on stable (eventually)?

what will this look like on stable (eventually)?

FreeBSD 13.0-CURRENT #6 main-c255126-gb81783dc98e6-dirty
FreeBSD 12.2-STABLE #0 stable/12-c243035-gd16dac42b641-dirty

are you worried about the slash in there? It seems that neither svn or hg actually put the branch name in there. I think we should have it though, although it's a bit redundant with the -CURRENT or 12.2-STABLE, but it more closely resembles git describe and we shouldn't be overly gratuitously different for no good reason, IMHO.

Add sample output and MFC reminder to commit message

(does this even update in arc? I have no idea ...)

This may have a slight improvement when compiling from a non-branch point - a detached state. Now

if [ -n "$git_b" ] ; then
        git="${git}(${git_b})"
fi

will just produce 'HEAD", which is useless.

We can either just cut away the branch name, so result will be "c255126-gb81783dc98e6-dirty", or add word "detached" (maybe). Suggested patch:

if [ -n "$git_b" -a "$git_b" != "HEAD" ] ; then
        git="${git}(${git_b})"
fi

update to skip HEAD as suggested by glebius

This looks good. If it is checked out of subversion on -stable, then we'll get the right uname, so it can likely be MFC'd... We're not writing new svn revs to git, but there may be something I'm missing.

an SVN checkout of stable/12 will produce this, after the MFC (i.e. nothing changes for that)

VERINFO='FreeBSD 12.2-STABLE #0 r368820M: Fri Dec 25 17:21:30 CET 2020'

uqs edited subscribers, added: gjb, lwhsu; removed: imp.
This revision was not accepted when it landed; it landed in state Needs Review.Dec 26 2020, 3:54 PM
This revision was automatically updated to reflect the committed changes.