From owner-svn-src-all@freebsd.org Fri Dec 23 22:54:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 364EEC8E8A7 for ; Fri, 23 Dec 2016 22:54:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F30EC1F2A for ; Fri, 23 Dec 2016 22:54:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x244.google.com with SMTP id n85so7243873ioi.1 for ; Fri, 23 Dec 2016 14:54:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=brkOsluyIM8rwWu4hm3RwHSA6efQ3LvVN045RNDv+L8=; b=LtVSKg+GxU6GyupTGRCtH/BueCs3Cgvb2B8AYkNfyCcWXOaNei1DOGEPv7OQd4ce/W 4k9yOXQUkKiBQpgGtTxihhiRiRat4Pa8MknF8PwnsKR52Oo+vk1mhW9wWo9nVX+Aib+k qEtJJj4++X5FygD+MXHiLSjRYDYF3+eIt1weh+sM8+QjeGFwJ5/DUpE/CaNbp2Mk4MNl y+WKJtltLZZ76b3KLThCS6ErvftsUl1M6dqs7Zgw4IGaFizvUoyQHluE5MGPkCGdfEzQ xo0yIwAkyxA4F1vQYWhGfZT+wvivsyUIIRYe1KHSzQwmWa5CkeKEgupANs/5Qe7Rv/WY MQnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=brkOsluyIM8rwWu4hm3RwHSA6efQ3LvVN045RNDv+L8=; b=oABsYRj1O4jHSoHqx2cu6CV1Fo+2n1oQabbyqtfC8ho73Qh4gF5rTTFt0dWLbOmE/6 y9/WyBCoHCRCY58E+A84p9ljSuWAUSNNmz5iqtrUCo1YcPT2oH/I7gx37E3Vxb4OfpoT fus9tt41ClERIj0L9takWmQyfmyxsVeVdDDchl1x3DHw3DMN5M1ZjTGt5z32ekTYvV36 Wn++/AI48FqO1wT/Zbdtemc4TTaMgCCHxi/YPPj5KV+Y06TZ1Arv1mex+wBr5RfP4iaR VFLzQB0aax2mjisMmB1x2TaACHKboL49EZTKWhe/4RgV3KgDzcdbfhJkL7FaOeosa729 6XFA== X-Gm-Message-State: AIkVDXJcWtgK5ZMEzPjYbFDp49tu+yZHAzma5WjhJtRggg2VP9LCqj4Ld6y0s2YCvx6B5E5HunYhjsjWGEC0mw== X-Received: by 10.107.198.9 with SMTP id w9mr5043050iof.19.1482533696258; Fri, 23 Dec 2016 14:54:56 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.22.135 with HTTP; Fri, 23 Dec 2016 14:54:55 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: References: <201611180013.uAI0DU57087971@repo.freebsd.org> From: Warner Losh Date: Fri, 23 Dec 2016 15:54:55 -0700 X-Google-Sender-Auth: rm1onL4KlLWspjwy9erwrJlwOYM Message-ID: Subject: Re: svn commit: r308789 - head/sys/conf To: Ed Maste Cc: Gleb Smirnoff , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2016 22:54:57 -0000 On Fri, Dec 23, 2016 at 11:36 AM, Warner Losh wrote: > On Fri, Dec 23, 2016 at 9:35 AM, Ed Maste wrote: >> On 17 November 2016 at 19:13, Gleb Smirnoff wrote: >>> Author: glebius >>> Date: Fri Nov 18 00:13:30 2016 >>> New Revision: 308789 >>> URL: https://svnweb.freebsd.org/changeset/base/308789 >>> >>> Log: >>> If FreeBSD source tree is a subproject of a bigger project, then .git or >>> .hg may reside above FreeBSD sources root. Provide function findvcs() >>> that will climb up and seek for presence of a VCS directory. >> >> This can incorrectly find an unrelated .git directory and provide a >> git revision unrelated to the FreeBSD source being built. For example, >> a build from my Subversion tree now reports "FreeBSD 12.0-CURRENT #2 >> ad3f46a(master)" instead of "FreeBSD 12.0-CURRENT #5 r310482M". >> >> Can you explain your use case in a little more detail so that I can >> avoid breaking it with a change here? Do you commit FreeBSD snapshots >> into the "bigger project"? > > This is done at work (Netflix). We import all the FreeBSD revisions > from github into our repo, and then merge them into the top level > FreeBSD directory from time to time using git's subtree functionality. > We also pull in our ports tree this way (so we have a ports directory > at the same level as our FreeBSD directory). So we don't have a > $TOPSRC/.git like you would if you'd just cloned directly from github. > Our .git directory lives in $TOPSRC/.git as a result. newvers.sh > should find the 'deepest' SCM it can, and use that instead of > apparently using the topmost (I'm surprised that you have FreeBSD > under a directory that has a git checkout in it, btw, but I know that > with my dotfile management repo, that sometimes happens by mistake). > And if this somehow produces a 'tie', the tie should go to svn. > > Looking at how to fix this mess... woof. There's all kinds of crazy > here. Support for: git, git + svn, hg, p4, svn and svnlite. Sometimes > $VCS_cmd is defined if it exists at all on the system, other times > it's only defined if it exists on the system AND we think the tree is > under $VCS. > > But the base of all this woe is that findvcs is called on a per-vcs > basis, rather than being called early to match one of N VCS > signatures. It would be better off searching each directory for each > file rather than finding any file at any level. After chatting with Ed on IRC, I've posted this review. https://reviews.freebsd.org/D8895 which should fix the issues. Warner