Page MenuHomeFreeBSD

Rearrange vcs detection.
AbandonedPublic

Authored by imp on Dec 23 2016, 7:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 1:12 AM
Unknown Object (File)
Mar 16 2024, 3:08 AM
Unknown Object (File)
Mar 11 2024, 6:05 AM
Unknown Object (File)
Feb 9 2024, 4:00 AM
Unknown Object (File)
Feb 1 2024, 7:55 AM
Unknown Object (File)
Jan 19 2024, 9:02 PM
Unknown Object (File)
Jan 2 2024, 12:41 PM
Unknown Object (File)
Dec 20 2023, 1:22 AM
Subscribers

Details

Reviewers
emaste
jhb
glebius
Summary

Rearrange vcs detection a bit to use the first vcs found up the tree
rather than the first VCS we find somewhere up the tree. This will
keep us from stumbling over "false" git repos higher in the tree.
Also fix hg directory specification, it was broken before.

Test Plan

I guess try it with each case we support...

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 6369
Build 6607: arc lint + arc unit

Event Timeline

imp retitled this revision from to Rearrange vcs detection..
imp updated this object.
imp edited the test plan for this revision. (Show Details)
imp added reviewers: emaste, jhb, glebius.

it appears this is based on a slightly older version of newvers.sh

sys/conf/newvers.sh
69

svn should probably be first, since it's canonical and if you have both a .svn/ and .git/ svn should take precedence (I think)

imp edited the test plan for this revision. (Show Details)
imp edited edge metadata.

Update to latest newvers.sh (hopefully w/o losing anything)

sys/conf/newvers.sh
277

I can see this might be clearer not moving to the top, though modified= needs to be up there.

sys/conf/newvers.sh
76

I suppose here you could do something like

if [ -n "${P4CLIENT} ]; then
        VCS=p4
        return 0
fi

i.e., if we didn't find a vcs dir at the first iteration and there's a perforce client env var, assume that we're using perforce

emaste requested changes to this revision.Dec 24 2016, 2:22 AM
emaste edited edge metadata.
emaste added inline comments.
sys/conf/newvers.sh
293–294

sense here is backwards: if the src is not modified, we don't want to include the metadata

This revision now requires changes to proceed.Dec 24 2016, 2:22 AM
rpokala added inline comments.
sys/conf/newvers.sh
69

For that matter, a comment clarifying that would be good too.

I think this idea is good - we should look for any vcs at the src topdir first, followed by any vcs at ../, etc. $topdir/../.git should not take precedence over $topdir/.svn e.g.

There have been a number of newvers.sh changes though and this will need a fairly extensive rebase.

It doesn't help I started with a stale version...

I'll try to rebase, but the last time it was more extensive than I had bandwidth for that day.

@imp do you think you might look at this again soon? I may pick it up if you won't.

Feel free to pick this up... It's so far down on my list...

Clearly I didn't get to this either, and everyone consolidating on git likely makes this much less important.