From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Git transition checklist Date: Wed, 08 Jan 2014 20:14:03 +0200 Message-ID: <837gaafij8.fsf@gnu.org> References: <20140108135200.8ECF9380834@snark.thyrsus.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1389204884 9395 80.91.229.3 (8 Jan 2014 18:14:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Jan 2014 18:14:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: esr@thyrsus.com (Eric S. Raymond) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 08 19:14:47 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W0xeQ-00027E-7Y for ged-emacs-devel@m.gmane.org; Wed, 08 Jan 2014 19:14:46 +0100 Original-Received: from localhost ([::1]:48256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0xeP-0007yw-FR for ged-emacs-devel@m.gmane.org; Wed, 08 Jan 2014 13:14:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0xeF-0007xd-Tk for emacs-devel@gnu.org; Wed, 08 Jan 2014 13:14:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0xe9-0005Ll-D0 for emacs-devel@gnu.org; Wed, 08 Jan 2014 13:14:35 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:40954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0xe9-0005Kg-4Z for emacs-devel@gnu.org; Wed, 08 Jan 2014 13:14:29 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MZ300100H9O9A00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Wed, 08 Jan 2014 20:14:13 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MZ30000RHBKV8A0@a-mtaout22.012.net.il>; Wed, 08 Jan 2014 20:14:08 +0200 (IST) In-reply-to: <20140108135200.8ECF9380834@snark.thyrsus.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:167767 Archived-At: > From: esr@thyrsus.com (Eric S. Raymond) > Date: Wed, 8 Jan 2014 08:52:00 -0500 (EST) > > > 8. There's the emacs-bzr-version whose value gets copied into the bug > > reports. This should be replaced by the suitable git equivalent, > > or else the bug reports (of which we have quite a few each day) > > will not identify the version correctly. > > Proof of concept (tested): > > (defun emacs-repository-get-version (&optional dir) > "Try to return as a string the version-control revision of the Emacs sources. > Value is nil if the sources do not seem to be under version > control, or if we could not determine the revision. Note that > this reports on the current state of the sources, which may not > correspond to the running Emacs. > > Optional argument DIR is a directory to use instead of `source-directory'." > ;; This is the only function that knows what VCS the Emacs sources are under. > (let ((here default-directory)) > (cd (or dir (setq dir source-directory))) > (message "Waiting for git...") > (with-temp-buffer > (if (zerop > (call-process "git" nil '(t nil) nil "describe" "--tags")) > (buffer-string))) > (cd here))) If I run the above git command in the Emacs git repo, I get this: $ git describe --tags mh-e-8.5-4522-gaa5ae3b I doubt that we want this. We want the git sha1 value of the last commit instead, I think. > This code is simpler than emacs-bzr-get-version because "git describe" is > very fast - there's no need to avoid calling it for better performance. At least here (on MS-Windows), "git describe" is not very fast: with a warm cache it takes 0.265 sec, with a cold cache it takes several seconds. But a command that prints the sha1 value should be much faster (about 30 to 45 msec here). > The change to integrate this and fix its callers is easy, five minutes' > work which I will cheerfully do immediately after the repo switchover. > No need to do it before as it really only becomes crucial to have this > working for the next point release. No, I think it needs to be done before the first user checks out the git repo after the switch, because that signature is important in bug reports. We don't want to have builds of Emacs that don't identify the git commit they are based on, because that makes it harder to decide whether a bug was already fixed. So either the above function should be added to Emacs before the switch, wrapped with some code that would activate it when git starts to be used, or the repo should be locked for pulls for a few moments after the switch, until the function is committed. > Nobody else explicitly suggested any additional preconditions. I think we have identified another one today: repack the savannah repository, to avoid both slow initial clone and, what's more, local repacking that is problematic on slow or low-memory machines. Thanks.