[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Changeset / commit id not incorporated in build after switch to git


  • To: xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: Sander Eikelenboom <linux@xxxxxxxxxxxxxx>
  • Date: Mon, 25 Feb 2013 23:28:53 +0100
  • Delivery-date: Mon, 25 Feb 2013 22:29:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Hi All,

After the switching from mercurial to git, the changeset isn't incorporated 
anymore in the build.
This makes error reports possibly a bit less verbose (xl dmesg, serial logs and 
xl info now omit the changeset (or commit) info)

Git doesn't have the concept of changesets afaik and mercurial is, while 
deprecated, still used as mirror.

So what would be wise:
   - just replace the changeset with the git commit sha-1 hash (always)
   - use changeset when a mercurial tree is detected or the last git commit 
sha-1 (and date ?) when a git tree is detected
   - make a separate "commit" entry besides the changeset and leave one 
undefined

xen/Makefile currently has:

# compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
include/xen/compile.h: include/xen/compile.h.in .banner
        @sed -e 's/@@date@@/$(shell LC_ALL=C date)/g' \
            -e 's/@@time@@/$(shell LC_ALL=C date +%T)/g' \
            -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
            -e 's/@@domain@@/$(XEN_DOMAIN)/g' \
            -e 's/@@hostname@@/$(shell hostname)/g' \
            -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head 
-1)!g' \
            -e 's/@@version@@/$(XEN_VERSION)/g' \
            -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
            -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
            -e 's!@@changeset@@!$(shell ((hg parents --template "{date|date} 
{rev}:{node|short}" >/dev/null && hg parents --template "{date|date} 
{rev}:{node|short}") || echo "unavailable") 2>/dev/null)!g' \
            < include/xen/compile.h.in > $@.new
        @grep \" .banner >> $@.new
        @grep -v \" .banner
        @mv -f $@.new $@

--
Sander


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.